* linear writes on read-only zero devices, any alternatives?
@ 2013-03-03 11:36 Gabriel de Perthuis
0 siblings, 0 replies; only message in thread
From: Gabriel de Perthuis @ 2013-03-03 11:36 UTC (permalink / raw)
To: dm-devel
Hello,
I'm trying to build a block device with a small writable area (a loopback
device) and a large read-only area full of zeroes.
Stacking a read-only zero device doesn't work, because linear writes to it
anyway (tested in 3.8.1, steps below).
It seems to be a bug, but in case it isn't or can't be fixed, could one
of the dm targets (linear, error, or zero) get a read-only flag that
ensures that writes do fail?
Test case:
sudo dmsetup create --readonly --table '0 1024 zero' rozero
sudo dmsetup create --table '0 1024 linear /dev/mapper/rozero 0' synthetic
sudo dd if=/dev/urandom of=/dev/mapper/synthetic bs=512 count=1024
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-03-03 11:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-03 11:36 linear writes on read-only zero devices, any alternatives? Gabriel de Perthuis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.