[Devel] [PATCH rh7 v2 2/3] ve/fs/sync: per containter sync and syncfs
Andrey Ryabinin
aryabinin at virtuozzo.com
Wed Feb 3 05:49:43 PST 2016
On 02/03/2016 03:12 PM, Vladimir Davydov wrote:
>> ub = get_exec_ub();
>> @@ -246,15 +252,18 @@ SYSCALL_DEFINE0(sync)
>> fsb = __ve_fsync_behavior(ve);
>> if (fsb == FSYNC_NEVER)
>> goto skip;
>> +
>> + if (fsb == FSYNC_FILTERED)
>> + sync_ub = get_io_ub();
>> }
>>
>> - wakeup_flusher_threads(0, WB_REASON_SYNC);
>> - iterate_supers(sync_inodes_one_sb, NULL);
>> - iterate_supers(sync_fs_one_sb, &nowait);
>> - iterate_supers(sync_fs_one_sb, &wait);
>> + wakeup_flusher_threads_ub(0, ub, WB_REASON_SYNC);
>
> s/ub,/sync_ub,
>
> ?
>
Yup,
>> + iterate_supers(sync_inodes_one_sb, sync_ub);
>> + sync_filesystems(sync_ub, nowait);
>> + sync_filesystems(sync_ub, wait);
>> iterate_bdevs(fdatawrite_one_bdev, NULL);
>> iterate_bdevs(fdatawait_one_bdev, NULL);
>
> If sync_ub != NULL, you sync inodes and bdevs twice, here and in
> sync_filesystems_ve. Better move all the iterate_supers/bdevs from here
> to sync_filesystems under !ub branch?
>
I'm thinking about something like this:
@@ -255,15 +253,22 @@ SYSCALL_DEFINE0(sync)
if (fsb == FSYNC_FILTERED)
sync_ub = get_io_ub();
+
+ if (sync_ub && (sync_ub != get_ub0())) {
+ wakeup_flusher_threads_ub(0, sync_ub, WB_REASON_SYNC);
+ sync_filesystems_ve(get_exec_env(), ub, nowait);
+ sync_filesystems_ve(get_exec_env(), ub, wait);
+ goto skip;
+ }
}
!sync_ub path left untouched.
More information about the Devel
mailing list