mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Linux 6.3 compat: idmapped mount API changes
Linux kernel 6.3 changed a bunch of APIs to use the dedicated idmap type for mounts (struct mnt_idmap), we need to detect these changes and make zfs work with the new APIs. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Youzhong Yang <yyang@mathworks.com> Closes #14682
This commit is contained in:
@@ -1619,7 +1619,7 @@ zfs_acl_inherit(zfsvfs_t *zfsvfs, vtype_t vtype, zfs_acl_t *paclp,
|
||||
*/
|
||||
int
|
||||
zfs_acl_ids_create(znode_t *dzp, int flag, vattr_t *vap, cred_t *cr,
|
||||
vsecattr_t *vsecp, zfs_acl_ids_t *acl_ids, zuserns_t *mnt_ns)
|
||||
vsecattr_t *vsecp, zfs_acl_ids_t *acl_ids, zidmap_t *mnt_ns)
|
||||
{
|
||||
int error;
|
||||
zfsvfs_t *zfsvfs = dzp->z_zfsvfs;
|
||||
@@ -2341,7 +2341,7 @@ zfs_fastaccesschk_execute(znode_t *zdp, cred_t *cr)
|
||||
*/
|
||||
int
|
||||
zfs_zaccess(znode_t *zp, int mode, int flags, boolean_t skipaclchk, cred_t *cr,
|
||||
zuserns_t *mnt_ns)
|
||||
zidmap_t *mnt_ns)
|
||||
{
|
||||
uint32_t working_mode;
|
||||
int error;
|
||||
@@ -2471,7 +2471,7 @@ zfs_zaccess(znode_t *zp, int mode, int flags, boolean_t skipaclchk, cred_t *cr,
|
||||
*/
|
||||
int
|
||||
zfs_zaccess_rwx(znode_t *zp, mode_t mode, int flags, cred_t *cr,
|
||||
zuserns_t *mnt_ns)
|
||||
zidmap_t *mnt_ns)
|
||||
{
|
||||
return (zfs_zaccess(zp, zfs_unix_to_v4(mode >> 6), flags, B_FALSE, cr,
|
||||
mnt_ns));
|
||||
@@ -2541,7 +2541,7 @@ zfs_delete_final_check(znode_t *zp, znode_t *dzp,
|
||||
*
|
||||
*/
|
||||
int
|
||||
zfs_zaccess_delete(znode_t *dzp, znode_t *zp, cred_t *cr, zuserns_t *mnt_ns)
|
||||
zfs_zaccess_delete(znode_t *dzp, znode_t *zp, cred_t *cr, zidmap_t *mnt_ns)
|
||||
{
|
||||
uint32_t dzp_working_mode = 0;
|
||||
uint32_t zp_working_mode = 0;
|
||||
@@ -2628,7 +2628,7 @@ zfs_zaccess_delete(znode_t *dzp, znode_t *zp, cred_t *cr, zuserns_t *mnt_ns)
|
||||
|
||||
int
|
||||
zfs_zaccess_rename(znode_t *sdzp, znode_t *szp, znode_t *tdzp,
|
||||
znode_t *tzp, cred_t *cr, zuserns_t *mnt_ns)
|
||||
znode_t *tzp, cred_t *cr, zidmap_t *mnt_ns)
|
||||
{
|
||||
int add_perm;
|
||||
int error;
|
||||
|
||||
@@ -1053,7 +1053,7 @@ zfs_lookup(vnode_t *dvp, const char *nm, vnode_t **vpp,
|
||||
*/
|
||||
int
|
||||
zfs_create(znode_t *dzp, const char *name, vattr_t *vap, int excl, int mode,
|
||||
znode_t **zpp, cred_t *cr, int flag, vsecattr_t *vsecp, zuserns_t *mnt_ns)
|
||||
znode_t **zpp, cred_t *cr, int flag, vsecattr_t *vsecp, zidmap_t *mnt_ns)
|
||||
{
|
||||
(void) excl, (void) mode, (void) flag;
|
||||
znode_t *zp;
|
||||
@@ -1405,7 +1405,7 @@ zfs_remove(znode_t *dzp, const char *name, cred_t *cr, int flags)
|
||||
*/
|
||||
int
|
||||
zfs_mkdir(znode_t *dzp, const char *dirname, vattr_t *vap, znode_t **zpp,
|
||||
cred_t *cr, int flags, vsecattr_t *vsecp, zuserns_t *mnt_ns)
|
||||
cred_t *cr, int flags, vsecattr_t *vsecp, zidmap_t *mnt_ns)
|
||||
{
|
||||
(void) flags, (void) vsecp;
|
||||
znode_t *zp;
|
||||
@@ -2159,7 +2159,7 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr)
|
||||
* vp - ctime updated, mtime updated if size changed.
|
||||
*/
|
||||
int
|
||||
zfs_setattr(znode_t *zp, vattr_t *vap, int flags, cred_t *cr, zuserns_t *mnt_ns)
|
||||
zfs_setattr(znode_t *zp, vattr_t *vap, int flags, cred_t *cr, zidmap_t *mnt_ns)
|
||||
{
|
||||
vnode_t *vp = ZTOV(zp);
|
||||
zfsvfs_t *zfsvfs = zp->z_zfsvfs;
|
||||
@@ -3420,7 +3420,7 @@ out:
|
||||
|
||||
int
|
||||
zfs_rename(znode_t *sdzp, const char *sname, znode_t *tdzp, const char *tname,
|
||||
cred_t *cr, int flags, uint64_t rflags, vattr_t *wo_vap, zuserns_t *mnt_ns)
|
||||
cred_t *cr, int flags, uint64_t rflags, vattr_t *wo_vap, zidmap_t *mnt_ns)
|
||||
{
|
||||
struct componentname scn, tcn;
|
||||
vnode_t *sdvp, *tdvp;
|
||||
@@ -3477,7 +3477,7 @@ fail:
|
||||
*/
|
||||
int
|
||||
zfs_symlink(znode_t *dzp, const char *name, vattr_t *vap,
|
||||
const char *link, znode_t **zpp, cred_t *cr, int flags, zuserns_t *mnt_ns)
|
||||
const char *link, znode_t **zpp, cred_t *cr, int flags, zidmap_t *mnt_ns)
|
||||
{
|
||||
(void) flags;
|
||||
znode_t *zp;
|
||||
|
||||
Reference in New Issue
Block a user