Re: [PATCH v3 2/8] block: Add no_fallback parameter to bdrv_co_truncate()

2019-11-25 Thread Kevin Wolf
Am 25.11.2019 um 16:06 hat Alberto Garcia geschrieben: > On Fri 22 Nov 2019 05:05:05 PM CET, Kevin Wolf wrote: > > > @@ -3405,6 +3412,7 @@ typedef struct TruncateCo { > > int64_t offset; > > bool exact; > > PreallocMode prealloc; > > +bool no_fallback; > > Error **errp; > >

Re: [PATCH v3 2/8] block: Add no_fallback parameter to bdrv_co_truncate()

2019-11-25 Thread Alberto Garcia
On Fri 22 Nov 2019 05:05:05 PM CET, Kevin Wolf wrote: > @@ -3405,6 +3412,7 @@ typedef struct TruncateCo { > int64_t offset; > bool exact; > PreallocMode prealloc; > +bool no_fallback; > Error **errp; > int ret; > } TruncateCo; You add the 'no_fallback' field here...

Re: [PATCH v3 2/8] block: Add no_fallback parameter to bdrv_co_truncate()

2019-11-25 Thread Max Reitz
On 22.11.19 17:05, Kevin Wolf wrote: > This adds a no_fallback parameter to bdrv_co_truncate(), bdrv_truncate() > and blk_truncate() in preparation for a fix that potentially needs to > zero-write the new area. no_fallback will use BDRV_REQ_NO_FALLBACK for > this operation and lets the truncate fai

Re: [PATCH v3 2/8] block: Add no_fallback parameter to bdrv_co_truncate()

2019-11-22 Thread Eric Blake
On 11/22/19 10:05 AM, Kevin Wolf wrote: This adds a no_fallback parameter to bdrv_co_truncate(), bdrv_truncate() and blk_truncate() in preparation for a fix that potentially needs to zero-write the new area. no_fallback will use BDRV_REQ_NO_FALLBACK for this operation and lets the truncate fail i

[PATCH v3 2/8] block: Add no_fallback parameter to bdrv_co_truncate()

2019-11-22 Thread Kevin Wolf
This adds a no_fallback parameter to bdrv_co_truncate(), bdrv_truncate() and blk_truncate() in preparation for a fix that potentially needs to zero-write the new area. no_fallback will use BDRV_REQ_NO_FALLBACK for this operation and lets the truncate fail if an efficient zero write isn't possible.