test-tool: add prin_read_keys() allocation_len parameter
Accepting an Allocation Length parameter allows us to test for truncation of response data, as per SPC5r17 4.2.5.6: The device server shall terminate transfers to the Data-In Buffer when the number of bytes or blocks specified by the ALLOCATION LENGTH field have been transferred or when all available data have been transferred, whichever is less. With this change, all existing prin_read_keys() callers continue to use same ALLOCATION LENGTH value as earlier (16K). Signed-off-by: David Disseldorp <ddiss@suse.de>
This commit is contained in:
@@ -1069,7 +1069,7 @@ static int clear_pr(struct scsi_device *sdev)
|
||||
struct scsi_persistent_reserve_in_read_keys *rk;
|
||||
|
||||
res = 0;
|
||||
if (prin_read_keys(sdev, &pr_task, &rk) != 0)
|
||||
if (prin_read_keys(sdev, &pr_task, &rk, 16384) != 0)
|
||||
goto out;
|
||||
|
||||
res = -1;
|
||||
|
||||
Reference in New Issue
Block a user