All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Andrey Albershteyn <aalbersh@kernel.org>,
	linux-man@vger.kernel.org,  linux-xfs@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	 linux-api@vger.kernel.org
Subject: Re: [PATCH v2] man/man2: introduce man page for file_getattr/file_setattr syscalls
Date: Thu, 10 Sep 2026 18:31:48 +0200	[thread overview]
Message-ID: <aqLY-1do_4hmZpfI@devuan> (raw)
In-Reply-To: <20260910161204.GE6238@frogsfrogsfrogs>

[-- Attachment #1: Type: text/plain, Size: 2876 bytes --]

Hi Darrick,

> Date: 2026-09-10 09:12:04-0700
> From: "Darrick J. Wong" <djwong@kernel.org>
>
> On Thu, Sep 10, 2026 at 03:20:25PM +0200, Alejandro Colomar wrote:
> > 
> > > Date: 2026-09-10 12:41:18+0200
> > > From: Andrey Albershteyn <aalbersh@kernel.org>
[...]
> > > +.SH DESCRIPTION
> > > +The
> > > +.BR file_getattr ()
> > > +system call retrieves filesystem file attributes
> > > +from the file specified by
> > > +.IR pathname .
> > > +.P
> > > +This system call provides functionality similar to the
> > > +.B FS_IOC_FSGETXATTR
> > > +.BR ioctl (2)
> > > +operation,
> > 
> > Should we document FS_IOC_FSGETXATTR in a new FS_IOC_FSGETXATTR(2const)
> > manual page?
> 
> https://www.man7.org/linux/man-pages/man2/ioctl_xfs_fssetxattr.2.html

Thanks!  I didn't know that page.

I see the page uses the constants as XFS_ instead of FS_?  I think the
page should have some mention about it, especially since it says non-xfs
filesystems also implement this.  Is it the same as (or related to)
what's mentioned in quotactl(2)?

	NOTES
	   Alternative XFS header
	     Instead of <xfs/xqm.h> one  can  use  <linux/dqblk_xfs.h>,
	     taking into account that there are several naming discrep‐
	     ancies:

	     •  Quota       enabling       flags       (of       format
		XFS_QUOTA_[UGP]DQ_{ACCT,ENFD}) are  defined  without  a
		leading "X", as FS_QUOTA_[UGP]DQ_{ACCT,ENFD}.

	     •  The  same is true for XFS_{USER,GROUP,PROJ}_QUOTA quota
		type     flags,     which      are      defined      as
		FS_{USER,GROUP,PROJ}_QUOTA.

	     •  The  dqblk_xfs.h  header  file  defines its own XQM_US‐
		RQUOTA, XQM_GRPQUOTA, and  XQM_PRJQUOTA  constants  for
		the  available  quota  types,  but their values are the
		same as for constants without the XQM_ prefix.

I think we should probably have a xfs-xqm(2head) manual page documenting
these conventions, I think.

Also, given it doesn't seem exclusive of xfs, should we move the manual
page to the Linux man-pages (from xfsprogs)?

> > > +but with the advantage that the file does not need to be opened.
> > > +By using a pathname,
> > > +.BR file_getattr ()
> > > +can retrieve filesystem file attributes
> > > +from all file types,
> > > +including special files such as FIFOs, sockets, block devices, character
> > > +devices, and symlinks, where opening the targeted inode may not be possible.
> > 
> > This seems to be a limitation of FS_IOC_FSGETXATTR(2const), and would be
> > more appropriately documented in that page (if we add it).  There, I'd
> > document it in CAVEATS.  Then, file_getattr(2) wouldn't need to mention
> > this at all, because it's not an issue here.
> 
> Agreed, that belongs in ioctl_xfs_fssetxattr.2, not here.

Thanks!

> 
> --D

Have a lovely day!
Alex

-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-09-10 16:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10 10:41 [PATCH v2] man/man2: introduce man page for file_getattr/file_setattr syscalls Andrey Albershteyn
2026-09-10 13:20 ` Alejandro Colomar
2026-09-10 16:12   ` Darrick J. Wong
2026-09-10 16:31     ` Alejandro Colomar [this message]
2026-09-10 16:44       ` Darrick J. Wong
2026-09-10 16:50         ` Alejandro Colomar
2026-09-10 22:38           ` quotactl(2) (was: [PATCH v2] man/man2: introduce man page for file_getattr/file_setattr syscalls) Alejandro Colomar
2026-09-15 18:10             ` Darrick J. Wong
2026-09-15 20:46               ` Alejandro Colomar
2026-09-11 11:17   ` [PATCH v2] man/man2: introduce man page for file_getattr/file_setattr syscalls Andrey Albershteyn
2026-09-11 11:56     ` Alejandro Colomar

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=aqLY-1do_4hmZpfI@devuan \
    --to=alx@kernel.org \
    --cc=aalbersh@kernel.org \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.