File:  [NetBSD Developer Wiki] / wikisrc / projects / project / disk-removal.mdwn
Revision 1.2: download - view: text, annotated - select for diffs
Sun Nov 6 14:48:47 2011 UTC (2 years, 5 months ago) by jmmv
Branches: MAIN
CVS tags: HEAD
Define the per-project category and difficulty at the template level,
instead of manually tagging the project pages.  While doing this, prefix
the tags with "category:" and "difficulty:" to make them easier to
understand.

[[!template id=project

title="Graceful USB disk detach/reattach"

contact="""
[tech-kern](mailto:tech-kern@NetBSD.org)
"""

mentors="""
[Matthias Drochner](mailto:drochner@NetBSD.org), [David Young](mailto:dyoung@NetBSD.org)
"""

category="kernel"
difficulty="hard"
duration="3 months"

description="""
Make NetBSD behave gracefully when a "live" USB/FireWire disk drive is accidentally detached and re-attached by, for example, creating a virtual block device that receives block-read/write commands on behalf of the underlying disk driver. This device will delegate reads and writes to the disk driver, but it will keep a list of commands that are "outstanding," that is, reads that the disk driver has not completed, and writes that have not "hit the platter," so to speak. Following disk re-attachment, the virtual block device replays its list of outstanding commands. A correct solution will not replay commands to the wrong disk if the removable was replaced instead of re-attached. Provide a character device for userland to read indications that a disk in use was abruptly detached.

Open questions: Prior art? Isn't this how the Amiga worked? How will this interact with mount/unmount—is there a use-count on devices? Can you leverage "wedges" in your solution? Does any/most/all removable storage indicate reliably when a block written has actually reached the medium?
"""
]]

[[!tag gsoc]]

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb