Date: Thu, 24 Oct 2013 00:33:30 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257029 - in head: sbin/fsck_ffs sbin/growfs sys/fs/ext2fs sys/ufs/ffs sys/ufs/ufs Message-ID: <201310240033.r9O0XUKG019579@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Thu Oct 24 00:33:29 2013 New Revision: 257029 URL: http://svnweb.freebsd.org/changeset/base/257029 Log: UFS2: make di_extsize unsigned. di_extsize is the EA size and as such it should be unsigned. Adjust related types for consistency. Reviewed by: mckusick (previous version) MFC after: 3 weeks Modified: head/sbin/fsck_ffs/ea.c head/sbin/growfs/debug.c head/sys/fs/ext2fs/ext2_vnops.c head/sys/ufs/ffs/ffs_vnops.c head/sys/ufs/ufs/dinode.h Modified: head/sbin/fsck_ffs/ea.c ============================================================================== --- head/sbin/fsck_ffs/ea.c Thu Oct 24 00:30:38 2013 (r257028) +++ head/sbin/fsck_ffs/ea.c Thu Oct 24 00:33:29 2013 (r257029) @@ -65,7 +65,7 @@ eascan(struct inodesc *idesc, struct ufs char dbuf[DIRBLKSIZ]; printf("Inode %ju extsize %ju\n", - (intmax_t)idesc->id_number, (intmax_t)dp->di_extsize); + (intmax_t)idesc->id_number, (uintmax_t)dp->di_extsize); if (dp->di_extsize == 0) return 0; if (dp->di_extsize <= sblock.fs_fsize) Modified: head/sbin/growfs/debug.c ============================================================================== --- head/sbin/growfs/debug.c Thu Oct 24 00:30:38 2013 (r257028) +++ head/sbin/growfs/debug.c Thu Oct 24 00:33:29 2013 (r257029) @@ -765,7 +765,7 @@ dbg_dump_ufs2_ino(struct fs *sb, const c fprintf(dbg_log, "gen int32_t 0x%08x\n", ino->di_gen); fprintf(dbg_log, "kernflags u_int32_t 0x%08x\n", ino->di_kernflags); fprintf(dbg_log, "flags u_int32_t 0x%08x\n", ino->di_flags); - fprintf(dbg_log, "extsize int32_t 0x%08x\n", ino->di_extsize); + fprintf(dbg_log, "extsize u_int32_t 0x%08x\n", ino->di_extsize); /* XXX: What do we do with di_extb[NXADDR]? */ Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Thu Oct 24 00:30:38 2013 (r257028) +++ head/sys/fs/ext2fs/ext2_vnops.c Thu Oct 24 00:33:29 2013 (r257029) @@ -1689,7 +1689,7 @@ ext2_ind_read(struct vop_read_args *ap) NOCRED, blkoffset + uio->uio_resid, seqcount, 0, &bp); } else if (seqcount > 1) { - int nextsize = blksize(fs, ip, nextlbn); + u_int nextsize = blksize(fs, ip, nextlbn); error = breadn(vp, lbn, size, &nextlbn, &nextsize, 1, NOCRED, &bp); } else Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Thu Oct 24 00:30:38 2013 (r257028) +++ head/sys/ufs/ffs/ffs_vnops.c Thu Oct 24 00:33:29 2013 (r257029) @@ -531,7 +531,7 @@ ffs_read(ap) * arguments point to arrays of the size specified in * the 6th argument. */ - int nextsize = blksize(fs, ip, nextlbn); + u_int nextsize = blksize(fs, ip, nextlbn); error = breadn_flags(vp, lbn, size, &nextlbn, &nextsize, 1, NOCRED, GB_UNMAPPED, &bp); } else { @@ -956,7 +956,7 @@ ffs_extread(struct vnode *vp, struct uio * arguments point to arrays of the size specified in * the 6th argument. */ - int nextsize = sblksize(fs, dp->di_extsize, nextlbn); + u_int nextsize = sblksize(fs, dp->di_extsize, nextlbn); nextlbn = -1 - nextlbn; error = breadn(vp, -1 - lbn, @@ -1218,7 +1218,8 @@ ffs_rdextattr(u_char **p, struct vnode * struct fs *fs; struct uio luio; struct iovec liovec; - int easize, error; + u_int easize; + int error; u_char *eae; ip = VTOI(vp); Modified: head/sys/ufs/ufs/dinode.h ============================================================================== --- head/sys/ufs/ufs/dinode.h Thu Oct 24 00:30:38 2013 (r257028) +++ head/sys/ufs/ufs/dinode.h Thu Oct 24 00:33:29 2013 (r257029) @@ -141,7 +141,7 @@ struct ufs2_dinode { 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. */ + u_int32_t di_extsize; /* 92: External attributes size. */ ufs2_daddr_t di_extb[NXADDR];/* 96: External attributes block. */ ufs2_daddr_t di_db[NDADDR]; /* 112: Direct disk blocks. */ ufs2_daddr_t di_ib[NIADDR]; /* 208: Indirect disk blocks. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310240033.r9O0XUKG019579>