From: Christophe Varoqui <christophe.varoqui@free.fr>
To: james.bottomley@hansenpartnership.com
Cc: sekharan@us.ibm.com, jens.axboe@oracle.com, agk@redhat.com,
linux-scsi@vger.kernel.org, dm-devel@redhat.com
Subject: Re: [BUG] dm-mpath and scsi persistent reservation
Date: Thu, 23 Oct 2008 23:03:21 +0200 [thread overview]
Message-ID: <20081023230321.6efe92a1@plop> (raw)
In-Reply-To: <1224629283.14830.838.camel@chandra-ubuntu>
> On Wed, 2008-10-22 at 21:54 +0200, Christophe Varoqui wrote:
> > It seems to me the device handler infrastructure proposes to
> > translate scsi error codes from requests generated by the device
> > handler itself. I don't know how we can detect a reservation
> > conflict from a device handler without submitting a dangerous write
> > io.
>
> For SCSI-2 reservations, Test Unit Ready will do this for you.
>
> For SCSI-3, you're right, it's more complex. You actually have to use
> the PR IN commands to read the reservations if you don't want to test
> what they'll actually do with an I/O.
>
The PR-IN "READ FULL STATUS" looked promising indeed, bu does not work
on any storage hardware I tried. Always ends up there (in
sg_persist.c) :
293 else if (SG_LIB_CAT_ILLEGAL_REQ == res)
294 fprintf(stderr, "PR in: bad field in cdb including "
295 "unsupported service action\n");
Other PR-INs would list the registration keys and reservation,
but how would we know from the kernel or from userspace multipath which
keys are associated with host's I_T nexus ? The key would likely have
been registered by a userspace clusterware for fencing purpose.
PR-OUT "REGISTER" with params rk=0 sark=0 may trigger a significative
difference when send over a registered I_T or not (based on SPC-3 -
Table 33 — Register behaviors for a REGISTER service action).
Did you have something different in mind ?
> > I don't see how we could use a device handler to translate an scsi
> > error code from a write io submitted to the multipath device map.
> > Do you ?
>
> Well, there is a problem. Reservation Conflict should be treated as a
> device error and passed straight up ... it shouldn't really have any
> effect on dm mp because a path switch is unlikely to fix any issues.
> So dm mp shouldn't be intercepting this type of error at all.
>
Well, a path switch might be a valid behaviour considering persistent
reservations are per I_T nexus ... the io may succeed if submited from
another intiator for example. But anyway, if all paths failed the io
should not be queued.
Regards,
cvaroqui
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2008-10-23 21:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-21 21:19 [BUG] dm-mpath and scsi persistent reservation Christophe Varoqui
2008-10-21 22:48 ` Chandra Seetharaman
2008-10-22 19:54 ` Christophe Varoqui
2008-10-22 20:30 ` [dm-devel] " James Bottomley
2008-10-23 2:53 ` Mike Christie
2008-10-22 21:21 ` Chandra Seetharaman
2008-10-23 19:30 ` Christophe Varoqui
2008-10-23 21:03 ` Christophe Varoqui [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=20081023230321.6efe92a1@plop \
--to=christophe.varoqui@free.fr \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=james.bottomley@hansenpartnership.com \
--cc=jens.axboe@oracle.com \
--cc=linux-scsi@vger.kernel.org \
--cc=sekharan@us.ibm.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