Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/chfs quick workaround to make this compile, with tha...



details:   https://anonhg.NetBSD.org/src/rev/790879ba7542
branches:  trunk
changeset: 771550:790879ba7542
user:      agc <agc%NetBSD.org@localhost>
date:      Thu Nov 24 21:09:37 2011 +0000

description:
quick workaround to make this compile, with thanks to Hisashi Fujinaka for the
nudge.

diffstat:

 sys/ufs/chfs/chfs_gc.c        |  15 +++++++++------
 sys/ufs/chfs/chfs_readinode.c |  17 +++++++++++------
 sys/ufs/chfs/chfs_scan.c      |   4 ++--
 sys/ufs/chfs/chfs_subr.c      |   5 +++--
 sys/ufs/chfs/chfs_vfsops.c    |  15 +++++++++------
 sys/ufs/chfs/chfs_vnode.c     |   4 ++--
 sys/ufs/chfs/chfs_vnops.c     |  27 ++++++++++++++-------------
 sys/ufs/chfs/chfs_write.c     |   5 +++--
 8 files changed, 53 insertions(+), 39 deletions(-)

diffs (truncated from 322 to 300 lines):

diff -r 5a1e12013dad -r 790879ba7542 sys/ufs/chfs/chfs_gc.c
--- a/sys/ufs/chfs/chfs_gc.c    Thu Nov 24 20:50:33 2011 +0000
+++ b/sys/ufs/chfs/chfs_gc.c    Thu Nov 24 21:09:37 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chfs_gc.c,v 1.1 2011/11/24 15:51:31 ahoka Exp $        */
+/*     $NetBSD: chfs_gc.c,v 1.2 2011/11/24 21:09:37 agc Exp $  */
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -208,7 +208,7 @@
        struct vnode *vp = NULL;
        struct chfs_vnode_cache *vc;
        struct chfs_inode *ip;
-       dbg_gc("fetch inode %llu\n", vno);
+       dbg_gc("fetch inode %llu\n", (unsigned long long)vno);
 
        if (unlinked) {
                dbg_gc("unlinked\n");
@@ -439,14 +439,16 @@
                        mutex_exit(&chmp->chm_lock_sizes);
                        mutex_exit(&chmp->chm_lock_mountfields);
                        dbg_gc("checked_vno (#%llu) > max_vno (#%llu)\n",
-                           chmp->chm_checked_vno, chmp->chm_max_vno);
+                           (unsigned long long)chmp->chm_checked_vno,
+                           (unsigned long long)chmp->chm_max_vno);
                        return ENOSPC;
                }
 
                mutex_exit(&chmp->chm_lock_sizes);
 
                mutex_enter(&chmp->chm_lock_vnocache);
-               dbg_gc("checking vno #%llu\n", chmp->chm_checked_vno);
+               dbg_gc("checking vno #%llu\n",
+                       (unsigned long long)chmp->chm_checked_vno);
                dbg_gc("get vnode cache\n");
                vc = chfs_vnode_cache_get(chmp, chmp->chm_checked_vno++);
 
@@ -600,7 +602,7 @@
                mutex_exit(&chmp->chm_lock_mountfields);
                panic("CHFS BUG - vc state unchecked,"
                    " checking or gc (vno #%llu, num #%d)\n",
-                   vc->vno, vc->state);
+                   (unsigned long long)vc->vno, vc->state);
 
         case VNO_STATE_READING:
                mutex_exit(&chmp->chm_lock_vnocache);
@@ -896,7 +898,8 @@
        } else {
                dbg_gc("Nref at leb #%u offset 0x%08x wasn't in node list"
                    " for ino #%llu\n",
-                   nref->nref_lnr, CHFS_GET_OFS(nref->nref_offset), ip->ino);
+                   nref->nref_lnr, CHFS_GET_OFS(nref->nref_offset),
+                   (unsigned long long)ip->ino);
                if (CHFS_REF_OBSOLETE(nref)) {
                        dbg_gc("But it's obsolete so we don't mind"
                            " too much.\n");
diff -r 5a1e12013dad -r 790879ba7542 sys/ufs/chfs/chfs_readinode.c
--- a/sys/ufs/chfs/chfs_readinode.c     Thu Nov 24 20:50:33 2011 +0000
+++ b/sys/ufs/chfs/chfs_readinode.c     Thu Nov 24 21:09:37 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chfs_readinode.c,v 1.1 2011/11/24 15:51:31 ahoka Exp $ */
+/*     $NetBSD: chfs_readinode.c,v 1.2 2011/11/24 21:09:37 agc Exp $   */
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -391,8 +391,11 @@
                                tmp_td->node->ofs + tmp_td->node->size >= end_ofs) {
                                /* New node entirely overlapped by 'this' */
                                if (!chfs_check_td_node(chmp, tmp_td)) {
-                                       dbg("this version: %llu\n", tmp_td->version);
-                                       dbg("this ofs: %llu, size: %u\n", tmp_td->node->ofs, tmp_td->node->size);
+                                       dbg("this version: %llu\n",
+                                               (unsigned long long)tmp_td->version);
+                                       dbg("this ofs: %llu, size: %u\n",
+                                               (unsigned long long)tmp_td->node->ofs,
+                                               tmp_td->node->size);
                                        dbg("calling kill td 4\n");
                                        chfs_kill_td(chmp, newtd);
                                        return 0;
@@ -895,7 +898,7 @@
                                } else {
                                        if (tmp_td->version > high_ver) {
                                                high_ver = tmp_td->version;
-                                               dbg("highver: %llu\n", high_ver);
+                                               dbg("highver: %llu\n", (unsigned long long)high_ver);
                                                rii->latest_ref = tmp_td->node->nref;
                                        }
 
@@ -959,8 +962,10 @@
                break;
        case VNO_STATE_PRESENT:
        case VNO_STATE_READING:
-               chfs_err("Reading inode #%llu in state %d!\n", vc->vno, vc->state);
-               chfs_err("wants to read a nonexistent ino %llu\n", vc->vno);
+               chfs_err("Reading inode #%llu in state %d!\n",
+                       (unsigned long long)vc->vno, vc->state);
+               chfs_err("wants to read a nonexistent ino %llu\n",
+                       (unsigned long long)vc->vno);
                return ENOENT;
        default:
                panic("BUG() Bad vno cache state.");
diff -r 5a1e12013dad -r 790879ba7542 sys/ufs/chfs/chfs_scan.c
--- a/sys/ufs/chfs/chfs_scan.c  Thu Nov 24 20:50:33 2011 +0000
+++ b/sys/ufs/chfs/chfs_scan.c  Thu Nov 24 21:09:37 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chfs_scan.c,v 1.1 2011/11/24 15:51:31 ahoka Exp $      */
+/*     $NetBSD: chfs_scan.c,v 1.2 2011/11/24 21:09:37 agc Exp $        */
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -415,7 +415,7 @@
 
        fd->nref->nref_offset = ofs;
 
-       dbg("add dirent to #%llu\n", vc->vno);
+       dbg("add dirent to #%llu\n", (unsigned long long)vc->vno);
        chfs_add_node_to_list(chmp, vc, fd->nref, &vc->dirents);
        /*tmp = vc->dirents;
          dbg("START|vno: %d dirents dump\n", vc->vno);
diff -r 5a1e12013dad -r 790879ba7542 sys/ufs/chfs/chfs_subr.c
--- a/sys/ufs/chfs/chfs_subr.c  Thu Nov 24 20:50:33 2011 +0000
+++ b/sys/ufs/chfs/chfs_subr.c  Thu Nov 24 21:09:37 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chfs_subr.c,v 1.1 2011/11/24 15:51:31 ahoka Exp $      */
+/*     $NetBSD: chfs_subr.c,v 1.2 2011/11/24 21:09:37 agc Exp $        */
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -279,7 +279,8 @@
                }
 
                /* create the new data */
-               dbg("create new data vap%llu ip%llu\n", size, ip->size);
+               dbg("create new data vap%llu ip%llu\n",
+                       (unsigned long long)size, (unsigned long long)ip->size);
                append = size - ip->size;
                if (append > 0) {
                        memcpy(buf, bp->b_data, ip->size);
diff -r 5a1e12013dad -r 790879ba7542 sys/ufs/chfs/chfs_vfsops.c
--- a/sys/ufs/chfs/chfs_vfsops.c        Thu Nov 24 20:50:33 2011 +0000
+++ b/sys/ufs/chfs/chfs_vfsops.c        Thu Nov 24 21:09:37 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chfs_vfsops.c,v 1.1 2011/11/24 15:51:32 ahoka Exp $    */
+/*     $NetBSD: chfs_vfsops.c,v 1.2 2011/11/24 21:09:37 agc Exp $      */
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -477,7 +477,7 @@
        struct chfs_node_ref* nref = NULL;
        struct buf *bp;
 
-       dbg("vget() | ino: %llu\n", ino);
+       dbg("vget() | ino: %llu\n", (unsigned long long)ino);
 
        ump = VFSTOUFS(mp);
        dev = ump->um_dev;
@@ -583,7 +583,8 @@
                case VREG:
                case VSOCK:
                        //build the fragtree of the vnode
-                       dbg("read_inode_internal | ino: %llu\n", ip->ino);
+                       dbg("read_inode_internal | ino: %llu\n",
+                               (unsigned long long)ip->ino);
                        error = chfs_read_inode(chmp, ip);
                        if (error) {
                                vput(vp);
@@ -594,7 +595,8 @@
                        break;
                case VLNK:
                        //build the fragtree of the vnode
-                       dbg("read_inode_internal | ino: %llu\n", ip->ino);
+                       dbg("read_inode_internal | ino: %llu\n",
+                               (unsigned long long)ip->ino);
                        error = chfs_read_inode_internal(chmp, ip);
                        if (error) {
                                vput(vp);
@@ -603,7 +605,7 @@
                                return (error);
                        }
 
-                       dbg("size: %llu\n", ip->size);
+                       dbg("size: %llu\n", (unsigned long long)ip->size);
                        bp = getiobuf(vp, true);
                        bp->b_blkno = 0;
                        bp->b_bufsize = bp->b_resid =
@@ -622,7 +624,8 @@
                case VBLK:
                case VFIFO:
                        //build the fragtree of the vnode
-                       dbg("read_inode_internal | ino: %llu\n", ip->ino);
+                       dbg("read_inode_internal | ino: %llu\n",
+                               (unsigned long long)ip->ino);
                        error = chfs_read_inode_internal(chmp, ip);
                        if (error) {
                                vput(vp);
diff -r 5a1e12013dad -r 790879ba7542 sys/ufs/chfs/chfs_vnode.c
--- a/sys/ufs/chfs/chfs_vnode.c Thu Nov 24 20:50:33 2011 +0000
+++ b/sys/ufs/chfs/chfs_vnode.c Thu Nov 24 21:09:37 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chfs_vnode.c,v 1.1 2011/11/24 15:51:32 ahoka Exp $     */
+/*     $NetBSD: chfs_vnode.c,v 1.2 2011/11/24 21:09:37 agc Exp $       */
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -66,7 +66,7 @@
        char* buf;
        size_t retlen, len;
        struct vnode* vp = NULL;
-       dbg("readvnode | ino: %llu\n", ino);
+       dbg("readvnode | ino: %llu\n", (unsigned long long)ino);
 
        len = sizeof(struct chfs_flash_vnode);
 
diff -r 5a1e12013dad -r 790879ba7542 sys/ufs/chfs/chfs_vnops.c
--- a/sys/ufs/chfs/chfs_vnops.c Thu Nov 24 20:50:33 2011 +0000
+++ b/sys/ufs/chfs/chfs_vnops.c Thu Nov 24 21:09:37 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chfs_vnops.c,v 1.1 2011/11/24 15:51:32 ahoka Exp $     */
+/*     $NetBSD: chfs_vnops.c,v 1.2 2011/11/24 21:09:37 agc Exp $       */
 
 /*-
  * Copyright (c) 2010 Department of Software Engineering,
@@ -146,7 +146,8 @@
                                goto out;
                        }
 
-                       dbg("vno@allocating new vnode: %llu\n", fd->vno);
+                       dbg("vno@allocating new vnode: %llu\n",
+                               (unsigned long long)fd->vno);
                        error = VFS_VGET(dvp->v_mount, fd->vno, vpp);
                }
        }
@@ -610,7 +611,7 @@
        ioflag = ap->a_ioflag;
        error = 0;
 
-       dbg("ip->size:%llu\n", ip->size);
+       dbg("ip->size:%llu\n", (unsigned long long)ip->size);
 
 #ifdef DIAGNOSTIC
        if (uio->uio_rw != UIO_READ)
@@ -756,8 +757,8 @@
        uio = ap->a_uio;
        vp = ap->a_vp;
        ip = VTOI(vp);
-       //dbg("file size (vp): %llu\n", vp->v_size);
-       //dbg("file size (ip): %llu\n", ip->i_size);
+       //dbg("file size (vp): %llu\n", (unsigned long long)vp->v_size);
+       //dbg("file size (ip): %llu\n", (unsigned long long)ip->i_size);
        ump = ip->ump;
 
        //dbg("uio->resid: %d\n", uio->uio_resid);
@@ -788,9 +789,9 @@
            uio->uio_resid > ump->um_maxfilesize) {
                dbg("uio->uio_offset = %lld | uio->uio_offset + "
                    "uio->uio_resid (%llu) > ump->um_maxfilesize (%lld)\n",
-                   uio->uio_offset,
-                   (u_int64_t)uio->uio_offset + uio->uio_resid,
-                   ump->um_maxfilesize);
+                   (long long)uio->uio_offset,
+                   (uint64_t)uio->uio_offset + uio->uio_resid,
+                   (long long)ump->um_maxfilesize);
                return (EFBIG);
        }
        /*
@@ -979,8 +980,8 @@
        chfs_set_vnode_size(vp, vp->v_size);
 
 
-       //dbg("end file size (vp): %llu\n", vp->v_size);
-       //dbg("end file size (ip): %llu\n", ip->i_size);
+       //dbg("end file size (vp): %llu\n", (unsigned long long)vp->v_size);
+       //dbg("end file size (ip): %llu\n", (unsigned long long)ip->i_size);
        KASSERT(vp->v_size == ip->size);
        fstrans_done(vp->v_mount);
 
@@ -1450,7 +1451,7 @@
        struct vnode *vp = ((struct vop_inactive_args *) v)->a_vp;
        struct chfs_inode *ip = VTOI(vp);
        struct chfs_vnode_cache *chvc;
-       dbg("inactive | vno: %llu\n", ip->ino);
+       dbg("inactive | vno: %llu\n", (unsigned long long)ip->ino);
 
        KASSERT(VOP_ISLOCKED(vp));
 
@@ -1478,7 +1479,7 @@
        struct chfs_mount *chmp = ip->chmp;
        struct chfs_dirent *fd;
 
-       //dbg("reclaim() | ino: %llu\n", ip->ino);
+       //dbg("reclaim() | ino: %llu\n", (unsigned long long)ip->ino);
        //mutex_enter(&ip->inode_lock);
 
        mutex_enter(&chmp->chm_lock_vnocache);
@@ -1551,7 +1552,7 @@
 /*     dbg("bp dump:\n");
        dbg("   ->b_bcount: %d\n", bp->b_bcount);
        dbg("   ->b_resid:  %d\n", bp->b_resid);
-       dbg("   ->b_blkno:  %llu\n", bp->b_blkno);
+       dbg("   ->b_blkno:  %llu\n", (unsigned long long)bp->b_blkno);



Home | Main Index | Thread Index | Old Index