Re: [PATCH 9/9] pack-objects: rename .idx files into place after .bitmap files

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

 



Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes:

>     We fsync() the file descriptors we're writing out for all the
>     auxiliary files, but we don't yet fsync() the file descriptor for
>     the containing directory. Therefore our data might have been written
>     out, but it's anyone's guess what the state of the directory
>     containing the file is after we write the *.idx.
>
>     In practice modern OS's are known to be forgiving on that point, so
>     this will probably solve races in practice for most users. It will
>     almost certainly make them better than they were before when we
>     didn't write *.idx files last. We should more generally improve our
>     use of fsync() to cover containing directories, but that'll
>     hopefully be addressed by some follow-up series.

I'd probably drop the last paragraph, and replace it with a single
sentence "we may want to fsync the containing directory once after
placing *.idx file in place, but it is outside of the scope of this
series", if I were doing this series.

Other than that (and I made a few comments on other patches), these
were pleasant read.

Thanks.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux