FIO ZNS Write Behavior not Matching Read Behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a question on why the ZNS write behavior does not match the read behavior.  In write workloads with an offset that results in a starting lba that is not on a zone boundary, the offset is rounded up to the next zone starting lba.  This is not done for read workloads though.  I'd like to know if there is a particular reason why or could I change this behavior to be the same for both reads and writes.     

This code from the zbd_verify_sizes is doing the round up on writes:
			if ((f->file_offset != z->start) &&
			    (td->o.td_ddir != TD_DDIR_READ)) {
				new_offset = zbd_zone_end(z);
				if (new_offset >= f->file_offset + f->io_size) {
					log_info("%s: io_size must be at least one zone\n",
						 f->file_name);
					return false;
				}
				log_info("%s: rounded up offset from %llu to %llu\n",
					 f->file_name, (unsigned long long) f->file_offset,
					 (unsigned long long) new_offset);
				f->io_size -= (new_offset - f->file_offset);
				f->file_offset = new_offset;
			}

This causes a problem for one of our particular testcases that writes a particular pattern at an offset that ends up being rounded up to the next zone starting lba.  In the 2nd step of this testcase, a read with verify workload is done to verify the write workload.  This fails with a miscompare because the read workload is not starting at the same offset as the write workload.  Both fio workloads have "offset = 1%". 

Jeff Lien
eSSD Core SW Tools & Drivers

Western Digital
2900 37th St NW
Building 108-1
Rochester, MN 55901
Email:  Jeff.Lien@xxxxxxx
Office: +1-507-322-2416






[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux