RE: [PATCH v6 2/5] block: consolidate blocksize properties consistency checks
> -Original Message- > From: Roman Kagan > Sent: 27 May 2020 13:45 > To: qemu-devel@nongnu.org > Cc: Kevin Wolf ; xen-de...@lists.xenproject.org; Gerd > Hoffmann ; > Daniel P. Berrangé ; Paolo Bonzini > ; Anthony Perard > ; Laurent Vivier ; Max Reitz > ; qemu- > bl...@nongnu.org; Philippe Mathieu-Daudé ; Eric Blake > ; Paul > Durrant ; Fam Zheng ; John Snow > ; Michael S. Tsirkin > ; Eduardo Habkost ; Keith Busch > ; Stefano > Stabellini ; Stefan Hajnoczi > Subject: [PATCH v6 2/5] block: consolidate blocksize properties consistency > checks > > Several block device properties related to blocksize configuration must > be in certain relationship WRT each other: physical block must be no > smaller than logical block; min_io_size, opt_io_size, and > discard_granularity must be a multiple of a logical block. > > To ensure these requirements are met, add corresponding consistency > checks to blkconf_blocksizes, adjusting its signature to communicate > possible error to the caller. Also remove the now redundant consistency > checks from the specific devices. > > Signed-off-by: Roman Kagan Reviewed-by: Paul Durrant
Re: [PATCH v6 2/5] block: consolidate blocksize properties consistency checks
On 5/27/20 7:45 AM, Roman Kagan wrote: Several block device properties related to blocksize configuration must be in certain relationship WRT each other: physical block must be no smaller than logical block; min_io_size, opt_io_size, and discard_granularity must be a multiple of a logical block. To ensure these requirements are met, add corresponding consistency checks to blkconf_blocksizes, adjusting its signature to communicate possible error to the caller. Also remove the now redundant consistency checks from the specific devices. Signed-off-by: Roman Kagan --- Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org