Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps
Bruno Haible <[email protected]> Tue, 19 Sep 2023 16:52:43 +0200
| Newsgroups | com.redhat.cluster-devel,dev.linux.lists.ntfs3,dev.linux.lists.ocfs2-devel,dev.linux.lists.v9fs,org.infradead.lists.linux-mtd,org.kvack.linux-mm,org.ozlabs.lists.linux-erofs |
|---|---|
| Message-ID | <4511209.uG2h0Jr0uP@nimes> |
Jeff Layton wrote: > I'm not sure what we can do for this test. The nap() function is making > an assumption that the timestamp granularity will be constant, and that > isn't necessarily the case now. This is only of secondary importance, because the scenario by Jan Kara shows a much more fundamental breakage: > > The ultimate problem is that a sequence like: > > > > write(f1) > > stat(f2) > > write(f2) > > stat(f2) > > write(f1) > > stat(f1) > > > > can result in f1 timestamp to be (slightly) lower than the final f2 > > timestamp because the second write to f1 didn't bother updating the > > timestamp. That can indeed be a bit confusing to programs if they compare > > timestamps between two files. Jeff? > > > > Basically yes. f1 was last written to *after* f2 was last written to. If the timestamp of f1 is then lower than the timestamp of f2, timestamps are fundamentally broken. Many things in user-space depend on timestamps, such as build system centered around 'make', but also 'find ... -newer ...'. Bruno