> On Fri, 27 Aug 2021, J. Bruce Fields wrote: > > On Thu, Aug 26, 2021 at 04:03:04PM +1000, NeilBrown wrote: > > > > > > [[ Hi Bruce and Chuck, > > > I've rebased this patch on the earlier patch I sent which allows > > > me to use the name "fh_flags". I've also added a missing #include. > > > I've added the 'Acked-by' which Joesf provided earlier for the > > > btrfs-part. I don't have an 'ack' for the stat.h part, but no-one > > > has complained wither. > > > I think it is as ready as it can be, and am keen to know what you > > > think. > > > I'm not *very* keen on testing s_magic in nfsd code (though we > > > already have a couple of such tests in nfs3proc.c), but it does have > > > the advantage of ensuring that no other filesystem can use this > > > functionality without landing a patch in fs/nfsd/. > > > > > > Thanks for any review that you can provide, > > > NeilBrown > > > ]] > > > > This seems hairy, but *somebody* has hated every single solution > > proposed, so, argh, I don't know, maybe it's best. > > People don't like change I guess :-) > I think we need the fh_flags stuff for almost any fix, else existing mounts could > break when the server is upgraded. This could be needed for any filesystem that > has flawed NFS export support and needs to seemlessly repair it. > We *might* be able to avoid that is I xored the uniquifier with the fsid instead of > the fileid (I'd have to test), but that has other problems like polluting the client's > mount table and mounted-on-fileid being hard to manage - especially for NFSv3. > The rest is the minimum that actually achieves something. Changing the fsid for sub-volumes is Ganesha's solution (before adding that, we couldn't even export the sub-volumes at all). Mangling the fileid is definitely the best solution if there will be lots of sub-volumes. For a few sub-volumes changing fsid does create additional mount points on the client with some issues, but does guarantee there will be no fileid collision. My gut feel is your solution is the best one and Ganesha may need to switch to that solution. Frank