linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kent Overstreet <kent.overstreet@linux.dev>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Randy Dunlap <rdunlap@infradead.org>,
	dsterba@suse.cz,  linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org,
	 linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org,
	 Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	Dave Chinner <dchinner@redhat.com>,
	 Theodore Ts'o <tytso@mit.edu>,
	Josef Bacik <josef@toxicpanda.com>
Subject: Re: [PATCH 4/6] fs: FS_IOC_GETSYSFSNAME
Date: Tue, 6 Feb 2024 00:13:15 -0500	[thread overview]
Message-ID: <bhxmfqyqjkpjtxhyj2w2pnzbx2whnc2qurg2fcjpphuli2lyzc@bea4fzncsnhc> (raw)
In-Reply-To: <20240206050853.GQ616564@frogsfrogsfrogs>

On Mon, Feb 05, 2024 at 09:08:53PM -0800, Darrick J. Wong wrote:
> On Mon, Feb 05, 2024 at 11:33:11PM -0500, Kent Overstreet wrote:
> > On Mon, Feb 05, 2024 at 08:20:10PM -0800, Randy Dunlap wrote:
> > > 
> > > 
> > > On 2/5/24 17:39, David Sterba wrote:
> > > > On Mon, Feb 05, 2024 at 05:43:37PM -0500, Kent Overstreet wrote:
> > > >> On Mon, Feb 05, 2024 at 02:27:32PM -0800, Darrick J. Wong wrote:
> > > >>> On Mon, Feb 05, 2024 at 03:05:15PM -0500, Kent Overstreet wrote:
> > > >>>> @@ -231,6 +235,7 @@ struct fsxattr {
> > > >>>>  #define FS_IOC_SETFSLABEL		_IOW(0x94, 50, char[FSLABEL_MAX])
> > > >>>>  #define FS_IOC_GETFSUUID		_IOR(0x94, 51, struct fsuuid2)
> > > >>>>  #define FS_IOC_SETFSUUID		_IOW(0x94, 52, struct fsuuid2)
> > > >>>> +#define FS_IOC_GETFSSYSFSNAME		_IOR(0x94, 53, struct fssysfsname)
> > > >>>
> > > >>> 0x94 is btrfs, don't add things to their "name" space.
> > > >>
> > > >> Can we please document this somewhere!?
> > > >>
> > > >> What, dare I ask, is the "namespace" I should be using?
> > > > 
> > > > Grep for _IOCTL_MAGIC in include/uapi:
> > > > 
> > > > uapi/linux/aspeed-lpc-ctrl.h:#define __ASPEED_LPC_CTRL_IOCTL_MAGIC 0xb2
> > > > uapi/linux/aspeed-p2a-ctrl.h:#define __ASPEED_P2A_CTRL_IOCTL_MAGIC 0xb3
> > > > uapi/linux/bt-bmc.h:#define __BT_BMC_IOCTL_MAGIC        0xb1
> > > > uapi/linux/btrfs.h:#define BTRFS_IOCTL_MAGIC 0x94
> > > > uapi/linux/f2fs.h:#define F2FS_IOCTL_MAGIC              0xf5
> > > > uapi/linux/ipmi_bmc.h:#define __IPMI_BMC_IOCTL_MAGIC        0xB1
> > > > uapi/linux/pfrut.h:#define PFRUT_IOCTL_MAGIC 0xEE
> > > > uapi/rdma/rdma_user_ioctl.h:#define IB_IOCTL_MAGIC RDMA_IOCTL_MAGIC
> > > > uapi/rdma/rdma_user_ioctl_cmds.h:#define RDMA_IOCTL_MAGIC       0x1b
> > > > 
> > > > The label ioctls inherited the 0x94 namespace for backward
> > > > compatibility but as already said, it's the private namespace of btrfs.
> > > > 
> > > 
> > > or more generally, see Documentation/userspace-api/ioctl/ioctl-number.rst.
> > > 
> > > For 0x94, it says:
> > > 
> > > 0x94  all    fs/btrfs/ioctl.h                                        Btrfs filesystem
> > >              and linux/fs.h                                          some lifted to vfs/generic
> > 
> > You guys keep giving the same info over and over again, instead of
> > anything that would be actually helpful...
> > 
> > Does anyone know what the proper "namespace" is for new VFS level
> > ioctls?
> > 
> > ...Anyone?
> 
> I propose you use 0x15 (NAK) and add it to the Documentation/ as the
> official VFS ioctl namespace. ;)

Done!

  reply	other threads:[~2024-02-06  5:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 20:05 [PATCH 0/6] filesystem visibility ioctls Kent Overstreet
2024-02-05 20:05 ` [PATCH 1/6] fs: super_block->s_uuid_len Kent Overstreet
2024-02-05 21:58   ` Dave Chinner
2024-02-05 22:56     ` Kent Overstreet
2024-02-05 20:05 ` [PATCH 2/6] fs: FS_IOC_GETUUID Kent Overstreet
2024-02-05 22:17   ` Dave Chinner
2024-02-05 22:49     ` Kent Overstreet
2024-02-05 23:59       ` Darrick J. Wong
2024-02-06  8:24       ` Amir Goldstein
2024-02-06  9:00         ` Kent Overstreet
2024-02-05 20:05 ` [PATCH 3/6] fat: Hook up sb->s_uuid Kent Overstreet
2024-02-05 20:05 ` [PATCH 4/6] fs: FS_IOC_GETSYSFSNAME Kent Overstreet
2024-02-05 22:27   ` Darrick J. Wong
2024-02-05 22:43     ` Kent Overstreet
2024-02-06  1:39       ` David Sterba
2024-02-06  4:20         ` Randy Dunlap
2024-02-06  4:33           ` Kent Overstreet
2024-02-06  5:08             ` Darrick J. Wong
2024-02-06  5:13               ` Kent Overstreet [this message]
2024-02-05 20:05 ` [PATCH 5/6] xfs: add support for FS_IOC_GETSYSFSNAME Kent Overstreet
2024-02-05 20:05 ` [PATCH 6/6] bcachefs: " Kent Overstreet
2024-02-06 16:22 ` [PATCH 0/6] filesystem visibility ioctls Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bhxmfqyqjkpjtxhyj2w2pnzbx2whnc2qurg2fcjpphuli2lyzc@bea4fzncsnhc \
    --to=kent.overstreet@linux.dev \
    --cc=brauner@kernel.org \
    --cc=dchinner@redhat.com \
    --cc=djwong@kernel.org \
    --cc=dsterba@suse.cz \
    --cc=jack@suse.cz \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).