Re: [Qemu-devel] [PATCH 0/7] blockjobs: preliminary refactoring work, Pt 1
On 10/26/2016 12:52 AM, Jeff Cody wrote: On Fri, Oct 14, 2016 at 02:32:55PM -0400, John Snow wrote: On 10/13/2016 06:56 PM, John Snow wrote: This is a follow-up to patches 1-6 of: [PATCH v2 00/11] blockjobs: Fix transactional race condition That series started trying to refactor blockjobs with the goal of internalizing BlockJob state as a side effect of having gone through the effort of figuring out which commands were "safe" to call on a Job that has no coroutine object. I've split out the less contentious bits so I can move forward with my original work of focusing on the transactional race condition in a different series. Functionally the biggest difference here is the presence of "internal" block jobs, which do not emit QMP events or show up in block query requests. This is done for the sake of replication jobs, which should not be interfering with the public jobs namespace. I have v2 ready to send out correcting Kevin's comments in patch #01, but I'd like to have the Replication maintainers at Fujitsu take a look at how I have modified replication and at least 'ACK' the change. As a recap: I am creating "internal" block jobs that have no ID and therefore do not collide with the user-specified jobs namespace. This way users cannot query, cancel, pause, or otherwise accidentally interfere with the replication job lifetime. It also means that management layers such as libvirt will not be aware of the presence of such "internal" jobs. Relevant patches are 1-3. Please let me know if you have questions. Thanks, --John Snow Looks good to me, once you address Kevin's comments in patch 1. Excellent, gracias. For convenience, this branch is available at: https://github.com/jnsnow/qemu.git branch job-refactor-pt1 https://github.com/jnsnow/qemu/tree/job-refactor-pt1 This version is tagged job-refactor-pt1-v1: https://github.com/jnsnow/qemu/releases/tag/job-refactor-pt1-v1 John Snow (7): blockjobs: hide internal jobs from management API blockjobs: Allow creating internal jobs Replication/Blockjobs: Create replication jobs as internal blockjob: centralize QMP event emissions Blockjobs: Internalize user_pause logic blockjobs: split interface into public/private, Part 1 blockjobs: fix documentation block/backup.c | 5 +- block/commit.c | 10 +- block/mirror.c | 28 +++-- block/replication.c | 14 +-- block/stream.c | 9 +- block/trace-events | 5 +- blockdev.c | 74 + blockjob.c | 109 ++ include/block/block.h| 3 +- include/block/block_int.h| 26 ++--- include/block/blockjob.h | 257 +++ include/block/blockjob_int.h | 232 ++ qemu-img.c | 5 +- tests/test-blockjob-txn.c| 5 +- tests/test-blockjob.c| 4 +- 15 files changed, 443 insertions(+), 343 deletions(-) create mode 100644 include/block/blockjob_int.h
Re: [Qemu-devel] [PATCH 0/7] blockjobs: preliminary refactoring work, Pt 1
On Fri, Oct 14, 2016 at 02:32:55PM -0400, John Snow wrote: > > > On 10/13/2016 06:56 PM, John Snow wrote: > >This is a follow-up to patches 1-6 of: > >[PATCH v2 00/11] blockjobs: Fix transactional race condition > > > >That series started trying to refactor blockjobs with the goal of > >internalizing BlockJob state as a side effect of having gone through > >the effort of figuring out which commands were "safe" to call on > >a Job that has no coroutine object. > > > >I've split out the less contentious bits so I can move forward with my > >original work of focusing on the transactional race condition in a > >different series. > > > >Functionally the biggest difference here is the presence of "internal" > >block jobs, which do not emit QMP events or show up in block query > >requests. This is done for the sake of replication jobs, which should > >not be interfering with the public jobs namespace. > > > > I have v2 ready to send out correcting Kevin's comments in patch #01, but > I'd like to have the Replication maintainers at Fujitsu take a look at how I > have modified replication and at least 'ACK' the change. > > As a recap: I am creating "internal" block jobs that have no ID and > therefore do not collide with the user-specified jobs namespace. This way > users cannot query, cancel, pause, or otherwise accidentally interfere with > the replication job lifetime. > > It also means that management layers such as libvirt will not be aware of > the presence of such "internal" jobs. > > Relevant patches are 1-3. Please let me know if you have questions. > > Thanks, > --John Snow > Looks good to me, once you address Kevin's comments in patch 1. > > > > > > >For convenience, this branch is available at: > >https://github.com/jnsnow/qemu.git branch job-refactor-pt1 > >https://github.com/jnsnow/qemu/tree/job-refactor-pt1 > > > >This version is tagged job-refactor-pt1-v1: > >https://github.com/jnsnow/qemu/releases/tag/job-refactor-pt1-v1 > > > >John Snow (7): > > blockjobs: hide internal jobs from management API > > blockjobs: Allow creating internal jobs > > Replication/Blockjobs: Create replication jobs as internal > > blockjob: centralize QMP event emissions > > Blockjobs: Internalize user_pause logic > > blockjobs: split interface into public/private, Part 1 > > blockjobs: fix documentation > > > > block/backup.c | 5 +- > > block/commit.c | 10 +- > > block/mirror.c | 28 +++-- > > block/replication.c | 14 +-- > > block/stream.c | 9 +- > > block/trace-events | 5 +- > > blockdev.c | 74 + > > blockjob.c | 109 ++ > > include/block/block.h| 3 +- > > include/block/block_int.h| 26 ++--- > > include/block/blockjob.h | 257 > > +++ > > include/block/blockjob_int.h | 232 ++ > > qemu-img.c | 5 +- > > tests/test-blockjob-txn.c| 5 +- > > tests/test-blockjob.c| 4 +- > > 15 files changed, 443 insertions(+), 343 deletions(-) > > create mode 100644 include/block/blockjob_int.h > >
Re: [Qemu-devel] [PATCH 0/7] blockjobs: preliminary refactoring work, Pt 1
On 10/13/2016 06:56 PM, John Snow wrote: This is a follow-up to patches 1-6 of: [PATCH v2 00/11] blockjobs: Fix transactional race condition That series started trying to refactor blockjobs with the goal of internalizing BlockJob state as a side effect of having gone through the effort of figuring out which commands were "safe" to call on a Job that has no coroutine object. I've split out the less contentious bits so I can move forward with my original work of focusing on the transactional race condition in a different series. Functionally the biggest difference here is the presence of "internal" block jobs, which do not emit QMP events or show up in block query requests. This is done for the sake of replication jobs, which should not be interfering with the public jobs namespace. I have v2 ready to send out correcting Kevin's comments in patch #01, but I'd like to have the Replication maintainers at Fujitsu take a look at how I have modified replication and at least 'ACK' the change. As a recap: I am creating "internal" block jobs that have no ID and therefore do not collide with the user-specified jobs namespace. This way users cannot query, cancel, pause, or otherwise accidentally interfere with the replication job lifetime. It also means that management layers such as libvirt will not be aware of the presence of such "internal" jobs. Relevant patches are 1-3. Please let me know if you have questions. Thanks, --John Snow For convenience, this branch is available at: https://github.com/jnsnow/qemu.git branch job-refactor-pt1 https://github.com/jnsnow/qemu/tree/job-refactor-pt1 This version is tagged job-refactor-pt1-v1: https://github.com/jnsnow/qemu/releases/tag/job-refactor-pt1-v1 John Snow (7): blockjobs: hide internal jobs from management API blockjobs: Allow creating internal jobs Replication/Blockjobs: Create replication jobs as internal blockjob: centralize QMP event emissions Blockjobs: Internalize user_pause logic blockjobs: split interface into public/private, Part 1 blockjobs: fix documentation block/backup.c | 5 +- block/commit.c | 10 +- block/mirror.c | 28 +++-- block/replication.c | 14 +-- block/stream.c | 9 +- block/trace-events | 5 +- blockdev.c | 74 + blockjob.c | 109 ++ include/block/block.h| 3 +- include/block/block_int.h| 26 ++--- include/block/blockjob.h | 257 +++ include/block/blockjob_int.h | 232 ++ qemu-img.c | 5 +- tests/test-blockjob-txn.c| 5 +- tests/test-blockjob.c| 4 +- 15 files changed, 443 insertions(+), 343 deletions(-) create mode 100644 include/block/blockjob_int.h
Re: [Qemu-devel] [PATCH 0/7] blockjobs: preliminary refactoring work, Pt 1
Hi, Your series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1476399422-8028-1-git-send-email-js...@redhat.com Subject: [Qemu-devel] [PATCH 0/7] blockjobs: preliminary refactoring work, Pt 1 === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log --oneline $BASE.. | wc -l) failed=0 # Useful git options git config --local diff.renamelimit 0 git config --local diff.renames True commits="$(git log --format=%H --reverse $BASE..)" for c in $commits; do echo "Checking PATCH $n/$total: $(git show --no-patch --format=%s $c)..." if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then failed=1 echo fi n=$((n+1)) done exit $failed === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 Switched to a new branch 'test' 42e8049 blockjobs: fix documentation 545d6e6 blockjobs: split interface into public/private, Part 1 6b894fe Blockjobs: Internalize user_pause logic 0863a3c blockjob: centralize QMP event emissions 1b493ef Replication/Blockjobs: Create replication jobs as internal ba80fb1 blockjobs: Allow creating internal jobs 76110a3 blockjobs: hide internal jobs from management API === OUTPUT BEGIN === Checking PATCH 1/7: blockjobs: hide internal jobs from management API... Checking PATCH 2/7: blockjobs: Allow creating internal jobs... Checking PATCH 3/7: Replication/Blockjobs: Create replication jobs as internal... Checking PATCH 4/7: blockjob: centralize QMP event emissions... Checking PATCH 5/7: Blockjobs: Internalize user_pause logic... Checking PATCH 6/7: blockjobs: split interface into public/private, Part 1... ERROR: struct BlockJobDriver should normally be const #182: FILE: include/block/blockjob.h:31: +typedef struct BlockJobDriver BlockJobDriver; ERROR: struct BlockJobDriver should normally be const #415: FILE: include/block/blockjob_int.h:37: +struct BlockJobDriver { ERROR: space prohibited between function name and open parenthesis '(' #459: FILE: include/block/blockjob_int.h:81: +void coroutine_fn (*pause)(BlockJob *job); ERROR: space prohibited between function name and open parenthesis '(' #466: FILE: include/block/blockjob_int.h:88: +void coroutine_fn (*resume)(BlockJob *job); total: 4 errors, 0 warnings, 558 lines checked Your patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. Checking PATCH 7/7: blockjobs: fix documentation... === OUTPUT END === Test command exited with code: 1 --- Email generated automatically by Patchew [http://patchew.org/]. Please send your feedback to patchew-de...@freelists.org
[Qemu-devel] [PATCH 0/7] blockjobs: preliminary refactoring work, Pt 1
This is a follow-up to patches 1-6 of: [PATCH v2 00/11] blockjobs: Fix transactional race condition That series started trying to refactor blockjobs with the goal of internalizing BlockJob state as a side effect of having gone through the effort of figuring out which commands were "safe" to call on a Job that has no coroutine object. I've split out the less contentious bits so I can move forward with my original work of focusing on the transactional race condition in a different series. Functionally the biggest difference here is the presence of "internal" block jobs, which do not emit QMP events or show up in block query requests. This is done for the sake of replication jobs, which should not be interfering with the public jobs namespace. For convenience, this branch is available at: https://github.com/jnsnow/qemu.git branch job-refactor-pt1 https://github.com/jnsnow/qemu/tree/job-refactor-pt1 This version is tagged job-refactor-pt1-v1: https://github.com/jnsnow/qemu/releases/tag/job-refactor-pt1-v1 John Snow (7): blockjobs: hide internal jobs from management API blockjobs: Allow creating internal jobs Replication/Blockjobs: Create replication jobs as internal blockjob: centralize QMP event emissions Blockjobs: Internalize user_pause logic blockjobs: split interface into public/private, Part 1 blockjobs: fix documentation block/backup.c | 5 +- block/commit.c | 10 +- block/mirror.c | 28 +++-- block/replication.c | 14 +-- block/stream.c | 9 +- block/trace-events | 5 +- blockdev.c | 74 + blockjob.c | 109 ++ include/block/block.h| 3 +- include/block/block_int.h| 26 ++--- include/block/blockjob.h | 257 +++ include/block/blockjob_int.h | 232 ++ qemu-img.c | 5 +- tests/test-blockjob-txn.c| 5 +- tests/test-blockjob.c| 4 +- 15 files changed, 443 insertions(+), 343 deletions(-) create mode 100644 include/block/blockjob_int.h -- 2.7.4