All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gabriel de Perthuis <g2p.code@gmail.com>
To: dm-devel@redhat.com
Subject: linear writes on read-only zero devices, any alternatives?
Date: Sun, 3 Mar 2013 11:36:23 +0000 (UTC)	[thread overview]
Message-ID: <kgvcjn$l3e$3@ger.gmane.org> (raw)

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

                 reply	other threads:[~2013-03-03 11:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='kgvcjn$l3e$3@ger.gmane.org' \
    --to=g2p.code@gmail.com \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.