On Mon, 2005-03-14 at 22:49 +0100, Christian Kujau wrote:

> i guess it would be saner to detach the loop-device from its device
> backend first, but i have to say: "it works with other filesystems" ;-)

Aha.  That's it.  With the loop device still mounted, the block device
was never completely closed, and the data written by mkfs was not
flushed to the disk.  jfs_mkfs should really flush the data before it
exits.  The attached patch to jfsutils should fix the problem.

Thanks,
Shaggy
-- 
David Kleikamp
IBM Linux Technology Center
Index: jfsutils/mkfs/mkfs.c
===================================================================
RCS file: /cvsroot/jfs/jfsutils/mkfs/mkfs.c,v
retrieving revision 1.37
diff -u -p -r1.37 mkfs.c
--- jfsutils/mkfs/mkfs.c	9 Mar 2005 21:03:25 -0000	1.37
+++ jfsutils/mkfs/mkfs.c	16 Mar 2005 16:32:08 -0000
@@ -1094,6 +1094,7 @@ int main(int argc, char *argv[])
 			      aggr_block_size, phys_block_size,
 			      type_jfs | type_commit, logdev, logloc, logsize,
 			      verify_blocks, log_uuid);
+	fsync(dev_handle);
 	close(dev_handle);
 	/* Format Complete message */
 	if (rc == 0) {

Reply via email to