On Tue, Nov 07, 2023 at 11:52:18PM -0800, Christoph Hellwig wrote: > On Tue, Nov 07, 2023 at 10:06:18AM +0100, Christian Brauner wrote: > > > But it doesn't appear to me there's agreement on the way forward. vfsmounts > > > aren't going to do anything from what I can tell, but I could very well be > > > missing some detail. And Christian doesn't seem to want that as a solution. > > > > No, I really don't. > > > > I still think that it is fine to add a statx() flag indicating that a > > file is located on a subvolume. That allows interested userspace to > > bounce to an ioctl() where you can give it additional information in > > whatever form you like. > > What is that flag going to buy us? The initial list that Josef provided in https://lore.kernel.org/linux-btrfs/20231025210654.GA2892534@perftesting asks to give users a way to figure out whether a file is located on a subvolume. Which I think is reasonable and there's a good chunk of software out there that could really benefit from this. Now all of the additional info that is requested doesn't need to live in statx(). But that flag can serve as an indicator for userspace that they are on a subvolume and that they can go to btrfs specific ioctls if they want to figure out more details.