[rescue] DLT drive dead want to replace without rebooting
Jonathan C. Patschke
jp at celestrion.net
Wed Nov 29 04:48:59 CST 2006
On Wed, 29 Nov 2006, Peter Corlett wrote:
> These /sys and /proc interfaces aren't necessarily meant to be
> directly manipulated, but wrapped in a tool. We could call it
> something like "camcontrol" :)
If they're not meant to be directly manipulated, maybe they shouldn't be
that exposed.
> ASCII-mode interfaces are preferable because they're easier to debug -
> as evidenced by things like SMTP.
Over a network between two systems with the potential to disagree on
absolutely everything from byte order to byte size, sure.
As an adminsitrative API within the same physical system? Oh -hell- no.
What's to debug there? Either the userland side and kernel side agree
on what bits to frob in the kernel or they don't. The kernel isn't
going to get easier to debug by sticking ASCII parsers on every
conceivable interface; it's going to get -harder-.
How many things do you do with a SCSI interface? Bring up, bring it
down, quiecse it, release it, scan it, attach a device, detach a device.
You don't need an ASCII command interpreter for that! fcntl() is
adequate. Wrap it in a tool that takes commands sensibly, like
camcontrol or scsiadminswap or, if folks must overengineer, AIX's chdev.
Perhaps we could replace every syscall and interface (except for open()
and write(), which would become recursive) with routines that open
/dev/kernel and write messages like:
PLEASE OPEN FILE /home/user/foo FOR READING IN BINARY MODE AND -
ASSIGN TO FILE-DESCRIPTOR 3
PLEASE SELECT AMONG FILE-DESCRIPTORS THROUGH 8 AND NOTIFY READS ON -
3,4,5,6 AND NOTIFY WRITES ON 7,8 AND NOTIFY EXCEPTIONS ON 6 AND -
TIME-OUT WITHIN 4000 MICROSECONDS
It'll be easier to write and debug because it's ASCII, and adding a
COBOL compiler will be painless! It'll also dramatically increase
security, as there will only be one kernel entry point! Then, to better
support POSIX threads, /dev/kernel can be opened in async_io mode with a
special out-of-band signal for rudimentary job control....
--
Jonathan Patschke ) "Some people grow out of the petty theft of
Elgin, TX ( childhood. Others grow up to be CEOs and
USA ) politicians." --Forrest Black
More information about the rescue
mailing list