diff options
author | David Sterba <dsterba@suse.cz> | 2014-07-23 08:39:35 -0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-09-17 16:37:42 -0400 |
commit | 2fad4e83e12591eb3bd213875b9edc2d18e93383 (patch) | |
tree | 79f8dcc4da44b3124c3df2ff6a3bd014d43467fd /fs/btrfs | |
parent | c01a5c074c0f6f85a3b02e39432b9e5576ab51de (diff) |
btrfs: wake up transaction thread from SYNC_FS ioctl
The transaction thread may want to do more work, namely it pokes the
cleaner ktread that will start processing uncleaned subvols.
This can be triggered by user via the 'btrfs fi sync' command, otherwise
there was a delay up to 30 seconds before the cleaner started to clean
old snapshots.
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/ioctl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index e5ed222267ee..4492e017bdb2 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -5288,6 +5288,12 @@ long btrfs_ioctl(struct file *file, unsigned int | |||
5288 | if (ret) | 5288 | if (ret) |
5289 | return ret; | 5289 | return ret; |
5290 | ret = btrfs_sync_fs(file->f_dentry->d_sb, 1); | 5290 | ret = btrfs_sync_fs(file->f_dentry->d_sb, 1); |
5291 | /* | ||
5292 | * The transaction thread may want to do more work, | ||
5293 | * namely it pokes the cleaner ktread that will start | ||
5294 | * processing uncleaned subvols. | ||
5295 | */ | ||
5296 | wake_up_process(root->fs_info->transaction_kthread); | ||
5291 | return ret; | 5297 | return ret; |
5292 | } | 5298 | } |
5293 | case BTRFS_IOC_START_SYNC: | 5299 | case BTRFS_IOC_START_SYNC: |