Host devices passed through as scsi-block or scsi-generic may have a compound
maximum I/O limit (out of physical hardware limit, driver quirks and file
system configuration, etc) that is presented in the sysfs entry. SG_IOs we
issue should respect this. However the value is currently not discoverab
This is sometimes a useful value we should count in.
Signed-off-by: Fam Zheng
---
block/raw-posix.c | 47 +++
1 file changed, 47 insertions(+)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index a4f5a1b..d3796ad 100644
--- a/block/raw-posix.c
+++
The rationale is similar to the above mode sense response interception:
this is practically the only channel to communicate restraints from
elsewhere such as host and block driver.
The scsi bus we attach onto can have a larger max xfer len than what is
accepted by the host file system (guarding be
From: "Denis V. Lunev"
We should split requests even if they are less than write_zeroes_alignment.
For example we can have the following request:
offset 62k
size 4k
write_zeroes_alignment 64k
The original code sent 1 request covering 2 qcow2 clusters, and resulted
in both clusters being a
Add another test to 154, showing that we currently allocate a
data cluster in the top layer if any sector of the backing file
was allocated. The next patch will optimize this case.
Signed-off-by: Eric Blake
---
tests/qemu-iotests/154 | 40
tests/qemu
From: "Denis V. Lunev"
Unaligned requests will occupy only one cluster. This is true since the
previous commit. Simplify the code taking this consideration into
account.
In other words, the caller is now buggy if it ever passes us an unaligned
request that crosses cluster boundaries (the only re
From: "Denis V. Lunev"
This patch follows guidelines of all other tracepoints in qcow2, like ones
in qcow2_co_writev. I think that they should dump values in the same
quantities or be changed all together.
Signed-off-by: Denis V. Lunev
CC: Eric Blake
CC: Kevin Wolf
Message-Id: <1463476543-308
is_zero_cluster() and is_zero_cluster_top_locked() are used only
by qcow2_co_write_zeroes(). The former is too broad (we don't
care if the sectors we are about to overwrite are non-zero, only
that all other sectors in the cluster are zero), so it needs to
be called up to twice but with smaller lim
This series improves write_zeroes for qcow2
Since the work conflicts with my proposed patches to switch
write_zeroes to a byte-base interface, I figured I'd fix the
bugs and get this part nailed first, then rebase my other
work on top, rather than making Denis have to do the dirty work.
Changes f
On Wed, 05/25 17:45, Vladimir Sementsov-Ogievskiy wrote:
> Hi!
>
> Are you going to update the series in the near future?
Yes, probably in a couple days.
Fam
>
> On 08.03.2016 07:44, Fam Zheng wrote:
> > v4: Rebase.
> > Add rev-by from John in patches 1-5, 7, 8.
> > Remove BdrvDirtyB
There is a single remaining user in qemu-img, and another one in a test
case, both of which can be trivially converted to using BlockJob.blk
instead.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
Reviewed-by: Eric Blake
---
blockjob.c| 1 -
include/block/blockjob.h | 1 -
q
This changes the commit block job to use the job's BlockBackend for
performing its I/O. job->bs isn't used by the commit code any more
afterwards.
Signed-off-by: Kevin Wolf
Reviewed-by: Eric Blake
Reviewed-by: Max Reitz
---
block/commit.c | 53 +-
From: John Snow
Instead of relying on peeking at bs->job, we want to explicitly get
a reference to the job that was involved in this notifier callback.
Pack the Notifier inside of the BackupBlockJob so we can use
container_of to get a reference back to the BackupBlockJob object.
This cuts out o
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
Reviewed-by: Alberto Garcia
---
block/backup.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/block/backup.c b/block/backup.c
index fec45e8..a990cf1 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -485,6 +485,7 @@
This adds a new BlockBackend field to the BlockJob struct, which
coexists with the BlockDriverState while converting the individual jobs.
When creating a block job, a new BlockBackend is created on top of the
given BlockDriverState, and it is destroyed when the BlockJob ends. The
reference to the
From: Eric Blake
Commit 983a1600 changed the semantics of blk_write_zeroes() to
be byte-based rather than sector-based, but did not change the
name, which is an open invitation for other code to misuse the
function. Renaming to pwrite_zeroes() makes it more in line
with other byte-based interfac
This changes the backup block job to use the job's BlockBackend for
performing its I/O. job->bs isn't used by the backup code any more
afterwards.
Signed-off-by: Kevin Wolf
Reviewed-by: Eric Blake
Reviewed-by: Max Reitz
---
block/backup.c| 46 +--
We had to forbid mirroring to a target BDS that already had a BB
attached because the node swapping at job completion would add a second
BB and we didn't support multiple BBs on a single BDS at the time. Now
we do, so we can lift the restriction.
As we allow additional BlockBackends for the target
This changes the mirror block job to use the job's BlockBackend for
performing its I/O. job->bs isn't used by the mirroring code any more
afterwards.
Signed-off-by: Kevin Wolf
Reviewed-by: Eric Blake
Reviewed-by: Max Reitz
---
block/mirror.c | 70 ---
From: Max Reitz
blk_new() cannot fail so its Error ** parameter has become superfluous.
Signed-off-by: Max Reitz
Signed-off-by: Kevin Wolf
---
block/block-backend.c | 9 ++---
blockdev.c | 6 +-
include/sysemu/block-backend.h | 2 +-
tests/test-throttle.c
This changes the streaming block job to use the job's BlockBackend for
performing the COR reads. job->bs isn't used by the streaming code any
more afterwards.
Signed-off-by: Kevin Wolf
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
Reviewed-by: Max Reitz
---
block/io.c| 9 --
So far, bdrv_close_all() first removed all root BlockDriverStates of
BlockBackends and monitor owned BDSes, and then assumed that the
remaining BDSes must be related to jobs and cancelled these jobs.
This order doesn't work that well any more when block jobs use
BlockBackends internally because th
Also add trace points now that the function can be directly called.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
---
block/block-backend.c | 21 ++---
include/sysemu/block-backend.h | 6 ++
trace-events
Now that we pass the job to the function, bs is implied by that.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
Reviewed-by: Alberto Garcia
---
block/backup.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/block/backup.c b/block/backup.c
index a57288f..670b
From: Alberto Garcia
The current way to obtain the list of existing block jobs is to
iterate over all root nodes and check which ones own a job.
Since we want to be able to support block jobs in other nodes as well,
this patch keeps a list of jobs that is updated every time one is
created or des
From: Paolo Bonzini
Signed-off-by: Paolo Bonzini
Signed-off-by: Kevin Wolf
---
dma-helpers.c| 14 +++---
hw/block/nvme.c | 6 +++---
hw/ide/ahci.c| 6 --
hw/ide/core.c| 8 +---
hw/scsi/scsi-disk.c | 6 --
include/sysemu/dma.h | 6 +++---
t
This adds a common function that is called when attaching a new child to
a parent, removing a child from a parent and when reconfiguring the
graph so that an existing child points to a different node now.
Signed-off-by: Kevin Wolf
Reviewed-by: Eric Blake
Reviewed-by: Fam Zheng
---
block.c | 26
From: Paolo Bonzini
Callers of dma_blk_io have no way to pass extra data to the DMAIOFunc,
because the original callback and opaque are gone by the time DMAIOFunc
is called. On the other hand, the BlockBackend is usually derived
from those extra data that you could pass to the DMAIOFunc (in the
When draining intermediate nodes (i.e. nodes that aren't the root node
for at least one of their parents; with node references, the user can
always configure the graph to create this situation), we need to
propagate the .drained_begin/end callbacks all the way up to the root
for the drain to be eff
Until now, bdrv_drained_begin() used bdrv_drain() internally to drain
the queue. This is kind of backwards and caused quiescing code to be
duplicated because bdrv_drained_begin() had to ensure that no new
requests come in even after bdrv_drain() returns, whereas bdrv_drain()
had to have them becaus
The existing users of the function are:
1. blk_new_open(), which already enabled the write cache
2. Some test cases that don't care about the setting
3. blockdev_init() for empty drives, where the cache mode is overridden
with the value from the options when a medium is inserted
Therefore, thi
When changing the BlockDriverState that a BdrvChild points to while the
node is currently drained, we must call the .drained_end() parent
callback. Conversely, when this means attaching a new node that is
already drained, we need to call .drained_begin().
bdrv_root_attach_child() takes now an opaq
From: Max Reitz
The only caller of bdrv_close() left is bdrv_delete(). We may as well
assert that, in a way (there are some things in bdrv_close() that make
more sense under that assumption, such as the call to
bdrv_release_all_dirty_bitmaps() which in turn assumes that no frozen
bitmaps are atta
From: Max Reitz
Now that throttling has been moved to the BlockBackend level, we do not
need to create a BDS along with the BB in the I/O throttling test.
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
Signed-off-by: Kevin Wolf
---
tests/test-throttle.c | 6 +++---
1 file changed, 3 insert
From: Max Reitz
There are no callers to bdrv_open() or bdrv_open_inherit() left that
pass a pointer to a non-NULL BDS pointer as the first argument of these
functions, so we can finally drop that parameter and just make them
return the new BDS.
Generally, the following pattern is applied:
b
From: Max Reitz
bdrv_close() now asserts that the BDS's refcount is 0, therefore it
cannot have any parents and the bdrv_parent_cb_change_media() call is a
no-op.
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
Signed-off-by: Kevin Wolf
---
block.c | 2 --
1 file changed, 2 deletions(-)
di
The bdrv_next() users all leaked the BdrvNextIterator after completing
the iteration. Simply changing bdrv_next() to free the iterator before
returning NULL at the end of list doesn't work because some callers exit
the loop before looking at all BDSes.
This patch moves the BdrvNextIterator from th
From: Max Reitz
If bdrv_open_inherit() creates a snapshot BDS and *pbs is NULL, that
snapshot BDS should be returned instead of the BDS under it.
This has worked so far because (nearly) all users of BDRV_O_SNAPSHOT use
blk_new_open() to create the BDS tree. bdrv_append() (which is called by
bdrv
From: Max Reitz
Its only caller is blk_new_open(), so we can just inline it there.
The bdrv_new_root() call is dropped in the process because we can just
let bdrv_open() create the BDS.
Signed-off-by: Max Reitz
Signed-off-by: Kevin Wolf
---
block/block-backend.c | 30 +++
The following changes since commit 287db79df8af8e31f18e262feb5e05103a09e4d4:
Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into
staging (2016-05-24 13:06:33 +0100)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git tags/for-upstream
for you to
From: Max Reitz
It is unused now, so we may just as well drop it.
Signed-off-by: Max Reitz
Reviewed-by: Alberto Garcia
Reviewed-by: Kevin Wolf
Signed-off-by: Kevin Wolf
---
block.c | 5 -
include/block/block.h | 1 -
2 files changed, 6 deletions(-)
diff --git a/block.c b/
From: Max Reitz
bdrv_append_temp_snapshot() uses bdrv_new() to create an empty BDS
before invoking bdrv_open() on that BDS. This is probably a relict from
when it used to do some modifications on that empty BDS, but now that is
unnecessary, so we can just set bs_snapshot to NULL and let bdrv_open
Am 23.05.2016 um 14:54 hat Paolo Bonzini geschrieben:
> scsi-block uses the block layer for reads and writes in order to avoid
> allocating bounce buffers as big as the transferred data. We know how
> to split a large transfer to multiple reads and writes, and thus we can
> use scsi-disk.c's exist
On 05/25/2016 06:29 AM, Kevin Wolf wrote:
> There is a single remaining user in qemu-img, and another one in a test
> case, both of which can be trivially converted to using BlockJob.blk
> instead.
>
> Signed-off-by: Kevin Wolf
> ---
> blockjob.c| 1 -
> include/block/blockjob.h
On 25.05.2016 14:29, Kevin Wolf wrote:
> There is a single remaining user in qemu-img, and another one in a test
> case, both of which can be trivially converted to using BlockJob.blk
> instead.
>
> Signed-off-by: Kevin Wolf
> ---
> blockjob.c| 1 -
> include/block/blockjob.h |
On 25.05.2016 14:29, Kevin Wolf wrote:
> This changes the backup block job to use the job's BlockBackend for
> performing its I/O. job->bs isn't used by the backup code any more
> afterwards.
>
> Signed-off-by: Kevin Wolf
> Reviewed-by: Eric Blake
> ---
> block/backup.c| 46
Am 25.05.2016 um 16:28 hat Eric Blake geschrieben:
> On 05/25/2016 08:07 AM, Kevin Wolf wrote:
> > Am 25.05.2016 um 00:25 hat Eric Blake geschrieben:
> >> Another step on our continuing quest to switch to byte-based
> >> interfaces.
> >>
> >> Kill an abuse of the comma operator while at it (fortuna
On 25.05.2016 14:29, Kevin Wolf wrote:
> This changes the commit block job to use the job's BlockBackend for
> performing its I/O. job->bs isn't used by the commit code any more
> afterwards.
>
> Signed-off-by: Kevin Wolf
> Reviewed-by: Eric Blake
> ---
> block/commit.c | 53 +++
On 25.05.2016 14:29, Kevin Wolf wrote:
> This changes the mirror block job to use the job's BlockBackend for
> performing its I/O. job->bs isn't used by the mirroring code any more
> afterwards.
>
> Signed-off-by: Kevin Wolf
> Reviewed-by: Eric Blake
> ---
> block/mirror.c | 70
> +
On 25.05.2016 14:29, Kevin Wolf wrote:
> This changes the streaming block job to use the job's BlockBackend for
> performing the COR reads. job->bs isn't used by the streaming code any
> more afterwards.
>
> Signed-off-by: Kevin Wolf
> Reviewed-by: Eric Blake
> Reviewed-by: Alberto Garcia
> ---
On 25.05.2016 14:29, Kevin Wolf wrote:
> Also add trace points now that the function can be directly called.
>
> Signed-off-by: Kevin Wolf
> ---
> block/block-backend.c | 21 ++---
> include/sysemu/block-backend.h | 6 ++
> trace-events | 4
>
On 25.05.2016 14:29, Kevin Wolf wrote:
> This adds a new BlockBackend field to the BlockJob struct, which
> coexists with the BlockDriverState while converting the individual jobs.
>
> When creating a block job, a new BlockBackend is created on top of the
> given BlockDriverState, and it is destro
On 05/25/2016 08:23 AM, Kevin Wolf wrote:
> Am 25.05.2016 um 00:25 hat Eric Blake geschrieben:
>> Another step on our continuing quest to switch to byte-based
>> interfaces.
>>
>> Signed-off-by: Eric Blake
>> ---
>> block/vmdk.c | 13 ++---
>> 1 file changed, 6 insertions(+), 7 deletions(
On 25.05.2016 14:29, Kevin Wolf wrote:
> From: Eric Blake
>
> Commit 983a1600 changed the semantics of blk_write_zeroes() to
> be byte-based rather than sector-based, but did not change the
> name, which is an open invitation for other code to misuse the
> function. Renaming to pwrite_zeroes() m
Hi!
Are you going to update the series in the near future?
On 08.03.2016 07:44, Fam Zheng wrote:
v4: Rebase.
Add rev-by from John in patches 1-5, 7, 8.
Remove BdrvDirtyBitmap typedef from dirty-bitmap.h in patch 4. [Max]
Add assertion on bm->meta in patch 9. [John]
Two major fea
On 25.05.2016 14:29, Kevin Wolf wrote:
> So far, bdrv_close_all() first removed all root BlockDriverStates of
> BlockBackends and monitor owned BDSes, and then assumed that the
> remaining BDSes must be related to jobs and cancelled these jobs.
>
> This order doesn't work that well any more when b
Am 25.05.2016 um 00:25 hat Eric Blake geschrieben:
> Now that all drivers have been converted to a byte interface,
> we no longer need a sector interface.
>
> Signed-off-by: Eric Blake
Reviewed-by: Kevin Wolf
Am 25.05.2016 um 00:25 hat Eric Blake geschrieben:
> Another step on our continuing quest to switch to byte-based
> interfaces.
>
> Signed-off-by: Eric Blake
> ---
> block/vmdk.c | 13 ++---
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/block/vmdk.c b/block/vmdk.c
>
On 05/25/2016 08:07 AM, Kevin Wolf wrote:
> Am 25.05.2016 um 00:25 hat Eric Blake geschrieben:
>> Another step on our continuing quest to switch to byte-based
>> interfaces.
>>
>> Kill an abuse of the comma operator while at it (fortunately,
>> the semantics were still right).
>>
>> Signed-off-by:
On 17.05.2016 09:35, Fam Zheng wrote:
> Signed-off-by: Fam Zheng
> ---
> tests/qemu-iotests/153 | 197 +
> tests/qemu-iotests/153.out | 426
> +
> tests/qemu-iotests/group | 1 +
> 3 files changed, 624 insertions(+)
> creat
Am 25.05.2016 um 00:25 hat Eric Blake geschrieben:
> Another step on our continuing quest to switch to byte-based
> interfaces.
>
> Signed-off-by: Eric Blake
Reviewed-by: Kevin Wolf
Am 25.05.2016 um 00:25 hat Eric Blake geschrieben:
> Another step on our continuing quest to switch to byte-based
> interfaces.
>
> Signed-off-by: Eric Blake
> ---
> block/raw-posix.c | 37 +++--
> trace-events | 2 +-
> 2 files changed, 16 insertions(+), 23
Am 25.05.2016 um 00:25 hat Eric Blake geschrieben:
> Another step on our continuing quest to switch to byte-based
> interfaces.
>
> Kill an abuse of the comma operator while at it (fortunately,
> the semantics were still right).
>
> Signed-off-by: Eric Blake
> ---
> block/qed.c | 25 +++
On 05/25/2016 06:29 AM, Kevin Wolf wrote:
> Also add trace points now that the function can be directly called.
>
> Signed-off-by: Kevin Wolf
> ---
> block/block-backend.c | 21 ++---
> include/sysemu/block-backend.h | 6 ++
> trace-events | 4 +++
On 17.05.2016 09:35, Fam Zheng wrote:
> Now that test cases are covered, we can turn it on.
>
> Signed-off-by: Fam Zheng
> ---
> blockdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Max Reitz
signature.asc
Description: OpenPGP digital signature
Am 25.05.2016 um 00:25 hat Eric Blake geschrieben:
> Another step on our continuing quest to switch to byte-based
> interfaces.
>
> Signed-off-by: Eric Blake
> ---
> block/gluster.c | 15 +++
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/block/gluster.c b/block/
On 17.05.2016 09:35, Fam Zheng wrote:
> With image locking, opening /dev/null can fail when multiple tests run
> in parallel (make -j2, for example). Use null-co:// as the null protocol
> doesn't do image locking.
>
> While it's arguable we could special-case /dev/null, /dev/zero,
> /dev/urandom e
Am 25.05.2016 um 00:25 hat Eric Blake geschrieben:
> Another step on our continuing quest to switch to byte-based
> interfaces.
>
> Signed-off-by: Eric Blake
Reviewed-by: Kevin Wolf
Am 25.05.2016 um 00:25 hat Eric Blake geschrieben:
> Another step on our continuing quest to switch to byte-based
> interfaces.
>
> There are still opportunities to optimize the qcow2 handling
> of zero clusters. For example, if the backing file only has
> non-zero data in the portion about to be
On 17.05.2016 09:35, Fam Zheng wrote:
> The cases is about live snapshot features. Disable image locking because
> otherwise a few tests are going to fail because we reuse the same images
> at blockdev-add.
>
> Signed-off-by: Fam Zheng
> ---
> tests/qemu-iotests/085 | 3 ++-
> 1 file changed, 2
Am 25.05.2016 um 00:25 hat Eric Blake geschrieben:
> Rename to bdrv_pwrite_zeroes() to let the compiler ensure we
> cater to the updated semantics. Do the same for
> bdrv_aio_write_zeroes() and bdrv_co_write_zeroes(). For now,
> we still require sector alignment in the callers, via assertions.
>
On 17.05.2016 09:35, Fam Zheng wrote:
> Otherwise the error handling we are expceting will be masked by the
*expecting
> preceding image locking check, and is going to be indistinguishable
> because the error messages are all the same.
>
> Signed-off-by: Fam Zheng
> ---
> tests/qemu-iotests/08
On Wed 25 May 2016 02:29:14 PM CEST, Kevin Wolf wrote:
> Also add trace points now that the function can be directly called.
>
> Signed-off-by: Kevin Wolf
Reviewed-by: Alberto Garcia
Berto
On 17.05.2016 09:35, Fam Zheng wrote:
> Otherwise the error handling we are expceting will be masked by the
*expecting
> preceding image locking check, and is going to be indistinguishable
> because the error messages are all the same.
>
> Signed-off-by: Fam Zheng
> ---
> tests/qemu-iotests/08
On 17.05.2016 09:35, Fam Zheng wrote:
> So the image lock won't complain.
>
> Signed-off-by: Fam Zheng
> ---
> tests/qemu-iotests/046 | 22 --
> 1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046
> index e528b67
On 17.05.2016 09:35, Fam Zheng wrote:
> The VM is still on, the image locking check would complain.
No, it wouldn't. We are opening an NBD URL that is provided by the VM.
Even if it would, we are only reading data, so an -r would probably be
better than an -L.
Max
>
> Signed-off-by: Fam Zheng
Am 25.05.2016 um 00:25 hat Eric Blake geschrieben:
> Another step on our continuing quest to switch to byte-based
> interfaces.
>
> As this is the first byte-based iscsi interface, convert
> is_request_lun_aligned() into two versions, one for sectors
> and one for bytes.
>
> Signed-off-by: Eric B
On 17.05.2016 09:35, Fam Zheng wrote:
> The VM is running, qemu-io would fail the lock acquisition.
>
> Signed-off-by: Fam Zheng
> ---
> tests/qemu-iotests/030 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Max Reitz
signature.asc
Description: OpenPGP digital signature
On 17.05.2016 09:35, Fam Zheng wrote:
> We should wait for the QEMU process to terminate and close the image
> before we check the data.
>
> Signed-off-by: Fam Zheng
> ---
> tests/qemu-iotests/091 | 3 +++
> tests/qemu-iotests/091.out | 1 +
> 2 files changed, 4 insertions(+)
Reviewed-by: M
Am 25.05.2016 um 00:25 hat Eric Blake geschrieben:
> Update bdrv_co_do_write_zeroes() to be byte-based, and select
> between the new byte-based bdrv_co_pwrite_zeroes() or the old
> bdrv_co_write_zeroes(). The next patches will convert drivers,
> then remove the old interface.
>
> Signed-off-by: E
This changes the backup block job to use the job's BlockBackend for
performing its I/O. job->bs isn't used by the backup code any more
afterwards.
Signed-off-by: Kevin Wolf
Reviewed-by: Eric Blake
---
block/backup.c| 46 +-
block/io.c
Now that we pass the job to the function, bs is implied by that.
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
Reviewed-by: Alberto Garcia
---
block/backup.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/block/backup.c b/block/backup.c
index a57288f..670b
This changes the commit block job to use the job's BlockBackend for
performing its I/O. job->bs isn't used by the commit code any more
afterwards.
Signed-off-by: Kevin Wolf
Reviewed-by: Eric Blake
---
block/commit.c | 53 +
1 file changed, 33
Am 25.05.2016 um 13:25 hat Eric Blake geschrieben:
> On 05/25/2016 04:59 AM, Eric Blake wrote:
> > +/* Ignore unaligned head or tail, until block layer adds byte
> > + * interface */
> > +if (request.len >= BDRV_SECTOR_SIZE) {
> > +request.len -= (request.from +
We had to forbid mirroring to a target BDS that already had a BB
attached because the node swapping at job completion would add a second
BB and we didn't support multiple BBs on a single BDS at the time. Now
we do, so we can lift the restriction.
As we allow additional BlockBackends for the target
There is a single remaining user in qemu-img, and another one in a test
case, both of which can be trivially converted to using BlockJob.blk
instead.
Signed-off-by: Kevin Wolf
---
blockjob.c| 1 -
include/block/blockjob.h | 1 -
qemu-img.c| 2 +-
tests/test-block
Signed-off-by: Kevin Wolf
Reviewed-by: Max Reitz
Reviewed-by: Alberto Garcia
---
block/backup.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/block/backup.c b/block/backup.c
index fec45e8..a990cf1 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -485,6 +485,7 @@
From: John Snow
Instead of relying on peeking at bs->job, we want to explicitly get
a reference to the job that was involved in this notifier callback.
Pack the Notifier inside of the BackupBlockJob so we can use
container_of to get a reference back to the BackupBlockJob object.
This cuts out o
This changes the mirror block job to use the job's BlockBackend for
performing its I/O. job->bs isn't used by the mirroring code any more
afterwards.
Signed-off-by: Kevin Wolf
Reviewed-by: Eric Blake
---
block/mirror.c | 70 --
blockdev.c
This changes the streaming block job to use the job's BlockBackend for
performing the COR reads. job->bs isn't used by the streaming code any
more afterwards.
Signed-off-by: Kevin Wolf
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
---
block/io.c| 9 -
block/stream.c
This series changes the block jobs so that they have a separate BlockBackend
for every node on which they perform I/O. This doesn't only get us closer to
the goal of only doing I/O through blk_*() from external sources (and block
jobs are considered external), but can also later be used to use Bloc
So far, bdrv_close_all() first removed all root BlockDriverStates of
BlockBackends and monitor owned BDSes, and then assumed that the
remaining BDSes must be related to jobs and cancelled these jobs.
This order doesn't work that well any more when block jobs use
BlockBackends internally because th
Also add trace points now that the function can be directly called.
Signed-off-by: Kevin Wolf
---
block/block-backend.c | 21 ++---
include/sysemu/block-backend.h | 6 ++
trace-events | 4
3 files changed, 24 insertions(+), 7 deletions(-)
di
From: Eric Blake
Commit 983a1600 changed the semantics of blk_write_zeroes() to
be byte-based rather than sector-based, but did not change the
name, which is an open invitation for other code to misuse the
function. Renaming to pwrite_zeroes() makes it more in line
with other byte-based interfac
The existing users of the function are:
1. blk_new_open(), which already enabled the write cache
2. Some test cases that don't care about the setting
3. blockdev_init() for empty drives, where the cache mode is overridden
with the value from the options when a medium is inserted
Therefore, thi
This adds a new BlockBackend field to the BlockJob struct, which
coexists with the BlockDriverState while converting the individual jobs.
When creating a block job, a new BlockBackend is created on top of the
given BlockDriverState, and it is destroyed when the BlockJob ends. The
reference to the
From: Alberto Garcia
The current way to obtain the list of existing block jobs is to
iterate over all root nodes and check which ones own a job.
Since we want to be able to support block jobs in other nodes as well,
this patch keeps a list of jobs that is updated every time one is
created or des
On Tue 24 May 2016 03:47:34 PM CEST, Kevin Wolf wrote:
> There is a single remaining user in qemu-img, which can be trivially
> converted to using BlockJob.blk instead.
>
> Signed-off-by: Kevin Wolf
> Reviewed-by: Max Reitz
Reviewed-by: Alberto Garcia
Berto
On Tue 24 May 2016 03:47:31 PM CEST, Kevin Wolf wrote:
> Now that we pass the job to the function, bs is implied by that.
>
> Signed-off-by: Kevin Wolf
> Reviewed-by: Max Reitz
Reviewed-by: Alberto Garcia
Berto
On Tue 24 May 2016 03:47:26 PM CEST, Kevin Wolf wrote:
> This changes the streaming block job to use the job's BlockBackend for
> performing the COR reads. job->bs isn't used by the streaming code any
> more afterwards.
>
> Signed-off-by: Kevin Wolf
Reviewed-by: Alberto Garcia
Berto
1 - 100 of 117 matches
Mail list logo