From: Hannes Reinecke <hare@suse.de>
To: device-mapper development <dm-devel@redhat.com>
Cc: Nikanth Karthikesan <knikanth@suse.de>
Subject: Re: [PATCH] Allow multipath devices to be created for readonly devices
Date: Tue, 21 Jul 2009 16:37:34 +0200 [thread overview]
Message-ID: <4A65D2AE.9060102@suse.de> (raw)
In-Reply-To: <20090720200835.GE32330@agk-dp.fab.redhat.com>
Alasdair G Kergon wrote:
> On Wed, Jul 08, 2009 at 02:17:59PM +0530, Nikanth Karthikesan wrote:
>> Currently we cannot create device-mapper tables for multipath devices
>> whenever they are read-only.This patch modifies the device-mapper to
>> set the 'READ-ONLY' flag automatically whenever a read-only is added
>> to the table.
>
> I recall discussing this before:
>
> 1) Contrary to the assertion above, you can already create such dm
> tables, by marking them explicitly as read-only.
>
Yes, I know. The whole point of this patch is to make the interface
more userfriendly.
Or, push the implementation details down one layer into device-mapper.
Sure, it is possible to create read-only dm tables, but this requires
some prior knowledge as you have to set additional flags.
This patch actually got kicked off by a difference in behaviour
when try to mount read-only devices as read-write.
With 'normal' block devices you'll get an -EROFS, whereas on device-mapper
you get -ENXIO. The userland tools are normally equipped to handle the
former, not the latter.
The other part of the patch set links the read-only state of the device-mapper
device to the underlying devices, so when one is changed the others will
get updated, too.
> 2) The distinction between read-only and read-write device-mapper
> devices is currently clear and simple. This proposal replaces the
> definitions with far-less-intuitive ones and that is why I ignored it
> first time around.
>
> If you believe the existing interface and behaviour is inadequate,
> think about some alternatives:
> - What is the heart of the problem here? Give a specific example
> to show why we need improvements: Is the patch really about
> optimisation, arguing that to achieve the desired result through the
> current interface involves avoidable effort?
> - Consider whether adding another clearly-defined state to the system
> or extending the userspace interface would be a better approach.
>
The main point here is that by changing the device-mapper code we don't
have to modify any of the userland tools. Basically what this patches
do is moving the 'special device-mapper read-only handling code' from
userland into the device-mapper core.
Yes, this is debatable. But I don't know how many userspace tools there
are, and changing all of them to handle this case correctly is a daunting
task.
Plus that it'll be 'device-mapper only' code, which I don't think is a
good idea.
To summarise: I don't object to keeping the device-mapper interface fixed,
so that any program using libdevmapper or device-mapper directly has to be
aware of this.
What I do object to is that programs using generic means (ie syscalls)
should be changed to accomodate special device-mapper handling.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
prev parent reply other threads:[~2009-07-21 14:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-08 8:47 [PATCH] Allow multipath devices to be created for readonly devices Nikanth Karthikesan
2009-07-20 20:08 ` Alasdair G Kergon
2009-07-20 20:23 ` Alasdair G Kergon
2009-07-21 14:37 ` Hannes Reinecke [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=4A65D2AE.9060102@suse.de \
--to=hare@suse.de \
--cc=dm-devel@redhat.com \
--cc=knikanth@suse.de \
/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.