diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-06-02 16:30:54 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:40 -0400 |
commit | 36b8372b595748d37dcdcd915c176bada978fbe5 (patch) | |
tree | b90232bfc25d7bad19a569884da2116e995affb0 /fs/bcachefs/reflink.c | |
parent | 039fc4c5221f7433d8383e25a7c70b30793b4916 (diff) | |
download | lwn-36b8372b595748d37dcdcd915c176bada978fbe5.tar.gz lwn-36b8372b595748d37dcdcd915c176bada978fbe5.zip |
bcachefs: Add an option to disable reflink support
Reflink might be buggy, so we're adding an option so users can help
bisect what's going on.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/reflink.c')
-rw-r--r-- | fs/bcachefs/reflink.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/bcachefs/reflink.c b/fs/bcachefs/reflink.c index 2f223be74926..3c473f1380a6 100644 --- a/fs/bcachefs/reflink.c +++ b/fs/bcachefs/reflink.c @@ -167,6 +167,9 @@ s64 bch2_remap_range(struct bch_fs *c, u64 src_done, dst_done; int ret = 0, ret2 = 0; + if (!c->opts.reflink) + return -EOPNOTSUPP; + if (!percpu_ref_tryget(&c->writes)) return -EROFS; |