[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions of blockjob |
Date: |
Wed, 22 Jun 2016 12:19:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
On 22/06/2016 12:12, Changlong Xie wrote:
>
> commit/mirror/stream/backup use block_job_create(..., cb,..) to create
> relevant blockjob. When they finished, these jobs will invoke
> block_job_completed, then invoke job->cb() unconditionally. So i think
> we need this to avoid segment fault. Actually backup has implemented this.
So this suggests that the right place to put the assertion would be
block_job_create. But it's even better to add a
#define QEMU_NONNULL __attribute__((__nonnull__))
to include/qemu/compiler.h and declare the arguments as non-null.
Paolo
- [Qemu-devel] [PATCH 0/2] small fix of block job, Changlong Xie, 2016/06/22
- [Qemu-devel] [PATCH 2/2] mirror: fix misleading comments, Changlong Xie, 2016/06/22
- [Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions of blockjob, Changlong Xie, 2016/06/22
- Re: [Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions of blockjob, Paolo Bonzini, 2016/06/22
- Re: [Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions of blockjob, Changlong Xie, 2016/06/22
- Re: [Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions of blockjob,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions of blockjob, Eric Blake, 2016/06/22
- Re: [Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions of blockjob, Changlong Xie, 2016/06/22
- Re: [Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions of blockjob, Kevin Wolf, 2016/06/23
- Re: [Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions of blockjob, Changlong Xie, 2016/06/23