[PATCH] bcachefs: expose reflink_p may_update_opts in sysfs

Reed Riley <[email protected]>
Newsgroups org.kernel.vger.linux-bcachefs
Message-ID <cE2ToM_C9lRpiqHsQ6LQAim5iKoW2c-RNTjehjV0F0bwhXnSKKqd1ZCr23UyeK1asFR0P3WtBC4kvTV3_pzLIJfYFCyi0W6mcUJ0FXZgO7M=@riley.engineer>
Surfacing this will potentially allow userspace utilities to reason about which inodes control the propagation of bcachefs options to reflink_v extents.

---
 fs/bcachefs/reflink.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/bcachefs/reflink.c b/fs/bcachefs/reflink.c
index 92b90cfe622b9..84218efa1029e 100644
--- a/fs/bcachefs/reflink.c
+++ b/fs/bcachefs/reflink.c
@@ -65,6 +65,9 @@ void bch2_reflink_p_to_text(struct printbuf *out, struct bch_fs *c,
               le32_to_cpu(p.v->front_pad),
               le32_to_cpu(p.v->back_pad));

+       if (REFLINK_P_MAY_UPDATE_OPTIONS(p.v))
+               prt_str(out, " may_update_opts");
+
        if (REFLINK_P_ERROR(p.v))
                prt_str(out, " error");
 }
--
2.50.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.