mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Remove znode's z_uid/z_gid member
Remove duplicate z_uid/z_gid member which are also held in the generic vfs inode struct. This is done by first removing the members from struct znode and then using the KUID_TO_SUID/KGID_TO_SGID macros to access the respective member from struct inode. In cases where the uid/gids are being marshalled from/to disk, use the newly introduced zfs_(uid|gid)_(read|write) functions to properly save the uids rather than the internal kernel representation. Signed-off-by: Nikolay Borisov <n.borisov.lkml@gmail.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #4685 Issue #227
This commit is contained in:
committed by
Brian Behlendorf
parent
82a1b2d628
commit
2c6abf15ff
+16
-15
@@ -31,6 +31,7 @@
|
||||
#define _TRACE_ACL_H
|
||||
|
||||
#include <linux/tracepoint.h>
|
||||
#include <linux/vfs_compat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
@@ -56,8 +57,6 @@ DECLARE_EVENT_CLASS(zfs_ace_class,
|
||||
__field(uint64_t, z_mapcnt)
|
||||
__field(uint64_t, z_size)
|
||||
__field(uint64_t, z_pflags)
|
||||
__field(uint64_t, z_uid)
|
||||
__field(uint64_t, z_gid)
|
||||
__field(uint32_t, z_sync_cnt)
|
||||
__field(mode_t, z_mode)
|
||||
__field(boolean_t, z_is_sa)
|
||||
@@ -65,6 +64,8 @@ DECLARE_EVENT_CLASS(zfs_ace_class,
|
||||
__field(boolean_t, z_is_ctldir)
|
||||
__field(boolean_t, z_is_stale)
|
||||
|
||||
__field(uint32_t, i_uid)
|
||||
__field(uint32_t, i_gid)
|
||||
__field(unsigned long, i_ino)
|
||||
__field(unsigned int, i_nlink)
|
||||
__field(u64, i_version)
|
||||
@@ -91,8 +92,6 @@ DECLARE_EVENT_CLASS(zfs_ace_class,
|
||||
__entry->z_mapcnt = zn->z_mapcnt;
|
||||
__entry->z_size = zn->z_size;
|
||||
__entry->z_pflags = zn->z_pflags;
|
||||
__entry->z_uid = zn->z_uid;
|
||||
__entry->z_gid = zn->z_gid;
|
||||
__entry->z_sync_cnt = zn->z_sync_cnt;
|
||||
__entry->z_mode = zn->z_mode;
|
||||
__entry->z_is_sa = zn->z_is_sa;
|
||||
@@ -100,6 +99,8 @@ DECLARE_EVENT_CLASS(zfs_ace_class,
|
||||
__entry->z_is_ctldir = zn->z_is_ctldir;
|
||||
__entry->z_is_stale = zn->z_is_stale;
|
||||
|
||||
__entry->i_uid = zfs_uid_read(ZTOI(zn));
|
||||
__entry->i_gid = zfs_gid_read(ZTOI(zn));
|
||||
__entry->i_ino = zn->z_inode.i_ino;
|
||||
__entry->i_nlink = zn->z_inode.i_nlink;
|
||||
__entry->i_version = zn->z_inode.i_version;
|
||||
@@ -118,22 +119,22 @@ DECLARE_EVENT_CLASS(zfs_ace_class,
|
||||
TP_printk("zn { id %llu unlinked %u atime_dirty %u "
|
||||
"zn_prefetch %u moved %u blksz %u seq %u "
|
||||
"mapcnt %llu size %llu pflags %llu "
|
||||
"uid %llu gid %llu sync_cnt %u mode 0x%x is_sa %d "
|
||||
"sync_cnt %u mode 0x%x is_sa %d "
|
||||
"is_mapped %d is_ctldir %d is_stale %d inode { "
|
||||
"ino %lu nlink %u version %llu size %lli blkbits %u "
|
||||
"bytes %u mode 0x%x generation %x } } ace { type %u "
|
||||
"flags %u access_mask %u } mask_matched %u",
|
||||
"uid %u gid %u ino %lu nlink %u version %llu size %lli "
|
||||
"blkbits %u bytes %u mode 0x%x generation %x } } "
|
||||
"ace { type %u flags %u access_mask %u } mask_matched %u",
|
||||
__entry->z_id, __entry->z_unlinked, __entry->z_atime_dirty,
|
||||
__entry->z_zn_prefetch, __entry->z_moved, __entry->z_blksz,
|
||||
__entry->z_seq, __entry->z_mapcnt, __entry->z_size,
|
||||
__entry->z_pflags, __entry->z_uid,
|
||||
__entry->z_gid, __entry->z_sync_cnt, __entry->z_mode,
|
||||
__entry->z_pflags, __entry->z_sync_cnt, __entry->z_mode,
|
||||
__entry->z_is_sa, __entry->z_is_mapped,
|
||||
__entry->z_is_ctldir, __entry->z_is_stale, __entry->i_ino,
|
||||
__entry->i_nlink, __entry->i_version, __entry->i_size,
|
||||
__entry->i_blkbits, __entry->i_bytes, __entry->i_mode,
|
||||
__entry->i_generation, __entry->z_type, __entry->z_flags,
|
||||
__entry->z_access_mask, __entry->mask_matched)
|
||||
__entry->z_is_ctldir, __entry->z_is_stale, __entry->i_uid,
|
||||
__entry->i_gid, __entry->i_ino, __entry->i_nlink,
|
||||
__entry->i_version, __entry->i_size, __entry->i_blkbits,
|
||||
__entry->i_bytes, __entry->i_mode, __entry->i_generation,
|
||||
__entry->z_type, __entry->z_flags, __entry->z_access_mask,
|
||||
__entry->mask_matched)
|
||||
);
|
||||
|
||||
#define DEFINE_ACE_EVENT(name) \
|
||||
|
||||
@@ -188,8 +188,6 @@ typedef struct znode {
|
||||
uint64_t z_dnodesize; /* dnode size */
|
||||
uint64_t z_size; /* file size (cached) */
|
||||
uint64_t z_pflags; /* pflags (cached) */
|
||||
uint64_t z_uid; /* uid fuid (cached) */
|
||||
uint64_t z_gid; /* gid fuid (cached) */
|
||||
uint32_t z_sync_cnt; /* synchronous open count */
|
||||
mode_t z_mode; /* mode (cached) */
|
||||
kmutex_t z_acl_lock; /* acl data lock */
|
||||
|
||||
Reference in New Issue
Block a user