There are two types of SD cards.  Ones that go away, and ones that don't.

> You could borrow bits of mpath(4), specifically the devid parts that
> are used to identify whether a device is the same or not. However,
> devids rely on a device providing unique identifiers, and we know that
> this isn't reliable.

In regards to either, I still really dislike the mpath model.  It is
difficult to actually push a device to detach, therefore there is no
unwinding. For instance vnodes stay around.  I've objected to this "keep
it around" approach since the beginning.  Always, the problem was
identifying do we want it to detach or not, but the mpath model is "keep
it around".

> I'd go a bit further than using properties of a device and and try to
> compare something on the disk that should be unique, eg, the duid from
> the disklabel.

But that requires an IO.  And new IO's must not happen, because once a
new IO is done other queued IO's from before suspend will flow through
the code paths, perhaps say doing a write to the wrong SD card...

Reply via email to