diff options
author | David Sterba <dsterba@suse.cz> | 2014-02-05 15:26:17 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-11-12 16:53:12 +0100 |
commit | 572d9ab7845ea0e043ec34cd733a75228130ad03 (patch) | |
tree | 0dcf250edd2859e3dd64b0b33f9694c3fd61c29b /fs/btrfs/disk-io.c | |
parent | 206c5f60a3d902bc4b56dab2de3e88de5eb06108 (diff) | |
download | linux-572d9ab7845ea0e043ec34cd733a75228130ad03.tar.gz linux-572d9ab7845ea0e043ec34cd733a75228130ad03.tar.bz2 linux-572d9ab7845ea0e043ec34cd733a75228130ad03.zip |
btrfs: add support for processing pending changes
There are some actions that modify global filesystem state but cannot be
performed at the time of request, but later at the transaction commit
time when the filesystem is in a known state.
For example enabling new incompat features on-the-fly or issuing
transaction commit from unsafe contexts (sysfs handlers).
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 1bf9f897065d..fd80c0d98421 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2834,6 +2834,12 @@ retry_root_backup: if (btrfs_test_opt(tree_root, CHANGE_INODE_CACHE)) btrfs_set_opt(tree_root->fs_info->mount_opt, INODE_MAP_CACHE); + /* + * Mount does not set all options immediatelly, we can do it now and do + * not have to wait for transaction commit + */ + btrfs_apply_pending_changes(fs_info); + #ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY if (btrfs_test_opt(tree_root, CHECK_INTEGRITY)) { ret = btrfsic_mount(tree_root, fs_devices, |