mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Add inode accessors to common code
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Jorgen Lundman <lundman@lundman.net> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #9389
This commit is contained in:
committed by
Brian Behlendorf
parent
13a4027a7c
commit
6360e2779e
@@ -258,7 +258,15 @@ zfs_inherit_projid(znode_t *dzp)
|
||||
#define ZTOZSB(znode) ((zfsvfs_t *)(ZTOI(znode)->i_sb->s_fs_info))
|
||||
#define ITOZSB(inode) ((zfsvfs_t *)((inode)->i_sb->s_fs_info))
|
||||
|
||||
#define S_ISDEV(mode) (S_ISCHR(mode) || S_ISBLK(mode) || S_ISFIFO(mode))
|
||||
#define ZTOTYPE(zp) (ZTOI(zp)->i_mode)
|
||||
#define ZTOGID(zp) (ZTOI(zp)->i_gid)
|
||||
#define ZTOUID(zp) (ZTOI(zp)->i_uid)
|
||||
#define ZTONLNK(zp) (ZTOI(zp)->i_nlink)
|
||||
|
||||
#define Z_ISBLK(type) S_ISBLK(type)
|
||||
#define Z_ISCHR(type) S_ISCHR(type)
|
||||
#define Z_ISLNK(type) S_ISLNK(type)
|
||||
#define S_ISDEV(type) (S_ISCHR(type) || S_ISBLK(type) || S_ISFIFO(type))
|
||||
|
||||
/* Called on entry to each ZFS inode and vfs operation. */
|
||||
#define ZFS_ENTER_ERROR(zfsvfs, error) \
|
||||
|
||||
Reference in New Issue
Block a user