[SCSI] libosd: Fix bug in attr_page handling
authorBoaz Harrosh <bharrosh@panasas.com>
Tue, 19 Oct 2010 12:20:31 +0000 (14:20 +0200)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 26 Oct 2010 15:42:30 +0000 (10:42 -0500)
commitec6a0a41b57feb54b3830918a8fb07147c2ee778
treea0c3620b4ca600faee6270985c84ef054cbb6a58
parent391cbf46f25ccbeb1a0ffd76c76765ffc9a6fb22
[SCSI] libosd: Fix bug in attr_page handling

The _osd_req_finalize_attr_page was off by a mile, when trying to
append the enc_get_attr segment instead of the proper set_attr segment.

Also properly support when we don't have any attribute to set while
getting a full page. And when clearing an attribute by setting it's
size to zero.

Reported-by: John Chandy <john.chandy@uconn.edu>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/osd/osd_initiator.c