]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Don't try to zero last 64k on the device if the filesystem is in a regular
authorEric Sandeen <sandeen@sgi.com>
Mon, 14 Jan 2002 18:31:28 +0000 (18:31 +0000)
committerEric Sandeen <sandeen@sgi.com>
Mon, 14 Jan 2002 18:31:28 +0000 (18:31 +0000)
file.

mkfs/xfs_mkfs.c

index deb604d8567594609bb3f137b1f4441a4830ded9..4bfbcb0fcce96a038d82f0ead697f5045176a98a 100644 (file)
@@ -1687,13 +1687,14 @@ main(int argc, char **argv)
 
        /*
         * Zero out the last 64k on the device, to obliterate any
-        * old MD RAID (or other) metadata at the end of the device
+        * old MD RAID (or other) metadata at the end of the device.
         */
-       
-       buf = libxfs_getbuf(xi.ddev, (xi.dsize - BTOBB(65536)), 
-                           BTOBB(65536));
-       bzero(XFS_BUF_PTR(buf), 65536);
-       libxfs_writebuf(buf, 1);
+       if (!xi.disfile) {
+               buf = libxfs_getbuf(xi.ddev, (xi.dsize - BTOBB(65536)), 
+                                   BTOBB(65536));
+               bzero(XFS_BUF_PTR(buf), 65536);
+               libxfs_writebuf(buf, 1);
+       }
 
        /*
         * Zero the log if there is one.