mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Clean vattr_t and vsecattr_t types
Minor cleanup for the vattr_t and vsecattr_t types.
This commit is contained in:
parent
1b439713f1
commit
dcd9cb5a17
@ -121,18 +121,18 @@ typedef struct vattr {
|
||||
enum vtype va_type; /* vnode type */
|
||||
u_int va_mask; /* attribute bit-mask */
|
||||
u_short va_mode; /* acc mode */
|
||||
short va_uid; /* owner uid */
|
||||
short va_gid; /* owner gid */
|
||||
uid_t va_uid; /* owner uid */
|
||||
gid_t va_gid; /* owner gid */
|
||||
long va_fsid; /* fs id */
|
||||
long va_nodeid; /* node # */
|
||||
short va_nlink; /* # links */
|
||||
u_long va_size; /* file size */
|
||||
long va_blocksize; /* block size */
|
||||
struct timeval va_atime; /* last acc */
|
||||
struct timeval va_mtime; /* last mod */
|
||||
struct timeval va_ctime; /* last chg */
|
||||
uint32_t va_nlink; /* # links */
|
||||
uint64_t va_size; /* file size */
|
||||
uint32_t va_blocksize; /* block size */
|
||||
uint64_t va_nblocks; /* space used */
|
||||
struct timespec va_atime; /* last acc */
|
||||
struct timespec va_mtime; /* last mod */
|
||||
struct timespec va_ctime; /* last chg */
|
||||
dev_t va_rdev; /* dev */
|
||||
long va_blocks; /* space used */
|
||||
} vattr_t;
|
||||
|
||||
typedef struct xoptattr {
|
||||
@ -168,6 +168,7 @@ typedef struct vsecattr {
|
||||
int vsa_dfaclcnt; /* default ACL entry count */
|
||||
void *vsa_dfaclentp; /* pointer to default ACL entries */
|
||||
size_t vsa_aclentsz; /* ACE size in bytes of vsa_aclentp */
|
||||
uint_t vsa_aclflags; /* ACE ACL flags */
|
||||
} vsecattr_t;
|
||||
|
||||
typedef struct vnode {
|
||||
|
@ -454,7 +454,7 @@ int
|
||||
vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4)
|
||||
{
|
||||
struct file *fp;
|
||||
struct kstat stat;
|
||||
struct kstat stat;
|
||||
int rc;
|
||||
SENTRY;
|
||||
|
||||
@ -477,16 +477,13 @@ vn_getattr(vnode_t *vp, vattr_t *vap, int flags, void *x3, void *x4)
|
||||
vap->va_nlink = stat.nlink;
|
||||
vap->va_size = stat.size;
|
||||
vap->va_blocksize = stat.blksize;
|
||||
vap->va_atime.tv_sec = stat.atime.tv_sec;
|
||||
vap->va_atime.tv_usec = stat.atime.tv_nsec / NSEC_PER_USEC;
|
||||
vap->va_mtime.tv_sec = stat.mtime.tv_sec;
|
||||
vap->va_mtime.tv_usec = stat.mtime.tv_nsec / NSEC_PER_USEC;
|
||||
vap->va_ctime.tv_sec = stat.ctime.tv_sec;
|
||||
vap->va_ctime.tv_usec = stat.ctime.tv_nsec / NSEC_PER_USEC;
|
||||
vap->va_atime = stat.atime;
|
||||
vap->va_mtime = stat.mtime;
|
||||
vap->va_ctime = stat.ctime;
|
||||
vap->va_rdev = stat.rdev;
|
||||
vap->va_blocks = stat.blocks;
|
||||
vap->va_nblocks = stat.blocks;
|
||||
|
||||
SRETURN(0);
|
||||
SRETURN(0);
|
||||
}
|
||||
EXPORT_SYMBOL(vn_getattr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user