Re: [Libguestfs] [PATCH nbdkit] cache, cow: Export block size constraints

2022-02-22 Thread Laszlo Ersek
On 02/21/22 15:32, Richard W.M. Jones wrote: > > On Mon, Feb 21, 2022 at 03:19:23PM +0100, Laszlo Ersek wrote: >> On 02/21/22 11:22, Richard W.M. Jones wrote: >>> On Mon, Feb 21, 2022 at 10:22:04AM +0100, Laszlo Ersek wrote: > +/* Block size constraints. */ > +static int >

Re: [Libguestfs] [PATCH nbdkit] cache, cow: Export block size constraints

2022-02-21 Thread Eric Blake
On Sun, Feb 20, 2022 at 08:49:08PM +, Richard W.M. Jones wrote: > Because these filters perform a read-modify-write cycle for requests > which are smaller than the block size of the filter, we can adjust or > set the preferred block size to the block size of the filter or the > preferred block

Re: [Libguestfs] [PATCH nbdkit] cache, cow: Export block size constraints

2022-02-21 Thread Richard W.M. Jones
On Mon, Feb 21, 2022 at 03:19:23PM +0100, Laszlo Ersek wrote: > On 02/21/22 11:22, Richard W.M. Jones wrote: > > On Mon, Feb 21, 2022 at 10:22:04AM +0100, Laszlo Ersek wrote: > >>> +/* Block size constraints. */ > >>> +static int > >>> +cache_block_size (nbdkit_next *next, void *handle, > >>> +

Re: [Libguestfs] [PATCH nbdkit] cache, cow: Export block size constraints

2022-02-21 Thread Laszlo Ersek
On 02/21/22 11:22, Richard W.M. Jones wrote: > On Mon, Feb 21, 2022 at 10:22:04AM +0100, Laszlo Ersek wrote: >>> +/* Block size constraints. */ >>> +static int >>> +cache_block_size (nbdkit_next *next, void *handle, >>> + uint32_t *minimum, uint32_t *preferred, uint32_t >>>

Re: [Libguestfs] [PATCH nbdkit] cache, cow: Export block size constraints

2022-02-21 Thread Richard W.M. Jones
On Mon, Feb 21, 2022 at 10:22:04AM +0100, Laszlo Ersek wrote: > > +/* Block size constraints. */ > > +static int > > +cache_block_size (nbdkit_next *next, void *handle, > > + uint32_t *minimum, uint32_t *preferred, uint32_t > > *maximum) > > +{ > > + if (next->block_size (next,

Re: [Libguestfs] [PATCH nbdkit] cache, cow: Export block size constraints

2022-02-21 Thread Laszlo Ersek
On 02/20/22 21:49, Richard W.M. Jones wrote: > Because these filters perform a read-modify-write cycle for requests > which are smaller than the block size of the filter, we can adjust or > set the preferred block size to the block size of the filter or the > preferred block size of the underlying

[Libguestfs] [PATCH nbdkit] cache, cow: Export block size constraints

2022-02-20 Thread Richard W.M. Jones
Because these filters perform a read-modify-write cycle for requests which are smaller than the block size of the filter, we can adjust or set the preferred block size to the block size of the filter or the preferred block size of the underlying plugin, whichever is larger. We're careful not to