diff options
author | Nikolay Borisov <[email protected]> | 2016-05-22 14:15:57 +0300 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-07-25 13:21:49 -0700 |
commit | 2c6abf15ff5bcc979653eef0131f90d4f0fede21 (patch) | |
tree | 29bc74006a16d50335196ccd1e7459b569e48b57 /include/sys/trace_acl.h | |
parent | 82a1b2d6289f9ceae0bee6f1e71d3bc29a8c5d16 (diff) |
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 <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #4685
Issue #227
Diffstat (limited to 'include/sys/trace_acl.h')
-rw-r--r-- | include/sys/trace_acl.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/include/sys/trace_acl.h b/include/sys/trace_acl.h index db4334951..bd19c5a16 100644 --- a/include/sys/trace_acl.h +++ b/include/sys/trace_acl.h @@ -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) \ |