fdisk reinstate sleep

Rich Felker dalias at aerifal.cx
Mon Jul 11 21:16:37 UTC 2011


On Mon, Jul 11, 2011 at 04:45:48PM +0100, Bob Dunlop wrote:
> Hi,
> 
> I've been chasing an intermittent problem with busybox's fdisk
> implementation.  About one command in ten was failing on me when used
> with slow external USB disks on a 320MHz ARM system.  The BLKRRPART
> ioctl was returning device busy.
> 
> I traced it to a commented out sleep(2) in fdisk.c.  With the sleep
> reinstated fdisk is reliable.
> 
> I know that linux sync() is documented as not returning until the buffers
> have been flushed but I think something is delaying them, possibly in the
> USB stack.

In my opinion the patch is unacceptable as-is. Any sleeps need to be
optional and off-by-default, and at least someone should investigate
the time actually needed. Or it could just loop retrying until it's no
longer busy. This would be much more robust.

Rich


More information about the busybox mailing list