Re: [Qemu-block] [Qemu-devel] [PATCH 0/5] Auto-fragment large transactions at the block layer

2016-06-21 Thread Fam Zheng
On Mon, 06/20 17:39, Eric Blake wrote: > We have max_transfer documented in BlockLimits, but while we > honor it during pwrite_zeroes, we were blindly ignoring it > during pwritev and preadv, leading to multiple drivers having > to implement fragmentation themselves. This series moves >

Re: [Qemu-block] [PATCH v2 1/1] mirror: fix trace_mirror_yield_in_flight usage in mirror_iteration()

2016-06-21 Thread Jeff Cody
On Tue, Jun 21, 2016 at 05:09:17PM +0300, Denis V. Lunev wrote: > trace_mirror_yield_in_flight accepts 2nd arguments in sectors while here > we pass chunks instead. > > Signed-off-by: Denis V. Lunev > CC: Jeff Cody > CC: Kevin Wolf > CC: Max

Re: [Qemu-block] [PATCH v2 00/17] Byte-based block limits

2016-06-21 Thread Eric Blake
On 06/21/2016 08:18 AM, Kevin Wolf wrote: > Am 14.06.2016 um 23:30 hat Eric Blake geschrieben: >> BlockLimits is currently an ugly mix of byte limits vs. >> sector limits. Unify it. Fix some bugs I found in >> bdrv_aligned_preadv() while at it. >> >> Prequisite: Kevin's ongoing work to migrate

Re: [Qemu-block] [PATCH v2 17/17] block: Move request_alignment into BlockLimit

2016-06-21 Thread Eric Blake
On 06/21/2016 08:16 AM, Kevin Wolf wrote: > Am 14.06.2016 um 23:30 hat Eric Blake geschrieben: >> It makes more sense to have ALL block size limit constraints >> in the same struct. Improve the documentation while at it. >> >> Signed-off-by: Eric Blake >> >> --- >> struct

Re: [Qemu-block] [PATCH v2 16/17] block: Split bdrv_merge_limits() from bdrv_refresh_limits()

2016-06-21 Thread Eric Blake
On 06/21/2016 08:12 AM, Kevin Wolf wrote: > Am 14.06.2016 um 23:30 hat Eric Blake geschrieben: >> The raw block driver was blindly copying all limits from bs->file, >> even though: 1. the main bdrv_refresh_limits() already does this >> for many of gthe limits, and 2. blindly copying from the

Re: [Qemu-block] [PATCH v2 15/17] block: Switch discard length bounds to byte-based

2016-06-21 Thread Eric Blake
On 06/21/2016 08:05 AM, Kevin Wolf wrote: > Am 14.06.2016 um 23:30 hat Eric Blake geschrieben: >> Sector-based limits are awkward to think about; in our on-going >> quest to move to byte-based interfaces, convert max_discard and >> discard_alignment. Rename them, using 'pdiscard' as an aid to >>

Re: [Qemu-block] [PATCH v2 14/17] block: Switch transfer length bounds to byte-based

2016-06-21 Thread Eric Blake
On 06/21/2016 07:50 AM, Kevin Wolf wrote: > Am 14.06.2016 um 23:30 hat Eric Blake geschrieben: >> Sector-based limits are awkward to think about; in our on-going >> quest to move to byte-based interfaces, convert max_transfer_length >> and opt_transfer_length. Rename them (dropping the _length

Re: [Qemu-block] [PATCH v2 08/17] blkdebug: Set request_alignment during .bdrv_refresh_limits()

2016-06-21 Thread Eric Blake
On 06/21/2016 07:27 AM, Kevin Wolf wrote: > Am 14.06.2016 um 23:30 hat Eric Blake geschrieben: >> We want to eventually stick request_alignment alongside other >> BlockLimits, but first, we must ensure it is populated at the >> same time as all other limits, rather than being a special case >>

Re: [Qemu-block] [Qemu-devel] [PATCH 0/5] Auto-fragment large transactions at the block layer

2016-06-21 Thread Eric Blake
On 06/21/2016 04:23 AM, Stefan Hajnoczi wrote: > On Mon, Jun 20, 2016 at 05:39:24PM -0600, Eric Blake wrote: >> We have max_transfer documented in BlockLimits, but while we >> honor it during pwrite_zeroes, we were blindly ignoring it >> during pwritev and preadv, leading to multiple drivers

Re: [Qemu-block] [PATCH 04/15] block: Simplify find_block_job() and make it accept a job ID

2016-06-21 Thread Eric Blake
On 06/21/2016 06:27 AM, Alberto Garcia wrote: > On Mon 20 Jun 2016 08:53:08 PM CEST, Eric Blake wrote: >>> +static BlockJob *find_block_job(const char *id, const char *device, >>> +AioContext **aio_context, Error **errp) >> >> Can this signature just be const char

Re: [Qemu-block] [PATCH 11/13] ICH9 LPC: move call of isa_bus_irqs to 'realize' method

2016-06-21 Thread Paolo Bonzini
On 21/06/2016 15:46, Ефимов Василий wrote: >> I've sent a patch series for you to rebase patch 10 and 11 on. Let me >> know what you think! > I see no problems with the patch series. In second version, I'll create > named GPIO ("gsi") for the new IRQ vector gsi (patch 10). The vector > will be

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] Dynamic module loading for block drivers

2016-06-21 Thread Paolo Bonzini
On 21/06/2016 17:42, Colin Lord wrote: > It could easily return the BlockDriver then > using the name field. It seems to me that this would work, and would be > a fairly minor change from how things are now (in particular I think > that symlinks wouldn't be necessary with this). Yes, I agree.

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] Dynamic module loading for block drivers

2016-06-21 Thread Colin Lord
On 06/21/2016 05:32 AM, Stefan Hajnoczi wrote: > On Mon, Jun 20, 2016 at 11:32:38AM -0400, Colin Lord wrote: >> On 06/17/2016 05:54 AM, Stefan Hajnoczi wrote: >>> On Wed, Jun 15, 2016 at 02:40:53PM -0400, Colin Lord wrote: 1) Denis Lunev suggested having block_module_load_one return the

Re: [Qemu-block] [PATCH 15/15] blockjob: Add 'id' field to 'BlockJobInfo' and all BLOCK_JOB_* events

2016-06-21 Thread Alberto Garcia
On Mon 20 Jun 2016 09:14:04 PM CEST, Max Reitz wrote: > Also, I personally wouldn't mind making use of the IDs where trivial. > For example, you can just replace the "'device': 'virtio0'" by "'id': > 'commit1'" in the block-job-complete invocation in 144. Optional, of > course, but would make

Re: [Qemu-block] [PATCH v2 00/17] Byte-based block limits

2016-06-21 Thread Kevin Wolf
Am 14.06.2016 um 23:30 hat Eric Blake geschrieben: > BlockLimits is currently an ugly mix of byte limits vs. > sector limits. Unify it. Fix some bugs I found in > bdrv_aligned_preadv() while at it. > > Prequisite: Kevin's ongoing work to migrate bdrv_aligned_preadv() > to be byte-based (commit

Re: [Qemu-block] [PATCH v2 17/17] block: Move request_alignment into BlockLimit

2016-06-21 Thread Kevin Wolf
Am 14.06.2016 um 23:30 hat Eric Blake geschrieben: > It makes more sense to have ALL block size limit constraints > in the same struct. Improve the documentation while at it. > > Signed-off-by: Eric Blake > > --- > v2: drop hacks for save/restore of alignment, now that

Re: [Qemu-block] [PATCH v2 16/17] block: Split bdrv_merge_limits() from bdrv_refresh_limits()

2016-06-21 Thread Kevin Wolf
Am 14.06.2016 um 23:30 hat Eric Blake geschrieben: > The raw block driver was blindly copying all limits from bs->file, > even though: 1. the main bdrv_refresh_limits() already does this > for many of gthe limits, and 2. blindly copying from the children > can weaken any stricter limits that were

[Qemu-block] [PATCH v2 1/1] mirror: fix trace_mirror_yield_in_flight usage in mirror_iteration()

2016-06-21 Thread Denis V. Lunev
trace_mirror_yield_in_flight accepts 2nd arguments in sectors while here we pass chunks instead. Signed-off-by: Denis V. Lunev CC: Jeff Cody CC: Kevin Wolf CC: Max Reitz --- Changes from v1: - proper persons added to CC

Re: [Qemu-block] [PATCH 11/13] ICH9 LPC: move call of isa_bus_irqs to 'realize' method

2016-06-21 Thread Ефимов Василий
20.06.2016 17:40, Paolo Bonzini wrote: I've sent a patch series for you to rebase patch 10 and 11 on. Let me know what you think! I see no problems with the patch series. In second version, I'll create named GPIO ("gsi") for the new IRQ vector gsi (patch 10). The vector will be used to set

Re: [Qemu-block] [PATCH v2 08/17] blkdebug: Set request_alignment during .bdrv_refresh_limits()

2016-06-21 Thread Kevin Wolf
Am 14.06.2016 um 23:30 hat Eric Blake geschrieben: > We want to eventually stick request_alignment alongside other > BlockLimits, but first, we must ensure it is populated at the > same time as all other limits, rather than being a special case > that is set only when a block is first opened. > >

Re: [Qemu-block] [PATCH 04/15] block: Simplify find_block_job() and make it accept a job ID

2016-06-21 Thread Alberto Garcia
On Mon 20 Jun 2016 06:40:31 PM CEST, Max Reitz wrote: >> +error_setg(errp, "Block job '%s' not found", id ? id : device); > > This changes the error class if device is set. Not sure if that is > bad, but keeping the old behavior should be simple (unless you're sure > it's fine). You're

Re: [Qemu-block] [PATCH 04/15] block: Simplify find_block_job() and make it accept a job ID

2016-06-21 Thread Alberto Garcia
On Mon 20 Jun 2016 08:53:08 PM CEST, Eric Blake wrote: >> +static BlockJob *find_block_job(const char *id, const char *device, >> +AioContext **aio_context, Error **errp) > > Can this signature just be const char *id_or_device, rather than two > parameters,... But

Re: [Qemu-block] [PATCH v9 0/7] trace: enable tracing in qemu-io/qemu-nbd/qemu-img

2016-06-21 Thread Denis V. Lunev
On 06/17/2016 05:44 PM, Denis V. Lunev wrote: Changes from v8: - fixed comment in patch 3 - changed stub for trace_opt_parse() Changes from v7: - added missed qemu-option-trace.texi Changes from v6: - changed order of patches 1 & 2 Changes from v5: - added missed hunk into patch #7 Changes

Re: [Qemu-block] [PATCH 03/15] blockjob: Add block_job_get()

2016-06-21 Thread Alberto Garcia
On Mon 20 Jun 2016 06:24:30 PM CEST, Max Reitz wrote: >> Currently the way to look for a specific block job is to iterate the >> list manually using block_job_next(). >> >> Since we want to be able to identify a job primarily by its ID it >> makes sense to have a function that does just that. >>

Re: [Qemu-block] [PATCH 02/15] blockjob: Decouple the ID from the device name in the BlockJob struct

2016-06-21 Thread Alberto Garcia
On Mon 20 Jun 2016 06:17:30 PM CEST, Max Reitz wrote: > I suppose this patch tries to "silently" (i.e. not visibly) introduce > this new ID for now? If so, there is one instance of job->id left that > should probably be changed to job->device (in block_job_complete()). I decided to leave that

Re: [Qemu-block] [PATCH 00/17] block: Convert common I/O path to BdrvChild

2016-06-21 Thread Kevin Wolf
Am 21.06.2016 um 13:01 hat Paolo Bonzini geschrieben: > On 21/06/2016 12:56, Kevin Wolf wrote: > > Am 21.06.2016 um 11:47 hat Paolo Bonzini geschrieben: > >> I still fail to understand what is the rationale for this change. The > >> API is weird; you read from a disk, not from an edge, and in

Re: [Qemu-block] [PATCH 00/17] block: Convert common I/O path to BdrvChild

2016-06-21 Thread Paolo Bonzini
On 21/06/2016 12:56, Kevin Wolf wrote: > Am 21.06.2016 um 11:47 hat Paolo Bonzini geschrieben: >> >> >> On 21/06/2016 11:21, Kevin Wolf wrote: >>> This series converts all I/O function in the core block layer up to >>> bdrv_co_preadv/pwritev() to taking a BdrvChild as their first parameter >>>

Re: [Qemu-block] [PATCH 00/17] block: Convert common I/O path to BdrvChild

2016-06-21 Thread Kevin Wolf
Am 21.06.2016 um 11:47 hat Paolo Bonzini geschrieben: > > > On 21/06/2016 11:21, Kevin Wolf wrote: > > This series converts all I/O function in the core block layer up to > > bdrv_co_preadv/pwritev() to taking a BdrvChild as their first parameter > > instead of a BlockDriverState. > > > > The

Re: [Qemu-block] [Qemu-devel] [PATCH 0/5] Auto-fragment large transactions at the block layer

2016-06-21 Thread Kevin Wolf
Am 21.06.2016 um 12:23 hat Stefan Hajnoczi geschrieben: > On Mon, Jun 20, 2016 at 05:39:24PM -0600, Eric Blake wrote: > > We have max_transfer documented in BlockLimits, but while we > > honor it during pwrite_zeroes, we were blindly ignoring it > > during pwritev and preadv, leading to multiple

Re: [Qemu-block] [Qemu-devel] [PATCH 0/5] Auto-fragment large transactions at the block layer

2016-06-21 Thread Stefan Hajnoczi
On Mon, Jun 20, 2016 at 05:39:24PM -0600, Eric Blake wrote: > We have max_transfer documented in BlockLimits, but while we > honor it during pwrite_zeroes, we were blindly ignoring it > during pwritev and preadv, leading to multiple drivers having > to implement fragmentation themselves. This

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] Dynamic module loading for block drivers

2016-06-21 Thread Paolo Bonzini
On 21/06/2016 11:32, Stefan Hajnoczi wrote: > I think the issue comes from the fact that you are considering something > like load_block_module(const char *filename) as the API instead of > request_block_driver(const char *driver_name). In the latter case it's > possible to return a BlockDriver

Re: [Qemu-block] [PATCH 00/17] block: Convert common I/O path to BdrvChild

2016-06-21 Thread Paolo Bonzini
On 21/06/2016 11:21, Kevin Wolf wrote: > This series converts all I/O function in the core block layer up to > bdrv_co_preadv/pwritev() to taking a BdrvChild as their first parameter > instead of a BlockDriverState. > > The original motivation for this change were op blockers, where one of >

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] Dynamic module loading for block drivers

2016-06-21 Thread Stefan Hajnoczi
On Mon, Jun 20, 2016 at 11:32:38AM -0400, Colin Lord wrote: > On 06/17/2016 05:54 AM, Stefan Hajnoczi wrote: > > On Wed, Jun 15, 2016 at 02:40:53PM -0400, Colin Lord wrote: > >> 1) Denis Lunev suggested having block_module_load_one return the > >> loaded driver to reduce duplicated for loops in

[Qemu-block] [PATCH 14/17] block: Convert bdrv_pwrite(v/_sync) to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/io.c | 17 - block/parallels.c | 6 +++--- block/qcow.c | 14 +++--- block/qcow2-cache.c| 2 +- block/qcow2-cluster.c | 6 +++--- block/qcow2-refcount.c | 22 +++---

[Qemu-block] [PATCH 15/17] block: Convert bdrv_pwrite_zeroes() to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/block-backend.c | 5 + block/io.c | 9 + block/parallels.c | 2 +- block/qcow2-cluster.c | 2 +- block/qcow2.c | 4 ++-- include/block/block.h | 4 ++--

[Qemu-block] [PATCH 13/17] block: Convert bdrv_pread(v) to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block.c| 7 --- block/bochs.c | 6 +++--- block/cloop.c | 8 block/crypto.c | 2 +- block/dmg.c| 21 +++-- block/io.c | 8

[Qemu-block] [PATCH 12/17] block: Convert bdrv_write() to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/io.c | 5 +++-- block/qcow.c | 10 +- block/qcow2-cluster.c | 2 +- block/qcow2-refcount.c | 2 +- block/qcow2.c | 10 +- block/vdi.c| 4 ++-- block/vvfat.c | 5 ++---

[Qemu-block] [PATCH 11/17] block: Convert bdrv_read() to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/io.c| 4 ++-- block/qcow2-cluster.c | 6 +++--- block/vdi.c | 4 ++-- block/vvfat.c | 2 +- include/block/block.h | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/block/io.c b/block/io.c

[Qemu-block] [PATCH 17/17] block: Convert bdrv_co_preadv/pwritev to BdrvChild

2016-06-21 Thread Kevin Wolf
This is the final patch for converting the common I/O path to take a BdrvChild parameter instead of BlockDriverState. The completion of this conversion means that all users that perform I/O on an image need to actually hold a reference (in the form of BdrvChild, possible as part of a

[Qemu-block] [PATCH 16/17] block: Convert bdrv_prwv_co() to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/io.c | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/block/io.c b/block/io.c index 641cd49..78529fc 100644 --- a/block/io.c +++ b/block/io.c @@ -557,7 +557,7 @@ static int

[Qemu-block] [PATCH 06/17] block: Convert bdrv_aio_readv() to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/blkdebug.c | 2 +- block/blkverify.c | 4 ++-- block/io.c| 6 +++--- block/qed-table.c | 2 +- block/qed.c | 6 +++--- block/quorum.c| 4 ++-- include/block/block.h | 2 +- 7 files changed, 13

[Qemu-block] [PATCH 09/17] block: Move bdrv_commit() to block/commit.c

2016-06-21 Thread Kevin Wolf
No code changes, just moved from one file to another. Signed-off-by: Kevin Wolf --- block.c | 110 --- block/Makefile.objs | 3 +- block/commit.c | 111 3

[Qemu-block] [PATCH 03/17] vhdx: Some more BlockBackend use in vhdx_create()

2016-06-21 Thread Kevin Wolf
This does some easy conversions from bdrv_* to blk_* functions in vhdx_create(). We should avoid bypassing the BlockBackend layer whenever possible. Signed-off-by: Kevin Wolf --- block/vhdx.c | 41 + 1 file changed, 21 insertions(+), 20

[Qemu-block] [PATCH 05/17] block: Convert bdrv_co_writev() to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/crypto.c| 2 +- block/io.c| 6 +++--- block/parallels.c | 2 +- block/qcow.c | 2 +- block/vhdx.c | 2 +- include/block/block.h | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git

[Qemu-block] [PATCH 00/17] block: Convert common I/O path to BdrvChild

2016-06-21 Thread Kevin Wolf
This series converts all I/O function in the core block layer up to bdrv_co_preadv/pwritev() to taking a BdrvChild as their first parameter instead of a BlockDriverState. The original motivation for this change were op blockers, where one of the biggest problems is making sure that every user of

[Qemu-block] [PATCH 02/17] blkreplay: Convert to byte-based I/O

2016-06-21 Thread Kevin Wolf
The blkreplay driver only forwards the requests it gets, so converting it to byte granularity is trivial. Signed-off-by: Kevin Wolf --- block/blkreplay.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/block/blkreplay.c b/block/blkreplay.c

[Qemu-block] [PATCH 07/17] block: Convert bdrv_aio_writev() to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/blkdebug.c | 2 +- block/blkverify.c | 4 ++-- block/io.c| 6 +++--- block/qed-table.c | 2 +- block/qed.c | 6 +++--- block/quorum.c| 4 ++-- include/block/block.h | 2 +- 7 files changed, 13

[Qemu-block] [PATCH 01/17] vvfat: Use BdrvChild for s->qcow

2016-06-21 Thread Kevin Wolf
vvfat uses a temporary qcow file to cache written data in read-write mode. In order to do things properly, this should show up in the BDS graph and I/O should go through BdrvChild like for every other node. Signed-off-by: Kevin Wolf --- block/vvfat.c | 66

[Qemu-block] [PATCH 10/17] block: Use BlockBackend for I/O in bdrv_commit()

2016-06-21 Thread Kevin Wolf
Just like block jobs, the HMP commit command should use its own BlockBackend for doing I/O on BlockDriverStates. Signed-off-by: Kevin Wolf --- block/commit.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/block/commit.c

[Qemu-block] [PATCH 08/17] block: Convert bdrv_co_do_readv/writev to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/io.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/block/io.c b/block/io.c index 27721ce..299e9ec 100644 --- a/block/io.c +++ b/block/io.c @@ -33,7 +33,7 @@ #define NOT_DONE 0x7fff

[Qemu-block] [PATCH 04/17] block: Convert bdrv_co_readv() to BdrvChild

2016-06-21 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/crypto.c| 2 +- block/io.c| 8 block/parallels.c | 2 +- block/qcow.c | 5 ++--- block/raw_bsd.c | 2 +- block/vhdx.c | 2 +- include/block/block.h | 4 ++-- 7 files changed, 12

Re: [Qemu-block] [PATCH 1/1] block: ignore flush requests when storage is clean

2016-06-21 Thread Kevin Wolf
Am 21.06.2016 um 10:17 hat Denis V. Lunev geschrieben: > On 06/21/2016 10:45 AM, Kevin Wolf wrote: > >Am 21.06.2016 um 09:32 hat Paolo Bonzini geschrieben: > >> > >>On 20/06/2016 17:19, Denis V. Lunev wrote: > >>>+/* Check if storage is actually dirty before flushing to disk */ > >>>+if

Re: [Qemu-block] [PATCH 1/1] block: ignore flush requests when storage is clean

2016-06-21 Thread Denis V. Lunev
On 06/21/2016 10:45 AM, Kevin Wolf wrote: Am 21.06.2016 um 09:32 hat Paolo Bonzini geschrieben: On 20/06/2016 17:19, Denis V. Lunev wrote: +/* Check if storage is actually dirty before flushing to disk */ +if (!bs->dirty) { +goto flush_parent; +} +bs->dirty = false; +

Re: [Qemu-block] [PATCH 1/1] block: ignore flush requests when storage is clean

2016-06-21 Thread Denis V. Lunev
On 06/21/2016 10:32 AM, Paolo Bonzini wrote: On 20/06/2016 17:19, Denis V. Lunev wrote: +/* Check if storage is actually dirty before flushing to disk */ +if (!bs->dirty) { +goto flush_parent; +} +bs->dirty = false; + This should be cleared after the flush is complete.

Re: [Qemu-block] [PATCH 1/1] block: ignore flush requests when storage is clean

2016-06-21 Thread Kevin Wolf
Am 21.06.2016 um 09:32 hat Paolo Bonzini geschrieben: > > > On 20/06/2016 17:19, Denis V. Lunev wrote: > > +/* Check if storage is actually dirty before flushing to disk */ > > +if (!bs->dirty) { > > +goto flush_parent; > > +} > > +bs->dirty = false; > > + > > This

Re: [Qemu-block] [PATCH 1/1] block: ignore flush requests when storage is clean

2016-06-21 Thread Paolo Bonzini
On 20/06/2016 17:19, Denis V. Lunev wrote: > +/* Check if storage is actually dirty before flushing to disk */ > +if (!bs->dirty) { > +goto flush_parent; > +} > +bs->dirty = false; > + This should be cleared after the flush is complete. If you have write begin