svn commit: r360568 - head/sys/dev/nvme

Gunther Nikl gnikl at justmail.de
Mon May 4 18:21:11 UTC 2020


Hello,

> Modified: head/sys/dev/nvme/nvme_test.c
> ==============================================================================
> --- head/sys/dev/nvme/nvme_test.c	Sat May  2 20:14:592020	(r360567)
> +++ head/sys/dev/nvme/nvme_test.c	Sat May  2 20:47:582020	(r360568)
> @@ -100,7 +100,7 @@ nvme_ns_bio_test(void *arg)
>  	idx = atomic_fetchadd_int(&io_test->td_idx, 1);
> 	dev = io_test->ns->cdev; 
> -	offset = idx * 2048 * nvme_ns_get_sector_size(io_test->ns);
> +	offset = idx * 2048ULL * nvme_ns_get_sector_size(io_test->ns);
> 
> 	while (1) {

I have read the differential where a cast was used on the 2048. AFAICT, the
"ULL" is only correct if uint64 is a "unsigned long long". On a LP64 system
it is normally a simple "unsigned long" and then the correct suffix would
be "UL". In that sense the cast was probably more correct. 

my 2c
Gunther


More information about the svn-src-all mailing list