mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* BLKFLSBUF on ramdisks
@ 2004-05-27  2:02 Todd Poynor
  2004-05-27 19:47 ` [PATCH] " Theodore Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Todd Poynor @ 2004-05-27  2:02 UTC (permalink / raw)
  To: linux-kernel

The BLKFLSBUF ioctl has a different meaning on ramdisks than on other
block devices: the memory for the ramdisk is freed (whereas cached
blocks are flushed to the device for most other devices, which obviously
would be a NOP for ramdisks).  At least one command, freeramdisk of
BusyBox, expects this behavior.  If certain other commands that issue
BLKFLSBUF are inadvertently run on a ramdisk device (as in a script that
previously tested fine on other devices) then the filesystem is
basically corrupted instead of the normally expected result.  For
example, badblocks or e2fsck -F.

While this can be initially alarming, it is easily figured out and
avoided in the future (no one really needs to check bad blocks or
filesystem integrity on a ramdisk, and I'd assume other uses of the
ioctl would fall into a similar category).  The two incompatible
definitions of the ioctl do seem unfortunate, however, and I figured I'd
ask here in case there's any interest in changing this situation; if so,
I will gladly help, thanks,

-- 
Todd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-27 20:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-27  2:02 BLKFLSBUF on ramdisks Todd Poynor
2004-05-27 19:47 ` [PATCH] " Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®