From owner-svn-src-all@FreeBSD.ORG Wed Dec 11 19:30:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8590A3BE; Wed, 11 Dec 2013 19:30:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7098F1FB1; Wed, 11 Dec 2013 19:30:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBBJUSrQ015482; Wed, 11 Dec 2013 19:30:28 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBBJURC4015474; Wed, 11 Dec 2013 19:30:27 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201312111930.rBBJURC4015474@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 11 Dec 2013 19:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r259226 - in stable/8: sbin/fsck_ffs sbin/growfs sys/ufs/ffs sys/ufs/ufs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Dec 2013 19:30:28 -0000 Author: pfg Date: Wed Dec 11 19:30:27 2013 New Revision: 259226 URL: http://svnweb.freebsd.org/changeset/base/259226 Log: MFC r256448, r257029; Make di_blocks unsigned in UFS1 as is the case already for UFS2. Most of the code between UFS1 and UFS2 is shared so this change is pretty safe. Not only this makes UFS1 and 2 consistent but it also matches what NetBSD and MacOS X have for some years now. 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 Modified: stable/8/sbin/fsck_ffs/ea.c stable/8/sbin/growfs/debug.c stable/8/sys/ufs/ffs/ffs_vnops.c stable/8/sys/ufs/ufs/dinode.h Directory Properties: stable/8/ (props changed) stable/8/sbin/ (props changed) stable/8/sbin/fsck_ffs/ (props changed) stable/8/sbin/growfs/ (props changed) stable/8/sys/ (props changed) stable/8/sys/fs/ (props changed) stable/8/sys/ufs/ (props changed) Modified: stable/8/sbin/fsck_ffs/ea.c ============================================================================== --- stable/8/sbin/fsck_ffs/ea.c Wed Dec 11 19:26:56 2013 (r259225) +++ stable/8/sbin/fsck_ffs/ea.c Wed Dec 11 19:30:27 2013 (r259226) @@ -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: stable/8/sbin/growfs/debug.c ============================================================================== --- stable/8/sbin/growfs/debug.c Wed Dec 11 19:26:56 2013 (r259225) +++ stable/8/sbin/growfs/debug.c Wed Dec 11 19:30:27 2013 (r259226) @@ -798,7 +798,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: stable/8/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- stable/8/sys/ufs/ffs/ffs_vnops.c Wed Dec 11 19:26:56 2013 (r259225) +++ stable/8/sys/ufs/ffs/ffs_vnops.c Wed Dec 11 19:30:27 2013 (r259226) @@ -539,7 +539,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(vp, lbn, size, &nextlbn, &nextsize, 1, NOCRED, &bp); } else { @@ -938,7 +938,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, @@ -1201,7 +1201,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: stable/8/sys/ufs/ufs/dinode.h ============================================================================== --- stable/8/sys/ufs/ufs/dinode.h Wed Dec 11 19:26:56 2013 (r259225) +++ stable/8/sys/ufs/ufs/dinode.h Wed Dec 11 19:30:27 2013 (r259226) @@ -141,7 +141,7 @@ struct ufs2_dinode { 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. */ @@ -180,7 +180,7 @@ struct ufs1_dinode { ufs1_daddr_t di_db[NDADDR]; /* 40: Direct disk blocks. */ 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. */ + u_int32_t di_blocks; /* 104: Blocks actually held. */ int32_t di_gen; /* 108: Generation number. */ u_int32_t di_uid; /* 112: File owner. */ u_int32_t di_gid; /* 116: File group. */