mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Linux 6.17 compat: Fix broken projectquota on 6.17
We need to specifically use the FX_XFLAG_* macros in zpl_ioctl_*attr() codepaths, and the FS_*_FL macros in the zpl_ioctl_*flags() codepaths. The earlier code just assumes the FS_*_FL macros for both codepaths. The 6.17 kernel add a bitmask check in copy_fsxattr_from_user() that exposed this error via failing 'projectquota' ZTS tests. Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #17884 Closes #17869
This commit is contained in:
@@ -34,18 +34,16 @@
|
||||
|
||||
#include <sys/vfs.h>
|
||||
|
||||
#ifdef FS_PROJINHERIT_FL
|
||||
#define ZFS_PROJINHERIT_FL FS_PROJINHERIT_FL
|
||||
#else
|
||||
#define ZFS_PROJINHERIT_FL 0x20000000
|
||||
#endif
|
||||
|
||||
#ifdef FS_IOC_FSGETXATTR
|
||||
typedef struct fsxattr zfsxattr_t;
|
||||
|
||||
#define ZFS_IOC_FSGETXATTR FS_IOC_FSGETXATTR
|
||||
#define ZFS_IOC_FSSETXATTR FS_IOC_FSSETXATTR
|
||||
#else
|
||||
/* Non-Linux OS */
|
||||
#define FS_PROJINHERIT_FL 0x20000000
|
||||
#define FS_XFLAG_PROJINHERIT FS_PROJINHERIT_FL
|
||||
|
||||
struct zfsxattr {
|
||||
uint32_t fsx_xflags; /* xflags field value (get/set) */
|
||||
uint32_t fsx_extsize; /* extsize field value (get/set) */
|
||||
|
||||
Reference in New Issue
Block a user