tech-kern archive

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

Re: "hot swap" storage devices

Sorry to reply to such an old thread (I'm catching up with ml mail).

On Mon, 27 Jun 2011 12:35:48 -0700
Erik Fair <> wrote:

> With regard to "hot swap" storage devices, we really have two choices which 
> are not mutually exclusive:
> 1. Treat as now, but with some additional code in the kernel which yells, 
> "hey! put that back! I have data to write on it!" when a device goes away 
> without prior notice (umount), and hold on to (rather than discard) the data 
> in the I/O buffer cache, in the hope that the user notices and heeds the 
> directive. Timeout to discard? Probably depends upon how much RAM utilization 
> pressure you're under. I think "minutes" would be a good unit here.

I think that this is the best solution;

This is basically what AmigaOS did, and it was nice, but it also had a
unified interface where even console was implemented on top of
graphics, with intuition.library resident in ROM, making it possible to
pop-up requesters at any time.  And it was designed for single-user...

This is more tricky in our case though; as the kernel should then be
able to forcefully trigger a requester, which ideally shouldn't
interrupt running processes and from which it must be possible to
resume working, on whatever currently active interface (console,
possibly in tmux/screen, or X11).

I wonder what the feasibility of this could be: reserve a wscons VT
(where possible) for this type of requester; when the kernel must use
it, remember which is the active VT, switch to the requester VT in text
mode where the requester is shown.  Depending on configuration, this
behaviour could be enabled or disabled, and possibly a timeout could be
configured.  Once the timeout expired or the needed user action was
performed (user selects cancel, retry, inserts a requested device,
etc), return back to the previous VT.

But this still does not deal with device identification; on AmigaOS
disks had labels and the system would verify upon insert/connect if the
label corresponded to such a pending requester...


Home | Main Index | Thread Index | Old Index