Re: SERVICE ACTION of PERSISTENT RESERVE OUT command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 29 Jun 2011 17:00:42 +0900
FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx> wrote:

> On Thu, 23 Jun 2011 09:20:11 +0900
> nishino syuuzou <nishino.syuuzou@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux