Re: Does sync_bdevs need to issue a PREFLUSH ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed 18-12-24 00:32:24, wangjianjian0 wrote:
> This may be a stupid question,  ; -)
> ksys_sync call sync_bdevs to write all block device mapping but it seems it  doesn't issue a PREFLUSH request. 
> Without it, is it possible to lost data after a poweroff even though we have call sync() ?

Generally, it is the responsibility of individual filesystems to issue
cache flush requests as appropriate in their ->sync_fs() methods. Now if
there's no filesystem on given block device (i.e., the block device is used
directly), then I agree we fail to flush disk caches as a result of
sync(2). On the other hand issuing cache flush unconditionally in
sync_bdevs() will cause a lot of unnecessary cache flushing for mounted
devices or if there were in fact no dirty data. So fixing this in a way
that does not regress common case will be a bit tricky.

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux