X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Fsfdisk.c;h=99a18bb144e8ee0017f0c203005dc5d3eab9d3cf;hp=20d7dc82d640c867284d5b69ed9d2af165b0c317;hb=956fc5a3feacc970ea763697bf28fb686c875408;hpb=f6fda69953ca110104481f1263ec9a96e74dbb88 diff --git a/daemon/sfdisk.c b/daemon/sfdisk.c index 20d7dc8..99a18bb 100644 --- a/daemon/sfdisk.c +++ b/daemon/sfdisk.c @@ -91,7 +91,19 @@ sfdisk (const char *device, int n, int cyls, int heads, int sectors, udev_settle (); - return 0; + /* sfdisk sometimes fails on fast machines with: + * + * Re-reading the partition table ... + * BLKRRPART: Device or resource busy + * The command to re-read the partition table failed. + * Run partprobe(8), kpartx(8) or reboot your system now, + * before using mkfs + * + * Unclear if this is a bug in sfdisk or the kernel or some + * other component. In any case, reread the partition table + * unconditionally here. + */ + return do_blockdev_rereadpt (device); } int