Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Sep 2012 23:30:50 +0000 (UTC)
From:      Matthew D Fleming <mdf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r241011 - in head/sys: fs/ext2fs fs/hpfs fs/ntfs fs/tmpfs kern ufs/ffs ufs/ufs
Message-ID:  <201209272330.q8RNUo6C023767@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mdf
Date: Thu Sep 27 23:30:49 2012
New Revision: 241011
URL: http://svn.freebsd.org/changeset/base/241011

Log:
  Fix up kernel sources to be ready for a 64-bit ino_t.
  
  Original code by:	Gleb Kurtsou

Modified:
  head/sys/fs/ext2fs/ext2_alloc.c
  head/sys/fs/ext2fs/ext2_inode_cnv.c
  head/sys/fs/hpfs/hpfs_vfsops.c
  head/sys/fs/ntfs/ntfs_subr.c
  head/sys/fs/ntfs/ntfs_vfsops.c
  head/sys/fs/ntfs/ntfs_vnops.c
  head/sys/fs/tmpfs/tmpfs_vfsops.c
  head/sys/kern/uipc_usrreq.c
  head/sys/ufs/ffs/ffs_alloc.c
  head/sys/ufs/ffs/ffs_snapshot.c
  head/sys/ufs/ffs/ffs_softdep.c
  head/sys/ufs/ufs/inode.h
  head/sys/ufs/ufs/ufs_acl.c
  head/sys/ufs/ufs/ufs_lookup.c
  head/sys/ufs/ufs/ufs_vnops.c

Modified: head/sys/fs/ext2fs/ext2_alloc.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_alloc.c	Thu Sep 27 22:05:54 2012	(r241010)
+++ head/sys/fs/ext2fs/ext2_alloc.c	Thu Sep 27 23:30:49 2012	(r241011)
@@ -1026,8 +1026,8 @@ ext2_vfree(pvp, ino, mode)
 	fs = pip->i_e2fs;
 	ump = pip->i_ump;
 	if ((u_int)ino > fs->e2fs_ipg * fs->e2fs_gcount)
-		panic("ext2_vfree: range: devvp = %p, ino = %d, fs = %s",
-		    pip->i_devvp, ino, fs->e2fs_fsmnt);
+		panic("ext2_vfree: range: devvp = %p, ino = %ju, fs = %s",
+		    pip->i_devvp, (uintmax_t)ino, fs->e2fs_fsmnt);
 
 	cg = ino_to_cg(fs, ino);
 	error = bread(pip->i_devvp,

Modified: head/sys/fs/ext2fs/ext2_inode_cnv.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_inode_cnv.c	Thu Sep 27 22:05:54 2012	(r241010)
+++ head/sys/fs/ext2fs/ext2_inode_cnv.c	Thu Sep 27 23:30:49 2012	(r241011)
@@ -45,7 +45,7 @@ ext2_print_inode( in )
 {
 	int i;
 
-	printf( "Inode: %5d", in->i_number);
+	printf( "Inode: %5ju", (uintmax_t)in->i_number);
 	printf( /* "Inode: %5d" */
 		" Type: %10s Mode: 0x%o Flags: 0x%x  Version: %d\n",
 		"n/a", in->i_mode, in->i_flags, in->i_gen);

Modified: head/sys/fs/hpfs/hpfs_vfsops.c
==============================================================================
--- head/sys/fs/hpfs/hpfs_vfsops.c	Thu Sep 27 22:05:54 2012	(r241010)
+++ head/sys/fs/hpfs/hpfs_vfsops.c	Thu Sep 27 23:30:49 2012	(r241011)
@@ -512,7 +512,7 @@ hpfs_vget(
 
 	error = bread(hpmp->hpm_devvp, ino, FNODESIZE, NOCRED, &bp);
 	if (error) {
-		printf("hpfs_vget: can't read ino %d\n",ino);
+		printf("hpfs_vget: can't read ino %ju\n", (uintmax_t)ino);
 		vput(vp);
 		return (error);
 	}

Modified: head/sys/fs/ntfs/ntfs_subr.c
==============================================================================
--- head/sys/fs/ntfs/ntfs_subr.c	Thu Sep 27 22:05:54 2012	(r241010)
+++ head/sys/fs/ntfs/ntfs_subr.c	Thu Sep 27 23:30:49 2012	(r241011)
@@ -84,8 +84,8 @@ int
 ntfs_ntvattrrele(vap)
 	struct ntvattr * vap;
 {
-	dprintf(("ntfs_ntvattrrele: ino: %d, type: 0x%x\n",
-		 vap->va_ip->i_number, vap->va_type));
+	dprintf(("ntfs_ntvattrrele: ino: %ju, type: 0x%x\n",
+	    (uintmax_t)vap->va_ip->i_number, vap->va_type));
 
 	ntfs_ntrele(vap->va_ip);
 
@@ -109,12 +109,12 @@ ntfs_findvattr(ntmp, ip, lvapp, vapp, ty
 	struct ntvattr *vap;
 
 	if((ip->i_flag & IN_LOADED) == 0) {
-		dprintf(("ntfs_findvattr: node not loaded, ino: %d\n",
-		       ip->i_number));
+		dprintf(("ntfs_findvattr: node not loaded, ino: %ju\n",
+		    (uintmax_t)ip->i_number));
 		error = ntfs_loadntnode(ntmp,ip);
 		if (error) {
-			printf("ntfs_findvattr: FAILED TO LOAD INO: %d\n",
-			       ip->i_number);
+			printf("ntfs_findvattr: FAILED TO LOAD INO: %ju\n",
+			    (uintmax_t)ip->i_number);
 			return (error);
 		}
 	}
@@ -169,13 +169,13 @@ ntfs_ntvattrget(
 
 	if (name) {
 		dprintf(("ntfs_ntvattrget: " \
-			 "ino: %d, type: 0x%x, name: %s, vcn: %d\n", \
-			 ip->i_number, type, name, (u_int32_t) vcn));
+		    "ino: %ju, type: 0x%x, name: %s, vcn: %d\n", \
+		    (uintmax_t)ip->i_number, type, name, (uint32_t)vcn));
 		namelen = strlen(name);
 	} else {
 		dprintf(("ntfs_ntvattrget: " \
-			 "ino: %d, type: 0x%x, vcn: %d\n", \
-			 ip->i_number, type, (u_int32_t) vcn));
+		    "ino: %ju, type: 0x%x, vcn: %d\n", \
+		    (uintmax_t)ip->i_number, type, (uint32_t)vcn));
 		name = "";
 		namelen = 0;
 	}
@@ -186,8 +186,8 @@ ntfs_ntvattrget(
 
 	if (!lvap) {
 		dprintf(("ntfs_ntvattrget: UNEXISTED ATTRIBUTE: " \
-		       "ino: %d, type: 0x%x, name: %s, vcn: %d\n", \
-		       ip->i_number, type, name, (u_int32_t) vcn));
+		    "ino: %ju, type: 0x%x, name: %s, vcn: %d\n", \
+		    (uintmax_t)ip->i_number, type, name, (uint32_t)vcn));
 		return (ENOENT);
 	}
 	/* Scan $ATTRIBUTE_LIST for requested attribute */
@@ -203,9 +203,9 @@ ntfs_ntvattrget(
 
 	for(; len > 0; aalp = nextaalp) {
 		dprintf(("ntfs_ntvattrget: " \
-			 "attrlist: ino: %d, attr: 0x%x, vcn: %d\n", \
-			 aalp->al_inumber, aalp->al_type, \
-			 (u_int32_t) aalp->al_vcnstart));
+		    "attrlist: ino: %ju, attr: 0x%x, vcn: %d\n", \
+		    (uintmax_t)aalp->al_inumber, aalp->al_type,   \
+		    (uint32_t)aalp->al_vcnstart));
 
 		if (len > aalp->reclen) {
 			nextaalp = NTFS_NEXTREC(aalp, struct attr_attrlist *);
@@ -219,8 +219,8 @@ ntfs_ntvattrget(
 		     NTFS_AALPCMP(nextaalp, type, name, namelen)))
 			continue;
 
-		dprintf(("ntfs_ntvattrget: attribute in ino: %d\n",
-				 aalp->al_inumber));
+		dprintf(("ntfs_ntvattrget: attribute in ino: %ju\n",
+		    (uintmax_t)aalp->al_inumber));
 
 		/* this is not a main record, so we can't use just plain
 		   vget() */
@@ -228,8 +228,8 @@ ntfs_ntvattrget(
 				NTFS_A_DATA, NULL, LK_EXCLUSIVE,
 				VG_EXT, curthread, &newvp);
 		if (error) {
-			printf("ntfs_ntvattrget: CAN'T VGET INO: %d\n",
-			       aalp->al_inumber);
+			printf("ntfs_ntvattrget: CAN'T VGET INO: %ju\n",
+			    (uintmax_t)aalp->al_inumber);
 			goto out;
 		}
 		newip = VTONT(newvp);
@@ -245,8 +245,8 @@ ntfs_ntvattrget(
 	error = ENOENT;
 
 	dprintf(("ntfs_ntvattrget: UNEXISTED ATTRIBUTE: " \
-	       "ino: %d, type: 0x%x, name: %.*s, vcn: %d\n", \
-	       ip->i_number, type, (int) namelen, name, (u_int32_t) vcn));
+	    "ino: %ju, type: 0x%x, name: %.*s, vcn: %d\n", \
+	    (uintmax_t)ip->i_number, type, (int)namelen, name, (uint32_t)vcn));
 out:
 	free(alpool, M_TEMP);
 	return (error);
@@ -268,7 +268,8 @@ ntfs_loadntnode(
 	struct attr    *ap;
 	struct ntvattr *nvap;
 
-	dprintf(("ntfs_loadntnode: loading ino: %d\n",ip->i_number));
+	dprintf(("ntfs_loadntnode: loading ino: %ju\n",
+	    (uintmax_t)ip->i_number));
 
 	mfrp = malloc(ntfs_bntob(ntmp->ntm_bpmftrec),
 	       M_TEMP, M_WAITOK);
@@ -309,12 +310,13 @@ ntfs_loadntnode(
 	error = ntfs_procfixups(ntmp, NTFS_FILEMAGIC, (caddr_t)mfrp,
 				ntfs_bntob(ntmp->ntm_bpmftrec));
 	if (error) {
-		printf("ntfs_loadntnode: BAD MFT RECORD %d\n",
-		       (u_int32_t) ip->i_number);
+		printf("ntfs_loadntnode: BAD MFT RECORD %ju\n",
+		    (uintmax_t)ip->i_number);
 		goto out;
 	}
 
-	dprintf(("ntfs_loadntnode: load attrs for ino: %d\n",ip->i_number));
+	dprintf(("ntfs_loadntnode: load attrs for ino: %ju\n",
+	    (uintmax_t)ip->i_number));
 	off = mfrp->fr_attroff;
 	ap = (struct attr *) ((caddr_t)mfrp + off);
 
@@ -332,8 +334,8 @@ ntfs_loadntnode(
 		ap = (struct attr *) ((caddr_t)mfrp + off);
 	}
 	if (error) {
-		printf("ntfs_loadntnode: failed to load attr ino: %d\n",
-		       ip->i_number);
+		printf("ntfs_loadntnode: failed to load attr ino: %ju\n",
+		    (uintmax_t)ip->i_number);
 		goto out;
 	}
 
@@ -356,8 +358,8 @@ int
 ntfs_ntget(ip)
 	struct ntnode *ip;
 {
-	dprintf(("ntfs_ntget: get ntnode %d: %p, usecount: %d\n",
-		ip->i_number, ip, ip->i_usecount));
+	dprintf(("ntfs_ntget: get ntnode %ju: %p, usecount: %d\n",
+	    (uintmax_t)ip->i_number, ip, ip->i_usecount));
 
 	mtx_lock(&ip->i_interlock);
 	ip->i_usecount++;
@@ -436,16 +438,16 @@ ntfs_ntput(ip)
 {
 	struct ntvattr *vap;
 
-	dprintf(("ntfs_ntput: rele ntnode %d: %p, usecount: %d\n",
-		ip->i_number, ip, ip->i_usecount));
+	dprintf(("ntfs_ntput: rele ntnode %ju: %p, usecount: %d\n",
+	    (uintmax_t)ip->i_number, ip, ip->i_usecount));
 
 	mtx_lock(&ip->i_interlock);
 	ip->i_usecount--;
 
 #ifdef DIAGNOSTIC
 	if (ip->i_usecount < 0) {
-		panic("ntfs_ntput: ino: %d usecount: %d \n",
-		      ip->i_number,ip->i_usecount);
+		panic("ntfs_ntput: ino: %ju usecount: %d \n",
+		    (uintmax_t)ip->i_number, ip->i_usecount);
 	}
 #endif
 
@@ -454,7 +456,8 @@ ntfs_ntput(ip)
 		return;
 	}
 
-	dprintf(("ntfs_ntput: deallocating ntnode: %d\n", ip->i_number));
+	dprintf(("ntfs_ntput: deallocating ntnode: %ju\n",
+	    (uintmax_t)ip->i_number));
 
 	if (LIST_FIRST(&ip->i_fnlist))
 		panic("ntfs_ntput: ntnode has fnodes\n");
@@ -483,9 +486,8 @@ ntfs_ntref(ip)
 	ip->i_usecount++;
 	mtx_unlock(&ip->i_interlock);
 
-	dprintf(("ntfs_ntref: ino %d, usecount: %d\n",
-		ip->i_number, ip->i_usecount));
-			
+	dprintf(("ntfs_ntref: ino %ju, usecount: %d\n",
+	    (uintmax_t)ip->i_number, ip->i_usecount));
 }
 
 /*
@@ -495,15 +497,15 @@ void
 ntfs_ntrele(ip)
 	struct ntnode *ip;
 {
-	dprintf(("ntfs_ntrele: rele ntnode %d: %p, usecount: %d\n",
-		ip->i_number, ip, ip->i_usecount));
+	dprintf(("ntfs_ntrele: rele ntnode %ju: %p, usecount: %d\n",
+	    (uintmax_t)ip->i_number, ip, ip->i_usecount));
 
 	mtx_lock(&ip->i_interlock);
 	ip->i_usecount--;
 
 	if (ip->i_usecount < 0)
-		panic("ntfs_ntrele: ino: %d usecount: %d \n",
-		      ip->i_number,ip->i_usecount);
+		panic("ntfs_ntrele: ino: %ju usecount: %d \n",
+		    (uintmax_t)ip->i_number, ip->i_usecount);
 	mtx_unlock(&ip->i_interlock);
 }
 
@@ -744,8 +746,8 @@ ntfs_fget(
 {
 	struct fnode *fp;
 
-	dprintf(("ntfs_fget: ino: %d, attrtype: 0x%x, attrname: %s\n",
-		ip->i_number,attrtype, attrname?attrname:""));
+	dprintf(("ntfs_fget: ino: %ju, attrtype: 0x%x, attrname: %s\n",
+	    (uintmax_t)ip->i_number, attrtype, attrname ? attrname : ""));
 	*fpp = NULL;
 	LIST_FOREACH(fp, &ip->i_fnlist, f_fnlist){
 		dprintf(("ntfs_fget: fnode: attrtype: %d, attrname: %s\n",
@@ -796,7 +798,8 @@ ntfs_frele(
 {
 	struct ntnode *ip = FTONT(fp);
 
-	dprintf(("ntfs_frele: fnode: %p for %d: %p\n", fp, ip->i_number, ip));
+	dprintf(("ntfs_frele: fnode: %p for %ju: %p\n",
+	    fp, (uintmax_t)ip->i_number, ip));
 
 	dprintf(("ntfs_frele: deallocating fnode\n"));
 	LIST_REMOVE(fp,f_fnlist);
@@ -1126,7 +1129,8 @@ ntfs_ntreaddir(
 	int             error = ENOENT;
 	u_int32_t       aoff, cnum;
 
-	dprintf(("ntfs_ntreaddir: read ino: %d, num: %d\n", ip->i_number, num));
+	dprintf(("ntfs_ntreaddir: read ino: %ju, num: %d\n",
+	    (uintmax_t)ip->i_number, num));
 	error = ntfs_ntget(ip);
 	if (error)
 		return (error);
@@ -1294,7 +1298,7 @@ ntfs_times(
 	struct ntvattr *vap;
 	int             error;
 
-	dprintf(("ntfs_times: ino: %d...\n", ip->i_number));
+	dprintf(("ntfs_times: ino: %ju...\n", (uintmax_t)ip->i_number));
 
 	error = ntfs_ntget(ip);
 	if (error)
@@ -1329,7 +1333,7 @@ ntfs_filesize(
 	u_int64_t       sz, bn;
 	int             error;
 
-	dprintf(("ntfs_filesize: ino: %d\n", ip->i_number));
+	dprintf(("ntfs_filesize: ino: %ju\n", (uintmax_t)ip->i_number));
 
 	error = ntfs_ntvattrget(ntmp, ip,
 		fp->f_attrtype, fp->f_attrname, 0, &vap);
@@ -1562,8 +1566,8 @@ ntfs_readattr(
 	struct ntvattr *vap;
 	size_t          init;
 
-	ddprintf(("ntfs_readattr: reading %d: 0x%x, from %d size %d bytes\n",
-	       ip->i_number, attrnum, (u_int32_t) roff, (u_int32_t) rsize));
+	ddprintf(("ntfs_readattr: reading %ju: 0x%x, from %jd size %zu bytes\n",
+	    (uintmax_t)ip->i_number, attrnum, (intmax_t)roff, rsize));
 
 	error = ntfs_ntvattrget(ntmp, ip, attrnum, attrname, 0, &vap);
 	if (error)

Modified: head/sys/fs/ntfs/ntfs_vfsops.c
==============================================================================
--- head/sys/fs/ntfs/ntfs_vfsops.c	Thu Sep 27 22:05:54 2012	(r241010)
+++ head/sys/fs/ntfs/ntfs_vfsops.c	Thu Sep 27 23:30:49 2012	(r241011)
@@ -639,9 +639,9 @@ ntfs_vgetex(
 	struct vnode *vp;
 	enum vtype f_type;
 
-	dprintf(("ntfs_vgetex: ino: %d, attr: 0x%x:%s, lkf: 0x%lx, f: 0x%lx\n",
-		ino, attrtype, attrname?attrname:"", (u_long)lkflags,
-		(u_long)flags));
+	dprintf(("ntfs_vgetex: ino: %ju, attr: 0x%x:%s, lkf: 0x%lx, f: 0x%lx\n",
+	    (uintmax_t)ino, attrtype, attrname ? attrname : "", lkflags,
+	    (u_long)flags));
 
 	ntmp = VFSTONTFS(mp);
 	*vpp = NULL;
@@ -657,8 +657,8 @@ ntfs_vgetex(
 	if (!(flags & VG_DONTLOADIN) && !(ip->i_flag & IN_LOADED)) {
 		error = ntfs_loadntnode(ntmp, ip);
 		if(error) {
-			printf("ntfs_vget: CAN'T LOAD ATTRIBUTES FOR INO: %d\n",
-			       ip->i_number);
+			printf("ntfs_vget: CAN'T LOAD ATTRIBUTES FOR INO: %ju\n",
+			    (uintmax_t)ip->i_number);
 			ntfs_ntput(ip);
 			return (error);
 		}
@@ -713,7 +713,7 @@ ntfs_vgetex(
 		ntfs_ntput(ip);
 		return (error);
 	}
-	dprintf(("ntfs_vget: vnode: %p for ntnode: %d\n", vp,ino));
+	dprintf(("ntfs_vget: vnode: %p for ntnode: %ju\n", vp, (uintmax_t)ino));
 
 	fp->f_vp = vp;
 	vp->v_data = fp;

Modified: head/sys/fs/ntfs/ntfs_vnops.c
==============================================================================
--- head/sys/fs/ntfs/ntfs_vnops.c	Thu Sep 27 22:05:54 2012	(r241010)
+++ head/sys/fs/ntfs/ntfs_vnops.c	Thu Sep 27 23:30:49 2012	(r241011)
@@ -127,7 +127,9 @@ ntfs_read(ap)
 	int resid, off, toread;
 	int error;
 
-	dprintf(("ntfs_read: ino: %d, off: %d resid: %d, segflg: %d\n",ip->i_number,(u_int32_t)uio->uio_offset,uio->uio_resid,uio->uio_segflg));
+	dprintf(("ntfs_read: ino: %ju, off: %jd resid: %d, segflg: %d\n",
+	    (uintmax_t)ip->i_number, (intmax_t)uio->uio_offset,
+	    uio->uio_resid, uio->uio_segflg));
 
 	dprintf(("ntfs_read: filesize: %d",(u_int32_t)fp->f_size));
 
@@ -179,7 +181,8 @@ ntfs_getattr(ap)
 	register struct ntnode *ip = FTONT(fp);
 	register struct vattr *vap = ap->a_vap;
 
-	dprintf(("ntfs_getattr: %d, flags: %d\n",ip->i_number,ip->i_flag));
+	dprintf(("ntfs_getattr: %ju, flags: %d\n",
+	    (uintmax_t)ip->i_number, ip->i_flag));
 
 	vap->va_fsid = dev2udev(ip->i_dev);
 	vap->va_fileid = ip->i_number;
@@ -214,8 +217,8 @@ ntfs_inactive(ap)
 	register struct ntnode *ip = VTONT(ap->a_vp);
 #endif
 
-	dprintf(("ntfs_inactive: vnode: %p, ntnode: %d\n", ap->a_vp,
-	    ip->i_number));
+	dprintf(("ntfs_inactive: vnode: %p, ntnode: %ju\n", ap->a_vp,
+	    (uintmax_t)ip->i_number));
 
 	/* XXX since we don't support any filesystem changes
 	 * right now, nothing more needs to be done
@@ -237,7 +240,8 @@ ntfs_reclaim(ap)
 	register struct ntnode *ip = FTONT(fp);
 	int error;
 
-	dprintf(("ntfs_reclaim: vnode: %p, ntnode: %d\n", vp, ip->i_number));
+	dprintf(("ntfs_reclaim: vnode: %p, ntnode: %ju\n",
+	    vp, (uintmax_t)ip->i_number));
 
 	/*
 	 * Destroy the vm object and flush associated pages.
@@ -600,8 +604,8 @@ ntfs_lookup(ap)
 			return (error);
 		}
 
-		dprintf(("ntfs_lookup: found ino: %d\n", 
-			VTONT(*ap->a_vpp)->i_number));
+		dprintf(("ntfs_lookup: found ino: %ju\n",
+		    (uintmax_t)VTONT(*ap->a_vpp)->i_number));
 	}
 
 	if (cnp->cn_flags & MAKEENTRY)

Modified: head/sys/fs/tmpfs/tmpfs_vfsops.c
==============================================================================
--- head/sys/fs/tmpfs/tmpfs_vfsops.c	Thu Sep 27 22:05:54 2012	(r241010)
+++ head/sys/fs/tmpfs/tmpfs_vfsops.c	Thu Sep 27 23:30:49 2012	(r241011)
@@ -247,7 +247,8 @@ tmpfs_mount(struct mount *mp)
 	    free(tmp, M_TMPFSMNT);
 	    return error;
 	}
-	KASSERT(root->tn_id == 2, ("tmpfs root with invalid ino: %d", root->tn_id));
+	KASSERT(root->tn_id == 2,
+	    ("tmpfs root with invalid ino: %ju", (uintmax_t)root->tn_id));
 	tmp->tm_root = root;
 
 	MNT_ILOCK(mp);

Modified: head/sys/kern/uipc_usrreq.c
==============================================================================
--- head/sys/kern/uipc_usrreq.c	Thu Sep 27 22:05:54 2012	(r241010)
+++ head/sys/kern/uipc_usrreq.c	Thu Sep 27 23:30:49 2012	(r241011)
@@ -2430,7 +2430,7 @@ DB_SHOW_COMMAND(unpcb, db_show_unpcb)
 	db_printf("unp_socket: %p   unp_vnode: %p\n", unp->unp_socket,
 	    unp->unp_vnode);
 
-	db_printf("unp_ino: %d   unp_conn: %p\n", unp->unp_ino,
+	db_printf("unp_ino: %ju   unp_conn: %p\n", (uintmax_t)unp->unp_ino,
 	    unp->unp_conn);
 
 	db_printf("unp_refs:\n");

Modified: head/sys/ufs/ffs/ffs_alloc.c
==============================================================================
--- head/sys/ufs/ffs/ffs_alloc.c	Thu Sep 27 22:05:54 2012	(r241010)
+++ head/sys/ufs/ffs/ffs_alloc.c	Thu Sep 27 23:30:49 2012	(r241011)
@@ -598,7 +598,8 @@ ffs_reallocblks_ufs1(ap)
 	 */
 #ifdef DEBUG
 	if (prtrealloc)
-		printf("realloc: ino %d, lbns %jd-%jd\n\told:", ip->i_number,
+		printf("realloc: ino %ju, lbns %jd-%jd\n\told:",
+		    (uintmax_t)ip->i_number,
 		    (intmax_t)start_lbn, (intmax_t)end_lbn);
 #endif
 	blkno = newblk;
@@ -2176,8 +2177,8 @@ ffs_freefile(ump, fs, devvp, ino, mode, 
 		cgbno = fsbtodb(fs, cgtod(fs, cg));
 	}
 	if (ino >= fs->fs_ipg * fs->fs_ncg)
-		panic("ffs_freefile: range: dev = %s, ino = %lu, fs = %s",
-		    devtoname(dev), (u_long)ino, fs->fs_fsmnt);
+		panic("ffs_freefile: range: dev = %s, ino = %ju, fs = %s",
+		    devtoname(dev), (uintmax_t)ino, fs->fs_fsmnt);
 	if ((error = bread(devvp, cgbno, (int)fs->fs_cgsize, NOCRED, &bp))) {
 		brelse(bp);
 		return (error);
@@ -2192,8 +2193,8 @@ ffs_freefile(ump, fs, devvp, ino, mode, 
 	inosused = cg_inosused(cgp);
 	ino %= fs->fs_ipg;
 	if (isclr(inosused, ino)) {
-		printf("dev = %s, ino = %u, fs = %s\n", devtoname(dev),
-		    ino + cg * fs->fs_ipg, fs->fs_fsmnt);
+		printf("dev = %s, ino = %ju, fs = %s\n", devtoname(dev),
+		    (uintmax_t)(ino + cg * fs->fs_ipg), fs->fs_fsmnt);
 		if (fs->fs_ronly == 0)
 			panic("ffs_freefile: freeing free inode");
 	}
@@ -2343,8 +2344,9 @@ ffs_fserr(fs, inum, cp)
 	struct thread *td = curthread;	/* XXX */
 	struct proc *p = td->td_proc;
 
-	log(LOG_ERR, "pid %d (%s), uid %d inumber %d on %s: %s\n",
-	    p->p_pid, p->p_comm, td->td_ucred->cr_uid, inum, fs->fs_fsmnt, cp);
+	log(LOG_ERR, "pid %d (%s), uid %d inumber %ju on %s: %s\n",
+	    p->p_pid, p->p_comm, td->td_ucred->cr_uid, (uintmax_t)inum,
+	    fs->fs_fsmnt, cp);
 }
 
 /*
@@ -2556,16 +2558,16 @@ sysctl_ffs_fsck(SYSCTL_HANDLER_ARGS)
 #ifdef DEBUG
 		if (fsckcmds) {
 			if (cmd.size == 1)
-				printf("%s: free %s inode %d\n",
+				printf("%s: free %s inode %ju\n",
 				    mp->mnt_stat.f_mntonname,
 				    filetype == IFDIR ? "directory" : "file",
-				    (ino_t)cmd.value);
+				    (uintmax_t)cmd.value);
 			else
-				printf("%s: free %s inodes %d-%d\n",
+				printf("%s: free %s inodes %ju-%ju\n",
 				    mp->mnt_stat.f_mntonname,
 				    filetype == IFDIR ? "directory" : "file",
-				    (ino_t)cmd.value,
-				    (ino_t)(cmd.value + cmd.size - 1));
+				    (uintmax_t)cmd.value,
+				    (uintmax_t)(cmd.value + cmd.size - 1));
 		}
 #endif /* DEBUG */
 		while (cmd.size > 0) {

Modified: head/sys/ufs/ffs/ffs_snapshot.c
==============================================================================
--- head/sys/ufs/ffs/ffs_snapshot.c	Thu Sep 27 22:05:54 2012	(r241010)
+++ head/sys/ufs/ffs/ffs_snapshot.c	Thu Sep 27 23:30:49 2012	(r241011)
@@ -674,7 +674,8 @@ loop:
 	VI_LOCK(devvp);
 	fs->fs_snapinum[snaploc] = ip->i_number;
 	if (ip->i_nextsnap.tqe_prev != 0)
-		panic("ffs_snapshot: %d already on list", ip->i_number);
+		panic("ffs_snapshot: %ju already on list",
+		    (uintmax_t)ip->i_number);
 	TAILQ_INSERT_TAIL(&sn->sn_head, ip, i_nextsnap);
 	devvp->v_vflag |= VV_COPYONWRITE;
 	VI_UNLOCK(devvp);
@@ -1571,8 +1572,8 @@ ffs_snapgone(ip)
 	if (xp != NULL)
 		vrele(ITOV(ip));
 	else if (snapdebug)
-		printf("ffs_snapgone: lost snapshot vnode %d\n",
-		    ip->i_number);
+		printf("ffs_snapgone: lost snapshot vnode %ju\n",
+		    (uintmax_t)ip->i_number);
 	/*
 	 * Delete snapshot inode from superblock. Keep list dense.
 	 */
@@ -1834,9 +1835,10 @@ retry:
 		if (size == fs->fs_bsize) {
 #ifdef DEBUG
 			if (snapdebug)
-				printf("%s %d lbn %jd from inum %d\n",
-				    "Grabonremove: snapino", ip->i_number,
-				    (intmax_t)lbn, inum);
+				printf("%s %ju lbn %jd from inum %ju\n",
+				    "Grabonremove: snapino",
+				    (uintmax_t)ip->i_number,
+				    (intmax_t)lbn, (uintmax_t)inum);
 #endif
 			/*
 			 * If journaling is tracking this write we must add
@@ -1878,9 +1880,9 @@ retry:
 			break;
 #ifdef DEBUG
 		if (snapdebug)
-			printf("%s%d lbn %jd %s %d size %ld to blkno %jd\n",
-			    "Copyonremove: snapino ", ip->i_number,
-			    (intmax_t)lbn, "for inum", inum, size,
+			printf("%s%ju lbn %jd %s %ju size %ld to blkno %jd\n",
+			    "Copyonremove: snapino ", (uintmax_t)ip->i_number,
+			    (intmax_t)lbn, "for inum", (uintmax_t)inum, size,
 			    (intmax_t)cbp->b_blkno);
 #endif
 		/*
@@ -2021,8 +2023,8 @@ ffs_snapshot_mount(mp)
 		 */
 		VI_LOCK(devvp);
 		if (ip->i_nextsnap.tqe_prev != 0)
-			panic("ffs_snapshot_mount: %d already on list",
-			    ip->i_number);
+			panic("ffs_snapshot_mount: %ju already on list",
+			    (uintmax_t)ip->i_number);
 		else
 			TAILQ_INSERT_TAIL(&sn->sn_head, ip, i_nextsnap);
 		vp->v_vflag |= VV_SYSTEM;
@@ -2366,12 +2368,13 @@ ffs_copyonwrite(devvp, bp)
 			break;
 #ifdef DEBUG
 		if (snapdebug) {
-			printf("Copyonwrite: snapino %d lbn %jd for ",
-			    ip->i_number, (intmax_t)lbn);
+			printf("Copyonwrite: snapino %ju lbn %jd for ",
+			    (uintmax_t)ip->i_number, (intmax_t)lbn);
 			if (bp->b_vp == devvp)
 				printf("fs metadata");
 			else
-				printf("inum %d", VTOI(bp->b_vp)->i_number);
+				printf("inum %ju",
+				    (uintmax_t)VTOI(bp->b_vp)->i_number);
 			printf(" lblkno %jd to blkno %jd\n",
 			    (intmax_t)bp->b_lblkno, (intmax_t)cbp->b_blkno);
 		}

Modified: head/sys/ufs/ffs/ffs_softdep.c
==============================================================================
--- head/sys/ufs/ffs/ffs_softdep.c	Thu Sep 27 22:05:54 2012	(r241010)
+++ head/sys/ufs/ffs/ffs_softdep.c	Thu Sep 27 23:30:49 2012	(r241011)
@@ -4456,8 +4456,8 @@ softdep_setup_mkdir(dp, ip)
 		KASSERT(jaddref != NULL,
 		    ("softdep_setup_mkdir: No addref structure present."));
 		KASSERT(jaddref->ja_parent == dp->i_number, 
-		    ("softdep_setup_mkdir: bad parent %d",
-		    jaddref->ja_parent));
+		    ("softdep_setup_mkdir: bad parent %ju",
+		    (uintmax_t)jaddref->ja_parent));
 		TAILQ_INSERT_BEFORE(&jaddref->ja_ref, &dotaddref->ja_ref,
 		    if_deps);
 	}
@@ -8761,8 +8761,8 @@ newdirrem(bp, dp, ip, isrmdir, prevdirre
 	if ((dap->da_state & ATTACHED) == 0)
 		panic("newdirrem: not ATTACHED");
 	if (dap->da_newinum != ip->i_number)
-		panic("newdirrem: inum %d should be %d",
-		    ip->i_number, dap->da_newinum);
+		panic("newdirrem: inum %ju should be %ju",
+		    (uintmax_t)ip->i_number, (uintmax_t)dap->da_newinum);
 	/*
 	 * If we are deleting a changed name that never made it to disk,
 	 * then return the dirrem describing the previous inode (which
@@ -9635,9 +9635,10 @@ initiate_write_filepage(pagedep, bp)
 			ep = (struct direct *)
 			    ((char *)bp->b_data + dap->da_offset);
 			if (ep->d_ino != dap->da_newinum)
-				panic("%s: dir inum %d != new %d",
+				panic("%s: dir inum %ju != new %ju",
 				    "initiate_write_filepage",
-				    ep->d_ino, dap->da_newinum);
+				    (uintmax_t)ep->d_ino,
+				    (uintmax_t)dap->da_newinum);
 			if (dap->da_state & DIRCHG)
 				ep->d_ino = dap->da_previous->dm_oldinum;
 			else
@@ -10194,10 +10195,11 @@ softdep_setup_inofree(mp, bp, ino, wkhd)
 	cgp = (struct cg *)bp->b_data;
 	inosused = cg_inosused(cgp);
 	if (isset(inosused, ino % fs->fs_ipg))
-		panic("softdep_setup_inofree: inode %d not freed.", ino);
+		panic("softdep_setup_inofree: inode %ju not freed.",
+		    (uintmax_t)ino);
 	if (inodedep_lookup(mp, ino, 0, &inodedep))
-		panic("softdep_setup_inofree: ino %d has existing inodedep %p",
-		    ino, inodedep);
+		panic("softdep_setup_inofree: ino %ju has existing inodedep %p",
+		    (uintmax_t)ino, inodedep);
 	if (wkhd) {
 		LIST_FOREACH_SAFE(wk, wkhd, wk_list, wkn) {
 			if (wk->wk_type != D_JADDREF)
@@ -10423,8 +10425,8 @@ initiate_write_bmsafemap(bmsafemap, bp)
 				jaddref->ja_state |= UNDONE;
 				stat_jaddref++;
 			} else if ((bp->b_xflags & BX_BKGRDMARKER) == 0)
-				panic("initiate_write_bmsafemap: inode %d "
-				    "marked free", jaddref->ja_ino);
+				panic("initiate_write_bmsafemap: inode %ju "
+				    "marked free", (uintmax_t)jaddref->ja_ino);
 		}
 	}
 	/*
@@ -12498,7 +12500,8 @@ retry:
 		if (dap == LIST_FIRST(diraddhdp)) {
 			inodedep_lookup(UFSTOVFS(ump), inum, 0, &inodedep);
 			panic("flush_pagedep_deps: failed to flush " 
-			    "inodedep %p ino %d dap %p", inodedep, inum, dap);
+			    "inodedep %p ino %ju dap %p",
+			    inodedep, (uintmax_t)inum, dap);
 		}
 	}
 	if (error)

Modified: head/sys/ufs/ufs/inode.h
==============================================================================
--- head/sys/ufs/ufs/inode.h	Thu Sep 27 22:05:54 2012	(r241010)
+++ head/sys/ufs/ufs/inode.h	Thu Sep 27 23:30:49 2012	(r241011)
@@ -183,7 +183,7 @@ struct indir {
 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). */
+	uint32_t  ufid_ino;	/* File number (ino). */
 	int32_t	  ufid_gen;	/* Generation number. */
 };
 #endif /* _KERNEL */

Modified: head/sys/ufs/ufs/ufs_acl.c
==============================================================================
--- head/sys/ufs/ufs/ufs_acl.c	Thu Sep 27 22:05:54 2012	(r241010)
+++ head/sys/ufs/ufs/ufs_acl.c	Thu Sep 27 23:30:49 2012	(r241011)
@@ -182,8 +182,8 @@ ufs_getacl_nfs4_internal(struct vnode *v
 		 * are unsafe.
 		 */
 		printf("ufs_getacl_nfs4(): Loaded invalid ACL ("
-		    "%d bytes), inumber %d on %s\n", len,
-		    ip->i_number, ip->i_fs->fs_fsmnt);
+		    "%d bytes), inumber %ju on %s\n", len,
+		    (uintmax_t)ip->i_number, ip->i_fs->fs_fsmnt);
 
 		return (EPERM);
 	}
@@ -191,8 +191,8 @@ ufs_getacl_nfs4_internal(struct vnode *v
 	error = acl_nfs4_check(aclp, vp->v_type == VDIR);
 	if (error) {
 		printf("ufs_getacl_nfs4(): Loaded invalid ACL "
-		    "(failed acl_nfs4_check), inumber %d on %s\n",
-		    ip->i_number, ip->i_fs->fs_fsmnt);
+		    "(failed acl_nfs4_check), inumber %ju on %s\n",
+		    (uintmax_t)ip->i_number, ip->i_fs->fs_fsmnt);
 
 		return (EPERM);
 	}
@@ -259,8 +259,8 @@ ufs_get_oldacl(acl_type_t type, struct o
 		 * DAC protections are unsafe.
 		 */
 		printf("ufs_get_oldacl(): Loaded invalid ACL "
-		    "(len = %d), inumber %d on %s\n", len,
-		    ip->i_number, ip->i_fs->fs_fsmnt);
+		    "(len = %d), inumber %ju on %s\n", len,
+		    (uintmax_t)ip->i_number, ip->i_fs->fs_fsmnt);
 		return (EPERM);
 	}
 

Modified: head/sys/ufs/ufs/ufs_lookup.c
==============================================================================
--- head/sys/ufs/ufs/ufs_lookup.c	Thu Sep 27 22:05:54 2012	(r241010)
+++ head/sys/ufs/ufs/ufs_lookup.c	Thu Sep 27 23:30:49 2012	(r241011)
@@ -770,11 +770,13 @@ ufs_dirbad(ip, offset, how)
 
 	mp = ITOV(ip)->v_mount;
 	if ((mp->mnt_flag & MNT_RDONLY) == 0)
-		panic("ufs_dirbad: %s: bad dir ino %lu at offset %ld: %s",
-		    mp->mnt_stat.f_mntonname, (u_long)ip->i_number, (long)offset, how);
+		panic("ufs_dirbad: %s: bad dir ino %ju at offset %ld: %s",
+		    mp->mnt_stat.f_mntonname, (uintmax_t)ip->i_number,
+		    (long)offset, how);
 	else
-		(void)printf("%s: bad dir ino %lu at offset %ld: %s\n",
-		    mp->mnt_stat.f_mntonname, (u_long)ip->i_number, (long)offset, how);
+		(void)printf("%s: bad dir ino %ju at offset %ld: %s\n",
+		    mp->mnt_stat.f_mntonname, (uintmax_t)ip->i_number,
+		    (long)offset, how);
 }
 
 /*
@@ -1209,8 +1211,8 @@ ufs_dirremove(dvp, ip, flags, isrmdir)
 		ufsdirhash_remove(dp, rep, dp->i_offset);
 #endif
 	if (ip && rep->d_ino != ip->i_number)
-		panic("ufs_dirremove: ip %d does not match dirent ino %d\n",
-		    ip->i_number, rep->d_ino);
+		panic("ufs_dirremove: ip %ju does not match dirent ino %ju\n",
+		    (uintmax_t)ip->i_number, (uintmax_t)rep->d_ino);
 	if (dp->i_count == 0) {
 		/*
 		 * First entry in block: set d_ino to zero.

Modified: head/sys/ufs/ufs/ufs_vnops.c
==============================================================================
--- head/sys/ufs/ufs/ufs_vnops.c	Thu Sep 27 22:05:54 2012	(r241010)
+++ head/sys/ufs/ufs/ufs_vnops.c	Thu Sep 27 23:30:49 2012	(r241011)
@@ -1504,8 +1504,8 @@ relock:
 		if (error)
 			panic("ufs_rename: from entry went away!");
 		if (ino != fip->i_number)
-			panic("ufs_rename: ino mismatch %d != %d\n", ino,
-			    fip->i_number);
+			panic("ufs_rename: ino mismatch %ju != %ju\n",
+			    (uintmax_t)ino, (uintmax_t)fip->i_number);
 	}
 	/*
 	 * If the source is a directory with a



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209272330.q8RNUo6C023767>