Message ID | 156685504999.2841898.3845253676802836561.stgit@magnolia (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | xfs_scrub: fix IO error detection during media verify | expand |
diff --git a/scrub/disk.c b/scrub/disk.c index b728d1c7..e34a8217 100644 --- a/scrub/disk.c +++ b/scrub/disk.c @@ -144,7 +144,7 @@ disk_scsi_verify( iohdr.timeout = 30000; /* 30s */ error = ioctl(disk->d_fd, SG_IO, &iohdr); - if (error) + if (error < 0) return error; dbg_printf("VERIFY(16) fd %d lba %"PRIu64" len %"PRIu64" info %x " @@ -163,7 +163,7 @@ disk_scsi_verify( return -1; } - return error; + return blockcount << BBSHIFT; } #else # define disk_scsi_verify(...) (ENOTTY)