]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Copy modified superblock into moiuntpoint structure in phase 2
authorBarry Naujok <bnaujok@sgi.com>
Wed, 21 Feb 2007 14:37:52 +0000 (14:37 +0000)
committerBarry Naujok <bnaujok@sgi.com>
Wed, 21 Feb 2007 14:37:52 +0000 (14:37 +0000)
Merge of master-melb:xfs-cmds:28153a by kenmcd.

  Fix debug messages when IO_DEBUG is enabled

libxfs/rdwr.c
repair/scan.c

index d19022f29000ec7a923d2b3929841d609526e95f..76b51c6d07e2fe096b7f6ea3a0bc5f0de40dd816 100644 (file)
@@ -305,8 +305,9 @@ libxfs_getbuf(dev_t device, xfs_daddr_t blkno, int len)
 
        if (cache_node_get(libxfs_bcache, &key, (struct cache_node **)&bp)) {
 #ifdef IO_DEBUG
-               fprintf(stderr, "%s: allocated buffer, key=%llu(%llu), %p\n",
-                       __FUNCTION__, BBTOB(len), LIBXFS_BBTOOFF64(blkno), blkno, buf);
+               fprintf(stderr, "%s: allocated %ubytes buffer, key=%llu(%llu), %p\n",
+                       __FUNCTION__, BBTOB(len),
+                       (long long)LIBXFS_BBTOOFF64(blkno), (long long)blkno, bp);
 #endif
                libxfs_initbuf(bp, device, blkno, bytes);
        }
@@ -354,7 +355,7 @@ libxfs_readbufr(dev_t dev, xfs_daddr_t blkno, xfs_buf_t *bp, int len, int flags)
        }
 #ifdef IO_DEBUG
        fprintf(stderr, "readbufr read %ubytes, blkno=%llu(%llu), %p\n",
-               bytes, LIBXFS_BBTOOFF64(blkno), blkno, bp);
+               bytes, (long long)LIBXFS_BBTOOFF64(blkno), (long long)blkno, bp);
 #endif
        if (bp->b_dev == dev &&
            bp->b_blkno == blkno &&
@@ -403,7 +404,8 @@ libxfs_writebufr(xfs_buf_t *bp)
        }
 #ifdef IO_DEBUG
        fprintf(stderr, "writebufr wrote %ubytes, blkno=%llu(%llu), %p\n",
-               bp->b_bcount, LIBXFS_BBTOOFF64(bp->b_blkno), bp->b_blkno, bp);
+               bp->b_bcount, (long long)LIBXFS_BBTOOFF64(bp->b_blkno),
+               (long long)bp->b_blkno, bp);
 #endif
        bp->b_flags |= LIBXFS_B_UPTODATE;
        bp->b_flags &= ~(LIBXFS_B_DIRTY | LIBXFS_B_EXIT);
@@ -432,7 +434,7 @@ libxfs_iomove(xfs_buf_t *bp, uint boff, int len, void *data, int flags)
        if (boff + len > bp->b_bcount) {
                fprintf(stderr, "Badness, iomove out of range!\n"
                        "bp=(bno %llu, bytes %u) range=(boff %u, bytes %u)\n",
-                       bp->b_blkno, bp->b_bcount, boff, len);
+                       (long long)bp->b_blkno, bp->b_bcount, boff, len);
                abort();
        }
 #endif
@@ -464,7 +466,7 @@ libxfs_bcache_purge(void)
        cache_purge(libxfs_bcache);
 }
 
-void 
+void
 libxfs_bcache_flush(void)
 {
        cache_flush(libxfs_bcache);
index 0212e40b4c078fe348b803408239fd4e6cd11375..9a5c1ab2cdb9d6608eeda3555f0aac5195a95829 100644 (file)
@@ -431,7 +431,7 @@ _("out-of-order bmap key (file offset) in inode %llu, %s fork, fsbno %llu\n"),
        }
 
        /*
-        * If we're the last node at our level, check that the last child 
+        * If we're the last node at our level, check that the last child
         * block's forward sibling pointer is NULL.
         */
        if (check_dups == 0 &&
@@ -1295,6 +1295,8 @@ scan_ag(
        ASSERT(sb_dirty == 0 || (sb_dirty && !no_modify));
 
        if (sb_dirty && !no_modify) {
+               if (agno == 0)
+                       memcpy(&mp->m_sb, sb, sizeof(xfs_sb_t));
                libxfs_xlate_sb(XFS_BUF_PTR(sbbuf), sb, -1, XFS_SB_ALL_BITS);
                libxfs_writebuf(sbbuf, 0);
        } else