From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christophe Varoqui Subject: Re: [BUG] dm-mpath and scsi persistent reservation Date: Thu, 23 Oct 2008 21:30:26 +0200 Message-ID: <20081023213026.709f9531@plop> References: <20081021231910.0fdbeb75@plop> <1224629283.14830.838.camel@chandra-ubuntu> <20081022215402.214a4ef8@plop> <1224710517.14830.852.camel@chandra-ubuntu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from smtp6-g19.free.fr ([212.27.42.36]:35238 "EHLO smtp6-g19.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751872AbYJWTba convert rfc822-to-8bit (ORCPT ); Thu, 23 Oct 2008 15:31:30 -0400 In-Reply-To: <1224710517.14830.852.camel@chandra-ubuntu> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: sekharan@us.ibm.com Cc: jens.axboe@oracle.com, james.bottomley@hansenpartnership.com, agk@redhat.com, linux-scsi@vger.kernel.org, dm-devel@redhat.com Le Wed, 22 Oct 2008 14:21:57 -0700, Chandra Seetharaman a =C3=A9crit : >=20 > 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 >=20 > No, the handler doesn't generate the requests. >=20 > Device handler's check_sense() function is called from the > scsi_error.c:scsi_check_sense() function whenever a sense code is > returned from the device (on normal I/Os). >=20 > When in the sense function, the device handler can do any action (lik= e > closing the other path(s)) and returning an appropriate error code > (such that dm doesn't retry the I/O on other paths). >=20 Thanks for the clarification. I shouldn't have stopped after reading the hp_sw handler, which does not implement a .check_sense So now, device handlers indeed look promising. I still see difficulties though : 1/ reservation conflict is a scmd status, and as such short-cuts the scsi_check_sense function altogether. Sould we hook device handlers to status parser too ? 2/ should we create an trivial device handler and load multi-handlers multipath maps or should we make this device handler implicitly always active ? Regards, cvaroqui -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html