I patched mkswap.c, adding a sync:
--- mkswap.c~ Sun Jul 6 02:11:03 1997
+++ mkswap.c Thu Feb 19 21:49:40 1998
@@ -223,5 +223,11 @@
die("unable to rewind swap-device");
if (PAGE_SIZE != write(DEV, signature_page, PAGE_SIZE))
die("unable to write signature page");
+ /*
+ * A subsequent swapon() will fail if the signature
+ * is not actually on disk. (This is a kernel bug.)
+ */
+ if (fsync(DEV))
+ die("fsync failed");
return 0;
}
Andries
cc-ed to linux-kernel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu