Re: [PATCH] nbd: add support for rotational devices

From: Eric Blake
Date: Thu Jul 25 2024 - 14:31:02 EST


On Thu, Jul 25, 2024 at 06:45:36PM GMT, Wouter Verhelst wrote:
> The NBD protocol defines the flag NBD_FLAG_ROTATIONAL to flag that the
> export in use should be treated as a rotational device.
>
> Add support for that flag to the kernel driver.
>
> Signed-off-by: Wouter Verhelst <w@xxxxxxx>
> ---
> drivers/block/nbd.c | 3 +++
> include/uapi/linux/nbd.h | 3 ++-
> 2 files changed, 5 insertions(+), 1 deletion(-)

Reviewed-by: Eric Blake <eblake@xxxxxxxxxx>

For what it's worth, the nbdkit project recently made it possible to
aad a filter on top of any existing NBD server to change the setting
of the rotational bit[1], as well as a filter to intentionally
simulate delays of a rotational device[2], in order to experiment with
how much impact changing the bit can have when it is not ignored.

[1] https://libguestfs.org/nbdkit-rotational-filter.1.html
[2] https://libguestfs.org/nbdkit-spinning-filter.1.html

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org