Re: [PATCH v2 0/6] Implement a batched fsync option for core.fsyncObjectFiles
- From
- Christoph Hellwig <hch@lst.de>
- Date
- Sep 8, 2021, 06:49 UTC
- Message-ID
- <20210908064958.GA29073@lst.de>
- In-Reply-To
- <xmqqmton7ehn.fsf@gitster.g>
On Tue, Sep 07, 2021 at 11:44:52PM -0700, Junio C Hamano wrote:
Show 8 quoted lines
> I doubt that fsyncObjectFiles is something we can reliably test in > CI, either with the new batched thing or with the original "when we > close one, make sure the changes hit the disk platter" approach. So > I am not sure what conclusion we should draw from such an experiment, > other than "ok, it compiles cleanly." After all, unless we cause > system crashes, what we thought we have written and close(2) would > be seen by another process that we spawn after that, with or without > sync, no?
Basically yes. XFS on Linux has shutdown ioctls that allow to simulate that crash by shutting the file system down which really helps debugging that kind of code. A bunch of other file systems (ext4, f2fs) have also picked this up now (grep for {XFS,EXT4,F2FS}_IOC_SHUTDOWN).