SLUG Mailing List Archives
[SLUG] Hotplug and cached Disk writes
- To: slug@xxxxxxxxxxx
- Subject: [SLUG] Hotplug and cached Disk writes
- From: Steve Downing <steve@xxxxxxxxxxxxx>
- Date: Tue Sep 25 11:35:02 2001
- Reply-to: steve@xxxxxxxxxxxxx
>From the wouldn't it be cool if.... Department:
Is it possible to tell the kernel NOT to cache disk writes to a certain
mounted filesystem. Then if that mount suddenly dissappears, everything
has been already written.
1. Using hotplug I plug in a small USB key flash-memory filesystem.
2. Hotplug then insert the right kernel modules and mounts the flash-
memory filesystem in the desired spot.
3. Copy/delete/move files onto or off the flash-memory. (NOTE: It
all works up to here.)
4. Pause to allow files to be written WITHOUT kernel caching the write.
5. Unceremoniously Pull out the USB key. Hotplug realises and unmounts
filesystem and rmmods the unused modules.
Step 5 is the killer. I'm not sure it's even sane without risking
the obvious possible disk corruption.
a) I'm not sure hotplug can do the unmounting, it doesn't seem to
have a pre/post-removal thing.
b) Win98 doesn't seem handle it properly, so why should I expect
FWIW Kernel 2.4.3, Hotplug 0.0.20010919 out of Debian unstable, Modutils
Is anyone else trying something like this?
The most exciting phrase to hear in science,
the one that heralds new discoveries, is not
"Eureka!" but "That's funny..."' - Isaac Asimov