linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 6/8] common/filter: fix _filter_file_attributes to handle xfs file flags
       [not found]       ` <aPXeQW0ISn6_aCoP@infradead.org>
@ 2025-10-20 16:37         ` Darrick J. Wong
  2025-10-21  5:30           ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2025-10-20 16:37 UTC (permalink / raw)
  To: Christoph Hellwig, Theodore Ts'o
  Cc: zlang, fstests, linux-xfs, linux-ext4

On Mon, Oct 20, 2025 at 12:01:21AM -0700, Christoph Hellwig wrote:
> On Fri, Oct 17, 2025 at 09:22:18AM -0700, Darrick J. Wong wrote:
> > > What XFS flags end up in lsattr?
> > 
> > Assuming you're asking which XFS flags are reported by ext4 lsattr...
> > 
> > append, noatime, nodump, immutable, projinherit, fsdax
> > 
> > Unless you meant src/file_attr.c?  In which case theyr'e
> 
> I'm actually not sure.  I was just surprised about the flags showing
> up.
> 
> > 
> > > Is this coordinated with the official
> > > registry in ext4?
> > 
> > Only informally by Ted and I talking on Thursdays.
> > 
> > The problem here is that _filter_file_attributes ... probably ought to
> > say which domain (ext4 lsattr or xfs_io lsattr) it's actually filtering.
> 
> Oooh.  That explains my confusion.
> 
> > Right now the only users of this helper are using it to filter
> > src/file_attr.c output (aka xfs_io lsattr) so I think I should change
> > the patch to document that.
> 
> Yes, please.  And we really need to figure out central authoritisied
> to document the lsattr and fsxattr domain flags.

[add tytso and linux-ext4]

I think we should standardize on the VFS (aka file_getattr) flag values,
which means the xfs version more or less wins.

The only problem there of course is that file_getattr doesn't know about
the ext-specific flags, which are:

	{ EXT2_SECRM_FL, "s", "Secure_Deletion" },
	{ EXT2_UNRM_FL, "u" , "Undelete" },
	{ EXT2_DIRSYNC_FL, "D", "Synchronous_Directory_Updates" },
	{ EXT2_COMPR_FL, "c", "Compression_Requested" },
	{ EXT4_ENCRYPT_FL, "E", "Encrypted" },
	{ EXT3_JOURNAL_DATA_FL, "j", "Journaled_Data" },
	{ EXT2_INDEX_FL, "I", "Indexed_directory" },
	{ EXT2_NOTAIL_FL, "t", "No_Tailmerging" },
	{ EXT2_TOPDIR_FL, "T", "Top_of_Directory_Hierarchies" },
	{ EXT4_EXTENTS_FL, "e", "Extents" },
	{ FS_NOCOW_FL, "C", "No_COW" },
	{ EXT4_CASEFOLD_FL, "F", "Casefold" },
	{ EXT4_INLINE_DATA_FL, "N", "Inline_Data" },
	{ EXT4_VERITY_FL, "V", "Verity" },
	{ EXT2_NOCOMPR_FL, "m", "Dont_Compress" },

Not sure what we want to do about that, since some of those flags like
the ones related to deletion, compression, and tailmerging aren't
implemented.

Other things like extents/topdir seem too ext4-specific to put in a vfs
interface....?

--D

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 6/8] common/filter: fix _filter_file_attributes to handle xfs file flags
  2025-10-20 16:37         ` [PATCH 6/8] common/filter: fix _filter_file_attributes to handle xfs file flags Darrick J. Wong
@ 2025-10-21  5:30           ` Christoph Hellwig
  2025-10-21 14:47             ` Darrick J. Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2025-10-21  5:30 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: Christoph Hellwig, Theodore Ts'o, zlang, fstests, linux-xfs,
	linux-ext4

On Mon, Oct 20, 2025 at 09:37:13AM -0700, Darrick J. Wong wrote:
> [add tytso and linux-ext4]
> 
> I think we should standardize on the VFS (aka file_getattr) flag values,
> which means the xfs version more or less wins.

Ok, I'm more than confused than before.  Shouldn't we simply use
separate filters for FS_IOC_GETFLAGS vs FS_IOC_FSGETXATTR?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 6/8] common/filter: fix _filter_file_attributes to handle xfs file flags
  2025-10-21  5:30           ` Christoph Hellwig
@ 2025-10-21 14:47             ` Darrick J. Wong
  0 siblings, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2025-10-21 14:47 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Theodore Ts'o, zlang, fstests, linux-xfs, linux-ext4

On Mon, Oct 20, 2025 at 10:30:29PM -0700, Christoph Hellwig wrote:
> On Mon, Oct 20, 2025 at 09:37:13AM -0700, Darrick J. Wong wrote:
> > [add tytso and linux-ext4]
> > 
> > I think we should standardize on the VFS (aka file_getattr) flag values,
> > which means the xfs version more or less wins.
> 
> Ok, I'm more than confused than before.  Shouldn't we simply use
> separate filters for FS_IOC_GETFLAGS vs FS_IOC_FSGETXATTR?

Yeah.  I was going to just provide both versions, but then I went down
the rabbithole of navelgazing about "Is upstream going to accept a
helper for the ext4 lsattr flags even though there are no users?" and
then wandered off to tackle actual useful things like mount/unmount
races in fuse. :P

--D

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-10-21 14:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <176054617853.2391029.10911105763476647916.stgit@frogsfrogsfrogs>
     [not found] ` <176054618007.2391029.16547003793604851342.stgit@frogsfrogsfrogs>
     [not found]   ` <aPHE0N8JX4H8eEo6@infradead.org>
     [not found]     ` <20251017162218.GD6178@frogsfrogsfrogs>
     [not found]       ` <aPXeQW0ISn6_aCoP@infradead.org>
2025-10-20 16:37         ` [PATCH 6/8] common/filter: fix _filter_file_attributes to handle xfs file flags Darrick J. Wong
2025-10-21  5:30           ` Christoph Hellwig
2025-10-21 14:47             ` Darrick J. Wong

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).