Re: Rename+crash behaviour of btrfs - nearly ext3!

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

 



On Tue, May 18, 2010 at 07:00:57PM -0400, Ric Wheeler wrote:
> Just to weigh in here, I think that you have the right behaviour 
> already. If an application wants to force this to sync the data to disk, 
> it should use fsync() after the rename.

Actually, it pretty much has to fsync before the rename (to ensure the
contents are on disk) and possibly fsync the directory after to ensure
the rename hits the disk.  If you fsync after the rename, there is still
no guarantee that a crash won't cause partial data on disk with the new
filename, unless you assume the filesystem orders the writes so the
rename happens after the data hits the disk.  AFAIK most filesystems
make no such guarantee.

-- 
Bruce Guenter <bruce@xxxxxxxxxxxxxx>                http://untroubled.org/

Attachment: pgpBlCY0fT7CZ.pgp
Description: PGP signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux