mbox

[PULL,00/46] Block layer patches

Message ID 20180523131155.12359-1-kwolf@redhat.com
State New
Headers show

Pull-request

git://repo.or.cz/qemu/kevin.git tags/for-upstream

Message

Kevin Wolf May 23, 2018, 1:11 p.m. UTC
The following changes since commit 4f50c1673a89b07f376ce5c42d22d79a79cd466d:

  Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2018-05-22 09:43:58 +0100)

are available in the git repository at:

  git://repo.or.cz/qemu/kevin.git tags/for-upstream

for you to fetch changes up to bdebdc712b06ba82e103d617c335830682cde242:

  qemu-iotests: Test job-* with block jobs (2018-05-23 14:30:52 +0200)

----------------------------------------------------------------
Block layer patches:

- Generic background jobs
- qemu-iotests fixes for NFS and the 'migration' group
- sheepdog: Minor code simplification

----------------------------------------------------------------
Kevin Wolf (45):
      qemu-iotests: Fix paths for NFS
      qemu-iotests: Filter NFS paths
      qemu-iotests: 086 doesn't work with NFS
      qemu-iotests: Add more tests to "migration" group
      qemu-iotests: Remove MIG_SOCKET from non-migration tests
      blockjob: Update block-job-pause/resume documentation
      blockjob: Improve BlockJobInfo.offset/len documentation
      job: Create Job, JobDriver and job_create()
      job: Rename BlockJobType into JobType
      job: Add JobDriver.job_type
      job: Add job_delete()
      job: Maintain a list of all jobs
      job: Move state transitions to Job
      job: Add reference counting
      job: Move cancelled to Job
      job: Add Job.aio_context
      job: Move defer_to_main_loop to Job
      job: Move coroutine and related code to Job
      job: Add job_sleep_ns()
      job: Move pause/resume functions to Job
      job: Replace BlockJob.completed with job_is_completed()
      job: Move BlockJobCreateFlags to Job
      blockjob: Split block_job_event_pending()
      job: Add job_event_*()
      job: Move single job finalisation to Job
      job: Convert block_job_cancel_async() to Job
      job: Add job_drain()
      job: Move .complete callback to Job
      job: Move job_finish_sync() to Job
      job: Switch transactions to JobTxn
      job: Move transactions to Job
      job: Move completion and cancellation to Job
      block: Cancel job in bdrv_close_all() callers
      job: Add job_yield()
      job: Add job_dismiss()
      job: Add job_is_ready()
      job: Add job_transition_to_ready()
      job: Move progress fields to Job
      job: Introduce qapi/job.json
      job: Add JOB_STATUS_CHANGE QMP event
      job: Add lifecycle QMP commands
      job: Add query-jobs QMP command
      blockjob: Remove BlockJob.driver
      iotests: Move qmp_to_opts() to VM
      qemu-iotests: Test job-* with block jobs

Peter Maydell (1):
      sheepdog: Remove unnecessary NULL check in sd_prealloc()

 qapi/block-core.json             |  116 +---
 qapi/job.json                    |  253 +++++++++
 qapi/qapi-schema.json            |    1 +
 include/block/block_int.h        |    2 +-
 include/block/blockjob.h         |  324 +----------
 include/block/blockjob_int.h     |  176 +-----
 include/qemu/job.h               |  562 ++++++++++++++++++++
 block.c                          |    2 +-
 block/backup.c                   |   59 +-
 block/commit.c                   |   44 +-
 block/mirror.c                   |  113 ++--
 block/replication.c              |   10 +-
 block/sheepdog.c                 |    4 +-
 block/stream.c                   |   39 +-
 blockdev.c                       |   68 +--
 blockjob.c                       | 1094 ++++++--------------------------------
 job-qmp.c                        |  188 +++++++
 job.c                            | 1000 ++++++++++++++++++++++++++++++++++
 qemu-img.c                       |   22 +-
 qemu-nbd.c                       |    8 +-
 tests/test-bdrv-drain.c          |   63 ++-
 tests/test-blockjob-txn.c        |   74 +--
 tests/test-blockjob.c            |  141 ++---
 vl.c                             |    1 +
 MAINTAINERS                      |    4 +
 Makefile                         |    9 +
 Makefile.objs                    |    7 +-
 block/trace-events               |    5 -
 tests/qemu-iotests/030           |   17 +-
 tests/qemu-iotests/040           |    2 +
 tests/qemu-iotests/041           |   23 +-
 tests/qemu-iotests/086           |    2 +-
 tests/qemu-iotests/094.out       |    7 +
 tests/qemu-iotests/095           |    2 +-
 tests/qemu-iotests/095.out       |    6 +
 tests/qemu-iotests/109           |    2 +-
 tests/qemu-iotests/109.out       |  178 ++++++-
 tests/qemu-iotests/124           |    8 +
 tests/qemu-iotests/126.out       |    2 +-
 tests/qemu-iotests/127.out       |    7 +
 tests/qemu-iotests/141           |   13 +-
 tests/qemu-iotests/141.out       |   29 +
 tests/qemu-iotests/144           |    2 +-
 tests/qemu-iotests/144.out       |    7 +
 tests/qemu-iotests/155           |    2 +-
 tests/qemu-iotests/156           |    2 +-
 tests/qemu-iotests/156.out       |    7 +
 tests/qemu-iotests/185           |   14 +-
 tests/qemu-iotests/185.out       |   10 +
 tests/qemu-iotests/191           |    6 +-
 tests/qemu-iotests/191.out       |  132 +++++
 tests/qemu-iotests/219           |  209 ++++++++
 tests/qemu-iotests/219.out       |  327 ++++++++++++
 tests/qemu-iotests/common.filter |    6 +-
 tests/qemu-iotests/common.rc     |   12 +-
 tests/qemu-iotests/group         |   11 +-
 tests/qemu-iotests/iotests.py    |   50 +-
 trace-events                     |   14 +
 58 files changed, 3601 insertions(+), 1897 deletions(-)
 create mode 100644 qapi/job.json
 create mode 100644 include/qemu/job.h
 create mode 100644 job-qmp.c
 create mode 100644 job.c
 create mode 100755 tests/qemu-iotests/219
 create mode 100644 tests/qemu-iotests/219.out

Comments

no-reply@patchew.org May 23, 2018, 2:02 p.m. UTC | #1
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20180523131155.12359-1-kwolf@redhat.com
Subject: [Qemu-devel] [PULL 00/46] Block layer patches

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --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
From https://github.com/patchew-project/qemu
 t [tag update]            patchew/1527034517-7851-1-git-send-email-mjc@sifive.com -> patchew/1527034517-7851-1-git-send-email-mjc@sifive.com
 t [tag update]            patchew/1527070950-208350-1-git-send-email-imammedo@redhat.com -> patchew/1527070950-208350-1-git-send-email-imammedo@redhat.com
 * [new tag]               patchew/20180523131155.12359-1-kwolf@redhat.com -> patchew/20180523131155.12359-1-kwolf@redhat.com
Switched to a new branch 'test'
aae2eed4b1 qemu-iotests: Test job-* with block jobs
a689b1966f iotests: Move qmp_to_opts() to VM
08f5e0497c blockjob: Remove BlockJob.driver
0085b65c93 job: Add query-jobs QMP command
1d5b7d49fb job: Add lifecycle QMP commands
bea5137eb4 job: Add JOB_STATUS_CHANGE QMP event
6e3f660c6c job: Introduce qapi/job.json
5355b1b58c job: Move progress fields to Job
9d268762dd job: Add job_transition_to_ready()
8e773e9eed job: Add job_is_ready()
f1ec86a985 job: Add job_dismiss()
4759fb0c3b job: Add job_yield()
66517b7d57 block: Cancel job in bdrv_close_all() callers
b4b2931166 job: Move completion and cancellation to Job
f42cb0be41 job: Move transactions to Job
01b9fdb39a job: Switch transactions to JobTxn
97347cade6 job: Move job_finish_sync() to Job
4a29e4bfa9 job: Move .complete callback to Job
3e9ca9c7a3 job: Add job_drain()
d43ca933aa job: Convert block_job_cancel_async() to Job
82596bdc04 job: Move single job finalisation to Job
1364587ef4 job: Add job_event_*()
c21f3e55b5 blockjob: Split block_job_event_pending()
e7c33c45a2 job: Move BlockJobCreateFlags to Job
f954ae0df7 job: Replace BlockJob.completed with job_is_completed()
46ffb33a19 job: Move pause/resume functions to Job
e0b0c50412 job: Add job_sleep_ns()
5d98bd8e34 job: Move coroutine and related code to Job
c4aeef62ce job: Move defer_to_main_loop to Job
8019880d71 job: Add Job.aio_context
d18b3a2985 job: Move cancelled to Job
5c2f0edff8 job: Add reference counting
91973c1d75 job: Move state transitions to Job
f4afc429f9 job: Maintain a list of all jobs
670104491e job: Add job_delete()
50226692ec job: Add JobDriver.job_type
85c2e2b99d job: Rename BlockJobType into JobType
e28a4a625f job: Create Job, JobDriver and job_create()
6e0b9d626f blockjob: Improve BlockJobInfo.offset/len documentation
5eb99c4e19 blockjob: Update block-job-pause/resume documentation
b89609ccfc qemu-iotests: Remove MIG_SOCKET from non-migration tests
19cf39414c qemu-iotests: Add more tests to "migration" group
0bb69f57d5 sheepdog: Remove unnecessary NULL check in sd_prealloc()
87654ad197 qemu-iotests: 086 doesn't work with NFS
d7728954a9 qemu-iotests: Filter NFS paths
ef360f2462 qemu-iotests: Fix paths for NFS

=== OUTPUT BEGIN ===
Checking PATCH 1/46: qemu-iotests: Fix paths for NFS...
Checking PATCH 2/46: qemu-iotests: Filter NFS paths...
Checking PATCH 3/46: qemu-iotests: 086 doesn't work with NFS...
Checking PATCH 4/46: sheepdog: Remove unnecessary NULL check in sd_prealloc()...
Checking PATCH 5/46: qemu-iotests: Add more tests to "migration" group...
Checking PATCH 6/46: qemu-iotests: Remove MIG_SOCKET from non-migration tests...
Checking PATCH 7/46: blockjob: Update block-job-pause/resume documentation...
Checking PATCH 8/46: blockjob: Improve BlockJobInfo.offset/len documentation...
Checking PATCH 9/46: job: Create Job, JobDriver and job_create()...
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#353: 
new file mode 100644

total: 0 errors, 1 warnings, 424 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 10/46: job: Rename BlockJobType into JobType...
Checking PATCH 11/46: job: Add JobDriver.job_type...
Checking PATCH 12/46: job: Add job_delete()...
Checking PATCH 13/46: job: Maintain a list of all jobs...
Checking PATCH 14/46: job: Move state transitions to Job...
ERROR: space prohibited before open square bracket '['
#343: FILE: job.c:38:
+    /* U: */ [JOB_STATUS_UNDEFINED] = {0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0},

ERROR: space prohibited before open square bracket '['
#344: FILE: job.c:39:
+    /* C: */ [JOB_STATUS_CREATED]   = {0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1},

ERROR: space prohibited before open square bracket '['
#345: FILE: job.c:40:
+    /* R: */ [JOB_STATUS_RUNNING]   = {0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0},

ERROR: space prohibited before open square bracket '['
#346: FILE: job.c:41:
+    /* P: */ [JOB_STATUS_PAUSED]    = {0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0},

ERROR: space prohibited before open square bracket '['
#347: FILE: job.c:42:
+    /* Y: */ [JOB_STATUS_READY]     = {0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0},

ERROR: space prohibited before open square bracket '['
#348: FILE: job.c:43:
+    /* S: */ [JOB_STATUS_STANDBY]   = {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0},

ERROR: space prohibited before open square bracket '['
#349: FILE: job.c:44:
+    /* W: */ [JOB_STATUS_WAITING]   = {0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0},

ERROR: space prohibited before open square bracket '['
#350: FILE: job.c:45:
+    /* D: */ [JOB_STATUS_PENDING]   = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0},

ERROR: space prohibited before open square bracket '['
#351: FILE: job.c:46:
+    /* X: */ [JOB_STATUS_ABORTING]  = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0},

ERROR: space prohibited before open square bracket '['
#352: FILE: job.c:47:
+    /* E: */ [JOB_STATUS_CONCLUDED] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1},

ERROR: space prohibited before open square bracket '['
#353: FILE: job.c:48:
+    /* N: */ [JOB_STATUS_NULL]      = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},

total: 11 errors, 0 warnings, 528 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 15/46: job: Add reference counting...
Checking PATCH 16/46: job: Move cancelled to Job...
Checking PATCH 17/46: job: Add Job.aio_context...
Checking PATCH 18/46: job: Move defer_to_main_loop to Job...
Checking PATCH 19/46: job: Move coroutine and related code to Job...
Checking PATCH 20/46: job: Add job_sleep_ns()...
Checking PATCH 21/46: job: Move pause/resume functions to Job...
Checking PATCH 22/46: job: Replace BlockJob.completed with job_is_completed()...
Checking PATCH 23/46: job: Move BlockJobCreateFlags to Job...
Checking PATCH 24/46: blockjob: Split block_job_event_pending()...
Checking PATCH 25/46: job: Add job_event_*()...
Checking PATCH 26/46: job: Move single job finalisation to Job...
WARNING: line over 80 characters
#508: FILE: include/qemu/job.h:221:
+                 int flags, BlockCompletionFunc *cb, void *opaque, Error **errp);

ERROR: "(foo*)" should be "(foo *)"
#578: FILE: job.c:462:
+    block_job_txn_del_job((BlockJob*) job);

ERROR: "(foo*)" should be "(foo *)"
#659: FILE: job.c:543:
+    block_job_txn_del_job((BlockJob*) job);

total: 2 errors, 1 warnings, 620 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 27/46: job: Convert block_job_cancel_async() to Job...
Checking PATCH 28/46: job: Add job_drain()...
Checking PATCH 29/46: job: Move .complete callback to Job...
Checking PATCH 30/46: job: Move job_finish_sync() to Job...
WARNING: line over 80 characters
#139: FILE: include/qemu/job.h:399:
+int job_finish_sync(Job *job, void (*finish)(Job *, Error **errp), Error **errp);

total: 0 errors, 1 warnings, 144 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 31/46: job: Switch transactions to JobTxn...
Checking PATCH 32/46: job: Move transactions to Job...
Checking PATCH 33/46: job: Move completion and cancellation to Job...
Checking PATCH 34/46: block: Cancel job in bdrv_close_all() callers...
Checking PATCH 35/46: job: Add job_yield()...
Checking PATCH 36/46: job: Add job_dismiss()...
Checking PATCH 37/46: job: Add job_is_ready()...
Checking PATCH 38/46: job: Add job_transition_to_ready()...
Checking PATCH 39/46: job: Move progress fields to Job...
Checking PATCH 40/46: job: Introduce qapi/job.json...
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#248: 
new file mode 100644

total: 0 errors, 1 warnings, 301 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 41/46: job: Add JOB_STATUS_CHANGE QMP event...
Checking PATCH 42/46: job: Add lifecycle QMP commands...
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#37: 
new file mode 100644

total: 0 errors, 1 warnings, 265 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 43/46: job: Add query-jobs QMP command...
Checking PATCH 44/46: blockjob: Remove BlockJob.driver...
ERROR: initializer for struct BlockJobDriver should normally be const
#21: FILE: blockjob.c:107:
+    BlockJobDriver *bjdrv = container_of(drv, BlockJobDriver, job_driver);

ERROR: initializer for struct BlockJobDriver should normally be const
#36: FILE: blockjob.c:121:
+    BlockJobDriver *bjdrv = container_of(drv, BlockJobDriver, job_driver);

total: 2 errors, 0 warnings, 54 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 45/46: iotests: Move qmp_to_opts() to VM...
WARNING: line over 80 characters
#109: FILE: tests/qemu-iotests/iotests.py:448:
+        self.assertEqual(self.vm.flatten_qmp_object(json.loads(json_filename[5:])),

total: 0 errors, 1 warnings, 83 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 46/46: qemu-iotests: Test job-* with block jobs...
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#13: 
new file mode 100755

total: 0 errors, 1 warnings, 540 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.
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Peter Maydell May 24, 2018, 1:21 p.m. UTC | #2
On 23 May 2018 at 14:11, Kevin Wolf <kwolf@redhat.com> wrote:
> The following changes since commit 4f50c1673a89b07f376ce5c42d22d79a79cd466d:
>
>   Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging (2018-05-22 09:43:58 +0100)
>
> are available in the git repository at:
>
>   git://repo.or.cz/qemu/kevin.git tags/for-upstream
>
> for you to fetch changes up to bdebdc712b06ba82e103d617c335830682cde242:
>
>   qemu-iotests: Test job-* with block jobs (2018-05-23 14:30:52 +0200)
>
> ----------------------------------------------------------------
> Block layer patches:
>
> - Generic background jobs
> - qemu-iotests fixes for NFS and the 'migration' group
> - sheepdog: Minor code simplification
>

Applied, thanks.

-- PMM