From: Tomohiro Kusumi Date: Mon, 9 Jan 2017 14:42:00 +0000 (+0900) Subject: Fix conditional/message for max lba for sg ioengine X-Git-Tag: fio-2.17~14 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=166c6b420f84c948455a387e3cdaaef8c2725f9c Fix conditional/message for max lba for sg ioengine Whether sg ioengine uses 10 or 16 bytes read/write command (by 5ad7be56) is determined by ->prep() depending on lba to read/write vs 0xFFFFFFFFULL, so let the message show it depends. Also remove unused sgio_data::max_lba which is essentially the same (divide by bs minus 1) as fio_file::real_file_size. Signed-off-by: Tomohiro Kusumi Signed-off-by: Jens Axboe --- diff --git a/engines/sg.c b/engines/sg.c index c9a14483..00bf3039 100644 --- a/engines/sg.c +++ b/engines/sg.c @@ -32,7 +32,6 @@ struct sgio_data { int *fd_flags; void *sgbuf; unsigned int bs; - long long max_lba; int type_checked; }; @@ -535,9 +534,10 @@ static int fio_sgio_type_check(struct thread_data *td, struct fio_file *f) sd->bs = bs; // Determine size of commands needed based on max_lba - sd->max_lba = max_lba; - if (max_lba > MAX_10B_LBA) { - dprint(FD_IO, "sgio_type_check: using 16 byte operations: max_lba = 0x%016llx\n", max_lba); + if (max_lba >= MAX_10B_LBA) { + dprint(FD_IO, "sgio_type_check: using 16 byte read/write " + "commands for lba above 0x%016llx/0x%016llx\n", + MAX_10B_LBA, max_lba); }