svn commit: r254152 - stable/9/sys/ufs/ufs
Pedro F. Giffuni
pfg at FreeBSD.org
Fri Aug 9 17:52:57 UTC 2013
Author: pfg
Date: Fri Aug 9 17:52:56 2013
New Revision: 254152
URL: http://svnweb.freebsd.org/changeset/base/254152
Log:
MFC r252435, r252437, r253163:
Change i_gen in UFS to an unsigned type.
In UFS, i_gen is a random generated value and there is not way for
it to be negative. Actually, the value of i_gen is just used to
match bit patterns and it is of no consequence if the values are
signed or not. Following other filesystems, set it to unsigned,
Calculation for older filesystems remains untouched.
Modified:
stable/9/sys/ufs/ufs/dinode.h
stable/9/sys/ufs/ufs/inode.h
stable/9/sys/ufs/ufs/ufs_extattr.c
Directory Properties:
stable/9/sys/ (props changed)
Modified: stable/9/sys/ufs/ufs/dinode.h
==============================================================================
--- stable/9/sys/ufs/ufs/dinode.h Fri Aug 9 17:24:23 2013 (r254151)
+++ stable/9/sys/ufs/ufs/dinode.h Fri Aug 9 17:52:56 2013 (r254152)
@@ -138,7 +138,7 @@ struct ufs2_dinode {
int32_t di_atimensec; /* 68: Last access time. */
int32_t di_ctimensec; /* 72: Last inode change time. */
int32_t di_birthnsec; /* 76: Inode creation time. */
- int32_t di_gen; /* 80: Generation number. */
+ u_int32_t di_gen; /* 80: Generation number. */
u_int32_t di_kernflags; /* 84: Kernel flags. */
u_int32_t di_flags; /* 88: Status flags (chflags). */
int32_t di_extsize; /* 92: External attributes block. */
@@ -180,7 +180,7 @@ struct ufs1_dinode {
ufs1_daddr_t di_ib[NIADDR]; /* 88: Indirect disk blocks. */
u_int32_t di_flags; /* 100: Status flags (chflags). */
int32_t di_blocks; /* 104: Blocks actually held. */
- int32_t di_gen; /* 108: Generation number. */
+ u_int32_t di_gen; /* 108: Generation number. */
u_int32_t di_uid; /* 112: File owner. */
u_int32_t di_gid; /* 116: File group. */
u_int64_t di_modrev; /* 120: i_modrev for NFSv4 */
Modified: stable/9/sys/ufs/ufs/inode.h
==============================================================================
--- stable/9/sys/ufs/ufs/inode.h Fri Aug 9 17:24:23 2013 (r254151)
+++ stable/9/sys/ufs/ufs/inode.h Fri Aug 9 17:52:56 2013 (r254152)
@@ -102,7 +102,7 @@ struct inode {
int16_t i_nlink; /* File link count. */
u_int64_t i_size; /* File byte count. */
u_int32_t i_flags; /* Status flags (chflags). */
- int64_t i_gen; /* Generation number. */
+ u_int64_t i_gen; /* Generation number. */
u_int32_t i_uid; /* File owner. */
u_int32_t i_gid; /* File group. */
/*
@@ -180,7 +180,7 @@ struct ufid {
u_int16_t ufid_len; /* Length of structure. */
u_int16_t ufid_pad; /* Force 32-bit alignment. */
ino_t ufid_ino; /* File number (ino). */
- int32_t ufid_gen; /* Generation number. */
+ uint32_t ufid_gen; /* Generation number. */
};
#endif /* _KERNEL */
Modified: stable/9/sys/ufs/ufs/ufs_extattr.c
==============================================================================
--- stable/9/sys/ufs/ufs/ufs_extattr.c Fri Aug 9 17:24:23 2013 (r254151)
+++ stable/9/sys/ufs/ufs/ufs_extattr.c Fri Aug 9 17:52:56 2013 (r254152)
@@ -932,8 +932,8 @@ ufs_extattr_get(struct vnode *vp, int at
* is to coerce this to undefined, and let it get cleaned
* up by the next write or extattrctl clean.
*/
- printf("ufs_extattr_get (%s): inode number inconsistency (%d, %jd)\n",
- mp->mnt_stat.f_mntonname, ueh.ueh_i_gen, (intmax_t)ip->i_gen);
+ printf("ufs_extattr_get (%s): inode number inconsistency (%d, %ju)\n",
+ mp->mnt_stat.f_mntonname, ueh.ueh_i_gen, (uintmax_t)ip->i_gen);
error = ENOATTR;
goto vopunlock_exit;
}
More information about the svn-src-stable-9
mailing list