From: Hannes Reinecke <hare@suse.de>
To: Alasdair G Kergon <agk@redhat.com>
Cc: device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH] [RFC] switch DM tables to readonly automatically
Date: Fri, 02 May 2008 08:24:40 +0200 [thread overview]
Message-ID: <481AB3A8.30803@suse.de> (raw)
In-Reply-To: <20080501112451.GT18935@agk.fab.redhat.com>
Alasdair G Kergon wrote:
> On Fri, Apr 25, 2008 at 04:32:37PM +0200, Hannes Reinecke wrote:
>> this patch switches the device-mapper table to read-only
>> status automatically if one underlying device returns -EROFS.
>
> I'm going to need some persuading here...
>
> An analogy. If I call open() with O_RDWR and but that can't be done
> because the device is read-only - what happens? Does the open()
> silently give me a read-only file descriptor instead? Or does it
> give me -EROFS?
>
> If I request DM_TABLE_LOAD without the DM_READONLY_FLAG, I am asking
> for a device I can write to and if that's not possible I expect an
> error. If I'd wanted a read-only device I'd have set the
> DM_READONLY_FLAG on my request.
>
> Is the real problem that -EROFS/-ENXIO errors are not propagating back
> up through target _ctr functions as perhaps they should?
>
No, the real error is that you currently cannot create multipath
targets on devices exported as read-only from the storage.
Having device-mapper setting the 'read-only' flag automatically
on those devices instead of just bailing out will fix this.
The main problem we're facing here (from the point of multipathd)
is the lack of error reporting from device-mapper.
We're just getting the very helpful error 'ioctl failed',
with no indication about _why_.
So we have no clue at all that we might have to check for the
read-only setting on this device.
And checking this setting on _any_ ioctl error is just plain
silly.
The rest of the patch (calling _set_disk_ro and refusing to
open the device with O_RDWR) is just whitewhash to get a
better user experience.
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)
next prev parent reply other threads:[~2008-05-02 6:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-25 14:32 [PATCH] [RFC] switch DM tables to readonly automatically Hannes Reinecke
2008-04-30 5:43 ` Balasubramanian, Vijayakumar (STSD)
2008-05-01 11:24 ` Alasdair G Kergon
2008-05-02 6:24 ` Hannes Reinecke [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-04-30 8:19 Christophe Varoqui
2008-04-30 8:57 ` Hannes Reinecke
2008-04-30 9:34 ` Christophe Varoqui
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=481AB3A8.30803@suse.de \
--to=hare@suse.de \
--cc=agk@redhat.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.