* mkfs.xfs with --protofile does not copy extended attributes into the generated filesystem @ 2023-10-05 8:37 Daan De Meyer 2023-10-05 21:27 ` Dave Chinner 0 siblings, 1 reply; 8+ messages in thread From: Daan De Meyer @ 2023-10-05 8:37 UTC (permalink / raw) To: linux-xfs Hi, It seems using --protofile ignores any extended attributes set on source files. I would like to generate an XFS filesystem using --protofile where extended attributes are copied from the source files into the generated filesystem. Any way to make this happen with --protofile? Cheers, Daan De Meyer ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mkfs.xfs with --protofile does not copy extended attributes into the generated filesystem 2023-10-05 8:37 mkfs.xfs with --protofile does not copy extended attributes into the generated filesystem Daan De Meyer @ 2023-10-05 21:27 ` Dave Chinner 2023-10-06 4:22 ` Darrick J. Wong 0 siblings, 1 reply; 8+ messages in thread From: Dave Chinner @ 2023-10-05 21:27 UTC (permalink / raw) To: Daan De Meyer; +Cc: linux-xfs On Thu, Oct 05, 2023 at 10:37:34AM +0200, Daan De Meyer wrote: > Hi, > > It seems using --protofile ignores any extended attributes set on > source files. I would like to generate an XFS filesystem using > --protofile where extended attributes are copied from the source files > into the generated filesystem. Any way to make this happen with > --protofile? mkfs.xfs doesn't have a '--protofile' option. It has a '-p <file>' option for specifying a protofile - is that what you mean? Regardless, there is no xattr support in mkfs/proto.c at all - it's never been supported, and I don't recall anyone ever asking for it. Hence it would have to be implemented from scratch if you need it. -Dave. -- Dave Chinner david@fromorbit.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mkfs.xfs with --protofile does not copy extended attributes into the generated filesystem 2023-10-05 21:27 ` Dave Chinner @ 2023-10-06 4:22 ` Darrick J. Wong 2023-10-06 4:36 ` Dave Chinner 0 siblings, 1 reply; 8+ messages in thread From: Darrick J. Wong @ 2023-10-06 4:22 UTC (permalink / raw) To: Dave Chinner; +Cc: Daan De Meyer, linux-xfs On Fri, Oct 06, 2023 at 08:27:54AM +1100, Dave Chinner wrote: > On Thu, Oct 05, 2023 at 10:37:34AM +0200, Daan De Meyer wrote: > > Hi, > > > > It seems using --protofile ignores any extended attributes set on > > source files. I would like to generate an XFS filesystem using > > --protofile where extended attributes are copied from the source files > > into the generated filesystem. Any way to make this happen with > > --protofile? > > mkfs.xfs doesn't have a '--protofile' option. It has a '-p <file>' > option for specifying a protofile - is that what you mean? While we're on the topic, would it also be useful to have a -p switch that would copy the fsxattr options as well? --D > Regardless, there is no xattr support in mkfs/proto.c at all - it's > never been supported, and I don't recall anyone ever asking for it. > Hence it would have to be implemented from scratch if you need it. > > -Dave. > -- > Dave Chinner > david@fromorbit.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mkfs.xfs with --protofile does not copy extended attributes into the generated filesystem 2023-10-06 4:22 ` Darrick J. Wong @ 2023-10-06 4:36 ` Dave Chinner 2023-10-06 5:04 ` Darrick J. Wong 0 siblings, 1 reply; 8+ messages in thread From: Dave Chinner @ 2023-10-06 4:36 UTC (permalink / raw) To: Darrick J. Wong; +Cc: Daan De Meyer, linux-xfs On Thu, Oct 05, 2023 at 09:22:50PM -0700, Darrick J. Wong wrote: > On Fri, Oct 06, 2023 at 08:27:54AM +1100, Dave Chinner wrote: > > On Thu, Oct 05, 2023 at 10:37:34AM +0200, Daan De Meyer wrote: > > > Hi, > > > > > > It seems using --protofile ignores any extended attributes set on > > > source files. I would like to generate an XFS filesystem using > > > --protofile where extended attributes are copied from the source files > > > into the generated filesystem. Any way to make this happen with > > > --protofile? > > > > mkfs.xfs doesn't have a '--protofile' option. It has a '-p <file>' > > option for specifying a protofile - is that what you mean? > > While we're on the topic, would it also be useful to have a -p switch > that would copy the fsxattr options as well? If protofile support is going to be extended then supporting everything that can be read/set through generic kernel interfaces would be appropriate... But I'm not convinced that we should extend protofile support because mounting the filesytsem and running rsync, xfs_restore, etc can already do all this stuffi with no development work necessary... Cheers, Dave. -- Dave Chinner david@fromorbit.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mkfs.xfs with --protofile does not copy extended attributes into the generated filesystem 2023-10-06 4:36 ` Dave Chinner @ 2023-10-06 5:04 ` Darrick J. Wong 2023-10-06 7:24 ` Daan De Meyer 0 siblings, 1 reply; 8+ messages in thread From: Darrick J. Wong @ 2023-10-06 5:04 UTC (permalink / raw) To: Dave Chinner; +Cc: Daan De Meyer, linux-xfs On Fri, Oct 06, 2023 at 03:36:05PM +1100, Dave Chinner wrote: > On Thu, Oct 05, 2023 at 09:22:50PM -0700, Darrick J. Wong wrote: > > On Fri, Oct 06, 2023 at 08:27:54AM +1100, Dave Chinner wrote: > > > On Thu, Oct 05, 2023 at 10:37:34AM +0200, Daan De Meyer wrote: > > > > Hi, > > > > > > > > It seems using --protofile ignores any extended attributes set on > > > > source files. I would like to generate an XFS filesystem using > > > > --protofile where extended attributes are copied from the source files > > > > into the generated filesystem. Any way to make this happen with > > > > --protofile? > > > > > > mkfs.xfs doesn't have a '--protofile' option. It has a '-p <file>' > > > option for specifying a protofile - is that what you mean? > > > > While we're on the topic, would it also be useful to have a -p switch > > that would copy the fsxattr options as well? > > If protofile support is going to be extended then supporting > everything that can be read/set through generic kernel interfaces > would be appropriate... > > But I'm not convinced that we should extend protofile support > because mounting the filesytsem and running rsync, xfs_restore, etc > can already do all this stuffi with no development work necessary... rsync doesn't support copying the fsxattr data (though it does support extended attributes), and iirc xfsdump can only do entire filesystems, right? --D > Cheers, > > Dave. > -- > Dave Chinner > david@fromorbit.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mkfs.xfs with --protofile does not copy extended attributes into the generated filesystem 2023-10-06 5:04 ` Darrick J. Wong @ 2023-10-06 7:24 ` Daan De Meyer 2023-10-06 18:57 ` Darrick J. Wong 0 siblings, 1 reply; 8+ messages in thread From: Daan De Meyer @ 2023-10-06 7:24 UTC (permalink / raw) To: Darrick J. Wong; +Cc: Dave Chinner, linux-xfs On Fri, Oct 06, 2023 at 03:36:05PM +1100, Dave Chinner wrote: > On Thu, Oct 05, 2023 at 09:22:50PM -0700, Darrick J. Wong wrote: > > On Fri, Oct 06, 2023 at 08:27:54AM +1100, Dave Chinner wrote: > > > On Thu, Oct 05, 2023 at 10:37:34AM +0200, Daan De Meyer wrote: > > > > Hi, > > > > > > > > It seems using --protofile ignores any extended attributes set on > > > > source files. I would like to generate an XFS filesystem using > > > > --protofile where extended attributes are copied from the source files > > > > into the generated filesystem. Any way to make this happen with > > > > --protofile? > > > > > > mkfs.xfs doesn't have a '--protofile' option. It has a '-p <file>' > > > option for specifying a protofile - is that what you mean? > > > > While we're on the topic, would it also be useful to have a -p switch > > that would copy the fsxattr options as well? > > If protofile support is going to be extended then supporting > everything that can be read/set through generic kernel interfaces > would be appropriate... > > But I'm not convinced that we should extend protofile support > because mounting the filesytsem and running rsync, xfs_restore, etc > can already do all this stuffi with no development work necessary... > rsync doesn't support copying the fsxattr data (though it does support > extended attributes), and iirc xfsdump can only do entire filesystems, > right? Additionally, when populating the filesystem in a regular file, to mount it we need loop devices and we need to be root. Both of which we want to avoid. So having an option to do this without mounting the filesystem like ext4 and btrfs have would be very useful. It doesn't have to be via '-p', I'm fine with a -d or --rootdir option like the ones that ext4 and btrfs have as well. Cheers, Daan On Fri, 6 Oct 2023 at 07:04, Darrick J. Wong <djwong@kernel.org> wrote: > > On Fri, Oct 06, 2023 at 03:36:05PM +1100, Dave Chinner wrote: > > On Thu, Oct 05, 2023 at 09:22:50PM -0700, Darrick J. Wong wrote: > > > On Fri, Oct 06, 2023 at 08:27:54AM +1100, Dave Chinner wrote: > > > > On Thu, Oct 05, 2023 at 10:37:34AM +0200, Daan De Meyer wrote: > > > > > Hi, > > > > > > > > > > It seems using --protofile ignores any extended attributes set on > > > > > source files. I would like to generate an XFS filesystem using > > > > > --protofile where extended attributes are copied from the source files > > > > > into the generated filesystem. Any way to make this happen with > > > > > --protofile? > > > > > > > > mkfs.xfs doesn't have a '--protofile' option. It has a '-p <file>' > > > > option for specifying a protofile - is that what you mean? > > > > > > While we're on the topic, would it also be useful to have a -p switch > > > that would copy the fsxattr options as well? > > > > If protofile support is going to be extended then supporting > > everything that can be read/set through generic kernel interfaces > > would be appropriate... > > > > But I'm not convinced that we should extend protofile support > > because mounting the filesytsem and running rsync, xfs_restore, etc > > can already do all this stuffi with no development work necessary... > > rsync doesn't support copying the fsxattr data (though it does support > extended attributes), and iirc xfsdump can only do entire filesystems, > right? > > --D > > > Cheers, > > > > Dave. > > -- > > Dave Chinner > > david@fromorbit.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mkfs.xfs with --protofile does not copy extended attributes into the generated filesystem 2023-10-06 7:24 ` Daan De Meyer @ 2023-10-06 18:57 ` Darrick J. Wong 2023-10-09 9:59 ` Daan De Meyer 0 siblings, 1 reply; 8+ messages in thread From: Darrick J. Wong @ 2023-10-06 18:57 UTC (permalink / raw) To: Daan De Meyer; +Cc: Dave Chinner, linux-xfs On Fri, Oct 06, 2023 at 09:24:50AM +0200, Daan De Meyer wrote: > On Fri, Oct 06, 2023 at 03:36:05PM +1100, Dave Chinner wrote: > > On Thu, Oct 05, 2023 at 09:22:50PM -0700, Darrick J. Wong wrote: > > > On Fri, Oct 06, 2023 at 08:27:54AM +1100, Dave Chinner wrote: > > > > On Thu, Oct 05, 2023 at 10:37:34AM +0200, Daan De Meyer wrote: > > > > > Hi, > > > > > > > > > > It seems using --protofile ignores any extended attributes set on > > > > > source files. I would like to generate an XFS filesystem using > > > > > --protofile where extended attributes are copied from the source files > > > > > into the generated filesystem. Any way to make this happen with > > > > > --protofile? > > > > > > > > mkfs.xfs doesn't have a '--protofile' option. It has a '-p <file>' > > > > option for specifying a protofile - is that what you mean? > > > > > > While we're on the topic, would it also be useful to have a -p switch > > > that would copy the fsxattr options as well? > > > > If protofile support is going to be extended then supporting > > everything that can be read/set through generic kernel interfaces > > would be appropriate... > > > > But I'm not convinced that we should extend protofile support > > because mounting the filesytsem and running rsync, xfs_restore, etc > > can already do all this stuffi with no development work necessary... > > > rsync doesn't support copying the fsxattr data (though it does support > > extended attributes), and iirc xfsdump can only do entire filesystems, > > right? > > Additionally, when populating the filesystem in a regular file, to mount it > we need loop devices and we need to be root. Both of which we want to > avoid. So having an option to do this without mounting the filesystem like > ext4 and btrfs have would be very useful. It doesn't have to be via '-p', I'm > fine with a -d or --rootdir option like the ones that ext4 and btrfs > have as well. <shrug> How about libguestfs then? --D > Cheers, > > Daan > > On Fri, 6 Oct 2023 at 07:04, Darrick J. Wong <djwong@kernel.org> wrote: > > > > On Fri, Oct 06, 2023 at 03:36:05PM +1100, Dave Chinner wrote: > > > On Thu, Oct 05, 2023 at 09:22:50PM -0700, Darrick J. Wong wrote: > > > > On Fri, Oct 06, 2023 at 08:27:54AM +1100, Dave Chinner wrote: > > > > > On Thu, Oct 05, 2023 at 10:37:34AM +0200, Daan De Meyer wrote: > > > > > > Hi, > > > > > > > > > > > > It seems using --protofile ignores any extended attributes set on > > > > > > source files. I would like to generate an XFS filesystem using > > > > > > --protofile where extended attributes are copied from the source files > > > > > > into the generated filesystem. Any way to make this happen with > > > > > > --protofile? > > > > > > > > > > mkfs.xfs doesn't have a '--protofile' option. It has a '-p <file>' > > > > > option for specifying a protofile - is that what you mean? > > > > > > > > While we're on the topic, would it also be useful to have a -p switch > > > > that would copy the fsxattr options as well? > > > > > > If protofile support is going to be extended then supporting > > > everything that can be read/set through generic kernel interfaces > > > would be appropriate... > > > > > > But I'm not convinced that we should extend protofile support > > > because mounting the filesytsem and running rsync, xfs_restore, etc > > > can already do all this stuffi with no development work necessary... > > > > rsync doesn't support copying the fsxattr data (though it does support > > extended attributes), and iirc xfsdump can only do entire filesystems, > > right? > > > > --D > > > > > Cheers, > > > > > > Dave. > > > -- > > > Dave Chinner > > > david@fromorbit.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mkfs.xfs with --protofile does not copy extended attributes into the generated filesystem 2023-10-06 18:57 ` Darrick J. Wong @ 2023-10-09 9:59 ` Daan De Meyer 0 siblings, 0 replies; 8+ messages in thread From: Daan De Meyer @ 2023-10-09 9:59 UTC (permalink / raw) To: Darrick J. Wong; +Cc: Dave Chinner, linux-xfs Using a virtual machine under the hood to get around these limitations isn't really an option either. Like I said, this works perfectly fine if the filesystem's mkfs tool supports populating the filesystem from a given directory (and btrfs, ext4 already support this with xattrs and everything). It even works fine with XFS's -p option already, except when you try to build an image with SELinux enabled as all the SELinux xattrs are stripped. I would just like to not have to tell my users to use another filesystem than XFS when they would like to build images with SELinux enabled unprivileged. Cheers, Daan On Fri, 6 Oct 2023 at 20:57, Darrick J. Wong <djwong@kernel.org> wrote: > > On Fri, Oct 06, 2023 at 09:24:50AM +0200, Daan De Meyer wrote: > > On Fri, Oct 06, 2023 at 03:36:05PM +1100, Dave Chinner wrote: > > > On Thu, Oct 05, 2023 at 09:22:50PM -0700, Darrick J. Wong wrote: > > > > On Fri, Oct 06, 2023 at 08:27:54AM +1100, Dave Chinner wrote: > > > > > On Thu, Oct 05, 2023 at 10:37:34AM +0200, Daan De Meyer wrote: > > > > > > Hi, > > > > > > > > > > > > It seems using --protofile ignores any extended attributes set on > > > > > > source files. I would like to generate an XFS filesystem using > > > > > > --protofile where extended attributes are copied from the source files > > > > > > into the generated filesystem. Any way to make this happen with > > > > > > --protofile? > > > > > > > > > > mkfs.xfs doesn't have a '--protofile' option. It has a '-p <file>' > > > > > option for specifying a protofile - is that what you mean? > > > > > > > > While we're on the topic, would it also be useful to have a -p switch > > > > that would copy the fsxattr options as well? > > > > > > If protofile support is going to be extended then supporting > > > everything that can be read/set through generic kernel interfaces > > > would be appropriate... > > > > > > But I'm not convinced that we should extend protofile support > > > because mounting the filesytsem and running rsync, xfs_restore, etc > > > can already do all this stuffi with no development work necessary... > > > > > rsync doesn't support copying the fsxattr data (though it does support > > > extended attributes), and iirc xfsdump can only do entire filesystems, > > > right? > > > > Additionally, when populating the filesystem in a regular file, to mount it > > we need loop devices and we need to be root. Both of which we want to > > avoid. So having an option to do this without mounting the filesystem like > > ext4 and btrfs have would be very useful. It doesn't have to be via '-p', I'm > > fine with a -d or --rootdir option like the ones that ext4 and btrfs > > have as well. > > <shrug> How about libguestfs then? > > --D > > > Cheers, > > > > Daan > > > > On Fri, 6 Oct 2023 at 07:04, Darrick J. Wong <djwong@kernel.org> wrote: > > > > > > On Fri, Oct 06, 2023 at 03:36:05PM +1100, Dave Chinner wrote: > > > > On Thu, Oct 05, 2023 at 09:22:50PM -0700, Darrick J. Wong wrote: > > > > > On Fri, Oct 06, 2023 at 08:27:54AM +1100, Dave Chinner wrote: > > > > > > On Thu, Oct 05, 2023 at 10:37:34AM +0200, Daan De Meyer wrote: > > > > > > > Hi, > > > > > > > > > > > > > > It seems using --protofile ignores any extended attributes set on > > > > > > > source files. I would like to generate an XFS filesystem using > > > > > > > --protofile where extended attributes are copied from the source files > > > > > > > into the generated filesystem. Any way to make this happen with > > > > > > > --protofile? > > > > > > > > > > > > mkfs.xfs doesn't have a '--protofile' option. It has a '-p <file>' > > > > > > option for specifying a protofile - is that what you mean? > > > > > > > > > > While we're on the topic, would it also be useful to have a -p switch > > > > > that would copy the fsxattr options as well? > > > > > > > > If protofile support is going to be extended then supporting > > > > everything that can be read/set through generic kernel interfaces > > > > would be appropriate... > > > > > > > > But I'm not convinced that we should extend protofile support > > > > because mounting the filesytsem and running rsync, xfs_restore, etc > > > > can already do all this stuffi with no development work necessary... > > > > > > rsync doesn't support copying the fsxattr data (though it does support > > > extended attributes), and iirc xfsdump can only do entire filesystems, > > > right? > > > > > > --D > > > > > > > Cheers, > > > > > > > > Dave. > > > > -- > > > > Dave Chinner > > > > david@fromorbit.com ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-10-09 9:59 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-10-05 8:37 mkfs.xfs with --protofile does not copy extended attributes into the generated filesystem Daan De Meyer 2023-10-05 21:27 ` Dave Chinner 2023-10-06 4:22 ` Darrick J. Wong 2023-10-06 4:36 ` Dave Chinner 2023-10-06 5:04 ` Darrick J. Wong 2023-10-06 7:24 ` Daan De Meyer 2023-10-06 18:57 ` Darrick J. Wong 2023-10-09 9:59 ` Daan De Meyer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox