Bug#283303: [sparc] updated parted_server.c patch
Hi again,
After looking at the sources more carefully, it was noted that
ped_disk_commit() just calls two other functions,
ped_disk_commit_to_dev() and ped_disk_commit_to_os(). The latter causes
the kernel to re-read the partition table, causing a hang if swap is
active. Since we are not modifying the partition table during filesystem
creation, re-reading isn't necessary, and calling ped_disk_commit_to_dev()
works fine with active swap. So, the only modification necessary to
resolve the problem is the following change to parted_server.c:
--- partman-61/parted_server.c 2004-09-28 20:08:40.000000000 -0400
+++ partman/parted_server.c 2004-12-12 22:40:09.902803304 -0500
@@ -1621,7 +1621,10 @@
critical_error("Bad file system type: %s", s_fstype);
ped_partition_set_system(part, fstype);
deactivate_exception_handler();
- fs = timered_file_system_create(&(part->geom), fstype);
+ if ((fs = timered_file_system_create(&(part->geom), fstype)) != NULL) {
+ ped_file_system_close(fs);
+ ped_disk_commit_to_dev(disk);
+ }
activate_exception_handler();
oprintf("OK\n");
if (fs != NULL)
Thanks to Thiemo Seufer for helping out with debugging.
Best regards,
Jurij Smakov jurij@wooyd.org
Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC
Reply to: