summaryrefslogtreecommitdiff
path: root/fs/btrfs/disk-io.h
diff options
context:
space:
mode:
authorBoris Burkov <boris@bur.io>2020-11-19 02:06:20 +0300
committerDavid Sterba <dsterba@suse.com>2020-12-09 21:16:08 +0300
commit8cd2908846d11af9b33246171f71a923d35eb3c4 (patch)
treee221c6b5f55b927b0b51c00a64b0a519edc46095 /fs/btrfs/disk-io.h
parent5011139a4718455a6cd6214fd84e6f8500fd3874 (diff)
downloadlinux-8cd2908846d11af9b33246171f71a923d35eb3c4.tar.xz
btrfs: clear oneshot options on mount and remount
Some options only apply during mount time and are cleared at the end of mount. For now, the example is USEBACKUPROOT, but CLEAR_CACHE also fits the bill, and this is a preparation patch for also clearing that option. One subtlety is that the current code only resets USEBACKUPROOT on rw mounts, but the option is meaningfully "consumed" by a ro mount, so it feels appropriate to clear in that case as well. A subsequent read-write remount would not go through open_ctree, which is the only place that checks the option, so the change should be benign. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Boris Burkov <boris@bur.io> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.h')
-rw-r--r--fs/btrfs/disk-io.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h
index b509d1a490e7..7b3ecad88d7e 100644
--- a/fs/btrfs/disk-io.h
+++ b/fs/btrfs/disk-io.h
@@ -50,6 +50,7 @@ struct extent_buffer *btrfs_find_create_tree_block(
u64 bytenr, u64 owner_root,
int level);
void btrfs_clean_tree_block(struct extent_buffer *buf);
+void btrfs_clear_oneshot_options(struct btrfs_fs_info *fs_info);
int btrfs_start_pre_rw_mount(struct btrfs_fs_info *fs_info);
int __cold open_ctree(struct super_block *sb,
struct btrfs_fs_devices *fs_devices,