SCSI: remove LBDATA/PBDATA from the WriteSame10/16 signatures

Make LBA the third argument to the iscsi writesame functions
This commit is contained in:
Ronnie Sahlberg
2013-01-21 21:15:37 -08:00
parent 9bf6a3d68b
commit 0f73f062d2
18 changed files with 170 additions and 129 deletions

View File

@@ -56,8 +56,10 @@ int T0192_writesame16_beyondeol(const char *initiator, const char *url)
/* write 1 - 256 blocks beyond the end of the device */
printf("Writing 1-256 blocks beyond end-of-device ... ");
for (i = 2; i <= 257; i++) {
task = iscsi_writesame16_sync(iscsi, lun, buf, block_size,
num_blocks, i, 0, 0, 0, 0, 0, 0);
task = iscsi_writesame16_sync(iscsi, lun, num_blocks,
buf, block_size,
i,
0, 0, 0, 0);
if (task == NULL) {
printf("[FAILED]\n");
printf("Failed to send WRITESAME16 command: %s\n", iscsi_get_error(iscsi));
@@ -97,8 +99,10 @@ int T0192_writesame16_beyondeol(const char *initiator, const char *url)
/* writing 1 - 256 blocks at LBA 2^63 */
printf("Writing 1-256 blocks at LBA 2^63 ... ");
for (i = 1; i <= 256; i++) {
task = iscsi_writesame16_sync(iscsi, lun, buf, block_size,
0x8000000000000000ULL, i, 0, 0, 0, 0, 0, 0);
task = iscsi_writesame16_sync(iscsi, lun, 0x8000000000000000ULL,
buf, block_size,
i,
0, 0, 0, 0);
if (task == NULL) {
printf("[FAILED]\n");
printf("Failed to send WRITESAME16 command: %s\n", iscsi_get_error(iscsi));
@@ -129,8 +133,10 @@ int T0192_writesame16_beyondeol(const char *initiator, const char *url)
/* write 1 - 256 blocks at LBA -1 */
printf("Writing 1-256 blocks at LBA -1 ... ");
for (i = 1; i <= 256; i++) {
task = iscsi_writesame16_sync(iscsi, lun, buf, block_size,
-1, i, 0, 0, 0, 0, 0, 0);
task = iscsi_writesame16_sync(iscsi, lun, -1,
buf, block_size,
i,
0, 0, 0, 0);
if (task == NULL) {
printf("[FAILED]\n");
printf("Failed to send WRITESAME16 command: %s\n", iscsi_get_error(iscsi));