[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJfpegvvuzXUDusbsJ1VO0CQf5iZO=TZ8kK7V3-k738oi5RM5w@mail.gmail.com>
Date: Mon, 26 Feb 2024 09:27:17 +0100
From: Miklos Szeredi <miklos@...redi.hu>
To: Jan Kara <jack@...e.cz>
Cc: Kent Overstreet <kent.overstreet@...ux.dev>, Josef Bacik <josef@...icpanda.com>,
linux-kernel@...r.kernel.org, linux-bcachefs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, lsf-pc@...ts.linux-foundation.org,
linux-btrfs@...r.kernel.org
Subject: Re: [Lsf-pc] [LSF TOPIC] statx extensions for subvol/snapshot
filesystems & more
On Thu, 22 Feb 2024 at 17:08, Jan Kara <jack@...e.cz> wrote:
> > If we are going to start fixing userspace, then we better make sure to
> > use the right interfaces, that won't have issues in the future.
>
> I agree we should give this a good thought which identification of a
> filesystem is the best.
To find mount boundaries statx.stx_mnt_id (especially with
STATX_MNT_ID_UNIQUE) is perfect.
By supplying stx_mnt_id to statmount(2) it's possible to get the
device number associated with that filesystem (statmount.sb_dev_*). I
think it's what Josef wants btrfs to return as st_dev.
And statx could return that in stx_dev_*, with an interface feature
flag, same as we've done with stx_mnt_id. I.e. STATX_DEV_NOHACK would
force the vfs to replace anything the filesystem put in kstat.dev with
sb->s_dev.
Thanks,
Miklos
Powered by blists - more mailing lists