Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: usb flash drive removal (Re: Desktop NetBSD needs your help)



On Mon, Feb 09, 2009 at 10:10:27PM +0000, David Laight wrote:
> On Mon, Feb 09, 2009 at 11:57:01AM -0500, Arnaud Lacombe wrote:
> > Not speaking that you'll need to keep track of every
> > possible unique ID that can exist, good luck.
> 
> Not forgetting the the supposedly unique device-id probably isn't
> I've seen CF cards with identical ids.

If NetBSD's resilience to abrupt disk detachment resides at the
wedge level, then you can use wedge "locators" to reattach.  We
can foreseeably reattach a wedge using such locators as the
disk's make, model, and serial number, its volume and partition
identifiers---anything that you can put in a wedge's property list,
really.

Once I was looking at wedges with a mind to making them re-attach to
accidentally-detached disks.  It didn't look too hard.  You need to keep
in memory a journal of blocks that have not yet hit the platter, and
play that journal back after abrupt detachment/reattachment.  I never
found out a good way to find out which blocks are on the platter, or
else to force blocks to the platter, in a device-independent way.  I had
hoped that the B_ARRIER thread on tech-kern would produce an answer. :-)

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933


Home | Main Index | Thread Index | Old Index