Re: Device removal handling

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

 



On 7/11/2011 11:23 AM, Alasdair G Kergon wrote:
That's back-to-front!  You stop using a device first, then you remove it.
You really don't want to be removing devices while they are in use if you
can avoid it.

That is a pre plug and play world view. These days the kernel needs to be able to handle surprise removal as well. Also when you do want to remove a device, polluting user space tools with all kinds of hacks to try and figure out what the higher layers are and clean them up is very error prone and often is not done correctly. It would be preferable to use the same mechanism to request the removal of a device, and let the kernel worry about notifying any higher layers to clean up.

If something goes wrong and a device disappears, then yes, that disappearance
should propagate up the stack to be handled as best it can by each layer.

The question then is, how should that work? I can't believe the block layer does not already have some kind of mechanism for this. It isn't much different than handling medium ejection. If it does, then dm just needs to use it.

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel


[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux