[stgt] SERVICE ACTION of PERSISTENT RESERVE OUT command
FUJITA Tomonori
fujita.tomonori at lab.ntt.co.jp
Sat Jul 16 12:39:04 CEST 2011
On Wed, 29 Jun 2011 17:00:42 +0900
FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp> wrote:
> On Thu, 23 Jun 2011 09:20:11 +0900
> nishino syuuzou <nishino.syuuzou at jp.fujitsu.com> wrote:
>
> > I have a question about SERVICE ACTION of PR OUT command.
> >
> > I think PRGENERATION updating is also necessary for "CLEAR" and
> > "REGISTER AND MOVE" service actions.
> >
> > # There is no " cmd->dev->prgeneration++" code in spc_pr_clear function
> > # and spc_pr_register_and_move function.
>
> Yeah, it's surely a bug. Can you send a patch to fix it?
The following patch looks good to you?
diff --git a/usr/spc.c b/usr/spc.c
index ea901e2..4824ac2 100644
--- a/usr/spc.c
+++ b/usr/spc.c
@@ -1211,6 +1211,7 @@ static int spc_pr_clear(int host_no, struct scsi_cmd *cmd)
free(sibling);
}
+ cmd->dev->prgeneration++;
return SAM_STAT_GOOD;
sense:
scsi_set_in_resid_by_actual(cmd, 0);
@@ -1385,6 +1386,7 @@ found:
if (unreg)
__unregister(cmd->dev, reg);
+ cmd->dev->prgeneration++;
return SAM_STAT_GOOD;
sense:
scsi_set_in_resid_by_actual(cmd, 0);
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list