]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Fix bug in xfs_repair da_write() routine, which affects filesystems where
authorNathan Scott <nathans@sgi.com>
Mon, 13 May 2002 08:04:12 +0000 (08:04 +0000)
committerNathan Scott <nathans@sgi.com>
Mon, 13 May 2002 08:04:12 +0000 (08:04 +0000)
the data blocksize != naming blocksize (see xfs_info output).

doc/CHANGES
repair/dir2.c

index d7945b4242c3ab914172647e94640493b13417c8..8e901dea9a448bc93f5bf22b41eafa57af5e5ab9 100644 (file)
@@ -1,6 +1,11 @@
+[cvs]
        - Fix error returns from log recovery.
        - Fix the way mkfs round downs the device when the last 
          AG is maller than the minimum AG size.
+       - Fix bug in xfs_repair da_write() routine, which affects
+         filesystems where the data blocksize != naming blocksize
+         (see xfs_info output).
+
 xfsprogs-2.0.5 (02 May 2002)
        - size AGs so that they do not always start on the same 
          part of a striped disk
index 91ce68ec4358b4755c4731ca47a3dfa1e56840ec..3d7abdd31a19a4759577961234356d9c4b2368c9 100644 (file)
@@ -188,6 +188,7 @@ da_bwrite(
        int             error;
        int             i;
        int             nbuf;
+       int             off;
 
        if ((nbuf = dabuf->nbuf) == 1) {
                bplist = &bp;
@@ -199,6 +200,11 @@ da_bwrite(
                        exit(1);
                }
                bcopy(dabuf->bps, bplist, nbuf * sizeof(*bplist));
+               for (i = off = 0; i < nbuf; i++, off += XFS_BUF_COUNT(bp)) {
+                       bp = bplist[i];
+                       bcopy((char *)dabuf->data + off, XFS_BUF_PTR(bp),
+                               XFS_BUF_COUNT(bp));
+               }
        }
        da_buf_done(dabuf);
        for (i = error = 0; i < nbuf; i++) {