mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-21 19:53:59 +08:00
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>
This commit is contained in:
parent
c01a5c074c
commit
2fad4e83e1
@ -5288,6 +5288,12 @@ long btrfs_ioctl(struct file *file, unsigned int
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = btrfs_sync_fs(file->f_dentry->d_sb, 1);
|
||||
/*
|
||||
* The transaction thread may want to do more work,
|
||||
* namely it pokes the cleaner ktread that will start
|
||||
* processing uncleaned subvols.
|
||||
*/
|
||||
wake_up_process(root->fs_info->transaction_kthread);
|
||||
return ret;
|
||||
}
|
||||
case BTRFS_IOC_START_SYNC:
|
||||
|
Loading…
Reference in New Issue
Block a user