Linux Device Mapper development
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: Mike Snitzer <snitzer@redhat.com>
Cc: device-mapper development <dm-devel@redhat.com>, zkabelac@redhat.com
Subject: Re: dm table: Reject unconfigured device
Date: Tue, 29 Mar 2011 20:33:54 +0200	[thread overview]
Message-ID: <4D922612.3040904@redhat.com> (raw)
In-Reply-To: <20110329182252.GA21671@redhat.com>

On 03/29/2011 08:22 PM, Mike Snitzer wrote:
> 
> Part of me was thinking it best to check this, and error out, as early
> as possible (e.g. in drivers/md/dm-table.c:open_dev()).  But I like the
> additional info that is naturally provided in device_area_is_invalid().

Another option is change loop device by assigning request
fn early (it will reject IO if unbounded, once configured it
has request fn defined forever).

But then you get lot of errors instead of crash on access, like
Buffer I/O error on device dm-0, logical block 0

So rejecting unconfigured device use this way seems to me
like better idea.
(If there is no request function, how DM can map it?)

Milan

      reply	other threads:[~2011-03-29 18:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-29 17:19 [PATCH] dm table: Reject unconfigured device Milan Broz
2011-03-29 18:22 ` Mike Snitzer
2011-03-29 18:33   ` Milan Broz [this message]

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=4D922612.3040904@redhat.com \
    --to=mbroz@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=snitzer@redhat.com \
    --cc=zkabelac@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox