Re: [RFC 8/8] bdev: use bdev_io_min() for statx block size

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

 



On Wed, Nov 13, 2024 at 01:47:27AM -0800, Luis Chamberlain wrote:
> The min-io is the minimum IO the block device prefers for optimal
> performance. In turn we map this to the block device block size.

It's not the block size, but (to quote the man page) 'the "preferred"
block size for efficient filesystem I/O'.  While the difference might
sound minor it actually is important.

> 
> diff --git a/block/bdev.c b/block/bdev.c
> index 3a5fd65f6c8e..4dcc501ed953 100644
> --- a/block/bdev.c
> +++ b/block/bdev.c
> @@ -1306,6 +1306,7 @@ void bdev_statx(struct path *path, struct kstat *stat,
>  			queue_atomic_write_unit_max_bytes(bd_queue));
>  	}
>  
> +	stat->blksize = (unsigned int) bdev_io_min(bdev);

No need for the cast.

>  	if (S_ISBLK(stat->mode))
> -		bdev_statx(path, stat, request_mask);
> +		bdev_statx(path, stat, request_mask | STATX_DIOALIGN);

And this is both unrelated and wrong.





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux