On Wed, Jun 22, 2016 at 09:50:58AM -0600, Eric Blake wrote: > Another step towards byte-based interfaces everywhere. Replace > the sector-based bdrv_co_discard() with a new byte-based > bdrv_co_pdiscard(), which silently ignores any unaligned head > or tail. Driver callbacks will be converted in followup patches. > > By calculating the alignment outside of the loop, and clamping > the max discard to an aligned value, we can simplify the actions > done within the loop. > > Signed-off-by: Eric Blake <[email protected]> > --- > include/block/block.h | 2 +- > block/blkreplay.c | 3 ++- > block/block-backend.c | 3 ++- > block/io.c | 67 > +++++++++++++++++++++++++++------------------------ > block/raw_bsd.c | 3 ++- > 5 files changed, 42 insertions(+), 36 deletions(-)
Reviewed-by: Stefan Hajnoczi <[email protected]>
signature.asc
Description: PGP signature
