On Mon, Jul 11 at 04:15, Kevin Cernekee wrote:
> On Mon, Jul 11, 2011 at 2:16 PM, Rich Felker <[email protected]> wrote:
> >> 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.
>
> The BLKRRPART ioctl can return EBUSY forever if somebody still has a
> partition on that disk open. Example:
Well the "real" fdisk command solves that in part by opening the device
with O_EXCL. I don't think we can easily do that in busybox fdisk code
and it's only a partial solution anyway.
Actually the reason I came here in the first place was I was updating an
in house wrapper around fdisk that doesn't allow the user to run fdisk if
any of the partions on the target drive are in use.
--
Bob Dunlop
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox