HomeFreeBSD

Expose additional file level attributes

Description

Expose additional file level attributes

ZFS allows to update and retrieve additional file level attributes for
FreeBSD. This commit allows additional file level attributes to be
updated and retrieved for Linux. These include the flags stored in the
upper half of z_pflags only.

Two new IOCTLs have been added for this purpose. ZFS_IOC_GETDOSFLAGS
can be used to retrieve the attributes, while ZFS_IOC_SETDOSFLAGS can
be used to update the attributes.

Attributes that are allowed to be updated include ZFS_IMMUTABLE,
ZFS_APPENDONLY, ZFS_NOUNLINK, ZFS_ARCHIVE, ZFS_NODUMP, ZFS_SYSTEM,
ZFS_HIDDEN, ZFS_READONLY, ZFS_REPARSE, ZFS_OFFLINE and ZFS_SPARSE.
Flags can be or'd together while calling ZFS_IOC_SETDOSFLAGS.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Closes #13118

Details

Provenance
Umer Saleem <usaleem@ixsystems.com>Authored on Mar 8 2022, 1:52 AM
GitHub <noreply@github.com>Committed on Mar 8 2022, 1:52 AM
Parents
rG9955b9ba2efa: Handle aarch64 defines seperate from arm
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG39a4daf742a4: Expose additional file level attributes (authored by Umer Saleem <usaleem@ixsystems.com>).Mar 8 2022, 1:52 AM