Re: [Cluster-devel] [PATCH v7 12/13] ext4: switch to multigrain timestamps
Jeff Layton <[email protected]> Wed, 20 Sep 2023 07:56:43 -0400
| Newsgroups | com.redhat.cluster-devel,dev.linux.lists.ntfs3,dev.linux.lists.ocfs2-devel,dev.linux.lists.v9fs,net.sourceforge.lists.linux-f2fs-devel,org.infradead.lists.linux-mtd,org.kernel.vger.ceph-devel,org.kernel.vger.ecryptfs,org.kernel.vger.linux-btrfs,org.kernel.vger.linux-cifs,org.kernel.vger.linux-ext4,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-nfs,org.kernel.vger.linux-unionfs,org.kernel.vger.linux-xfs,org.kvack.linux-mm,org.ozlabs.lists.linux-erofs |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 2023-09-20 at 13:48 +0200, Christian Brauner wrote: > > > > While we initially thought we can do this unconditionally it turns = out > > > > that this might break existing workloads that rely on timestamps in= very > > > > specific ways and we always knew this was a possibility. Move > > > > multi-grain timestamps behind a vfs mount option. > > >=20 > > > Surely this is a safe choice as it moves the responsibility to the sy= sadmin > > > and the cases where finegrained timestamps are required. But I kind o= f > > > wonder how is the sysadmin going to decide whether mgtime is safe for= his > > > system or not? Because the possible breakage needn't be obvious at th= e > > > first sight... > > >=20 > >=20 > > That's the main reason I really didn't want to go with a mount option. > > Documenting that may be difficult. While there is some pessimism around > > it, I may still take a stab at just advancing the coarse clock whenever > > we fetch a fine-grained timestamp. It'd be nice to remove this option i= n > > the future if that turns out to be feasible. > >=20 > > > If I were a sysadmin, I'd rather opt for something like > > > finegrained timestamps + lazytime (if I needed the finegrained timest= amps > > > functionality). That should avoid the IO overhead of finegrained time= stamps > > > as well and I'd know I can have problems with timestamps only after a > > > system crash. > >=20 > > > I've just got another idea how we could solve the problem: Couldn't w= e > > > always just report coarsegrained timestamp to userspace and provide a= ccess > > > to finegrained value only to NFS which should know what it's doing? > > >=20 > >=20 > > I think that'd be hard. First of all, where would we store the second > > timestamp? We can't just truncate the fine-grained ones to come up with > > a coarse-grained one. It might also be confusing having nfsd and local > > filesystems present different attributes. >=20 > As far as I can tell we have two options. The first one is to make this > into a mount option which I really think isn't a big deal and lets us > avoid this whole problem while allowing filesytems exposed via NFS to > make use of this feature for change tracking. >=20 > The second option is that we turn off fine-grained finestamps for v6.6 > and you get to explore other options. >=20 > It isn't a big deal regressions like this were always to be expected but > v6.6 needs to stabilize so anything that requires more significant work > is not an option. Oh, absolutely. I wasn't proposing to do that work for v6.6. For that, we absolutely either need the mount option or to just revert the mgtime conversions. My plan was to take a stab at doing this for a later kernel release. This is very much a "back to the drawing board" idea. It may not pan out after all, but if it does then we could consider removing the mount option at that point. --=20 Jeff Layton <[email protected]>