From: Jeff Cody <jcody@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: peter.maydell@linaro.org, famz@redhat.com, qemu-devel@nongnu.org,
qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PULL 02/12] sheepdog: allow to delete snapshot
Date: Wed, 2 Mar 2016 10:18:00 -0500 [thread overview]
Message-ID: <20160302151800.GE26318@localhost.localdomain> (raw)
In-Reply-To: <56D6F48F.7080404@redhat.com>
On Wed, Mar 02, 2016 at 03:11:27PM +0100, Paolo Bonzini wrote:
>
>
> On 29/02/2016 21:08, Jeff Cody wrote:
> > From: Vasiliy Tolstov <v.tolstov@selfip.ru>
> >
> > This patch implements a blockdriver function bdrv_snapshot_delete() in
> > the sheepdog driver. With the new function, snapshots of sheepdog can
> > be deleted from libvirt.
> >
> > Cc: Jeff Cody <jcody@redhat.com>
> > Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
> > Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
> > Message-id: 1450873346-22334-1-git-send-email-mitake.hitoshi@lab.ntt.co.jp
> > Signed-off-by: Jeff Cody <jcody@redhat.com>
> > ---
> > block/sheepdog.c | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> > 1 file changed, 123 insertions(+), 2 deletions(-)
[...]
> + memset(buf, 0, sizeof(buf));
> > + memset(snap_tag, 0, sizeof(snap_tag));
> > + pstrcpy(buf, SD_MAX_VDI_LEN, s->name);
> > + if (qemu_strtoul(snapshot_id, NULL, 10, (unsigned long *)&snap_id)) {
>
> This cast seems like a very bad idea, and in fact it is. qemu_strtoul
> will access 8 bytes on 64-bit machines. Please change snap_id to be an
> unsigned long instead.
>
Thanks Paolo, I missed that. I just sent a patch to fix this.
-Jeff
next prev parent reply other threads:[~2016-03-02 15:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-29 20:08 [Qemu-devel] [PULL 00/12] Block patches Jeff Cody
2016-02-29 20:08 ` [Qemu-devel] [PULL 01/12] block/nfs: add support for setting debug level Jeff Cody
2016-02-29 20:08 ` [Qemu-devel] [PULL 02/12] sheepdog: allow to delete snapshot Jeff Cody
2016-03-02 14:11 ` Paolo Bonzini
2016-03-02 15:18 ` Jeff Cody [this message]
2016-02-29 20:08 ` [Qemu-devel] [PULL 03/12] rbd: add support for getting password from QCryptoSecret object Jeff Cody
2016-02-29 20:08 ` [Qemu-devel] [PULL 04/12] curl: add support for HTTP authentication parameters Jeff Cody
2016-02-29 20:08 ` [Qemu-devel] [PULL 05/12] iscsi: add support for getting CHAP password via QCryptoSecret API Jeff Cody
2016-02-29 20:08 ` [Qemu-devel] [PULL 06/12] vhdx: DIV_ROUND_UP() in vhdx_calc_bat_entries() Jeff Cody
2016-02-29 20:08 ` [Qemu-devel] [PULL 07/12] vhdx: Simplify vhdx_set_shift_bits() Jeff Cody
2016-02-29 20:08 ` [Qemu-devel] [PULL 08/12] mirror: Rewrite mirror_iteration Jeff Cody
2016-04-13 13:40 ` [Qemu-devel] [Qemu-block] " Kevin Wolf
2016-02-29 20:08 ` [Qemu-devel] [PULL 09/12] mirror: Add mirror_wait_for_io Jeff Cody
2016-02-29 20:08 ` [Qemu-devel] [PULL 10/12] block/backup: make backup cluster size configurable Jeff Cody
2016-02-29 20:08 ` [Qemu-devel] [PULL 11/12] block/backup: avoid copying less than full target clusters Jeff Cody
2016-02-29 20:08 ` [Qemu-devel] [PULL 12/12] iotests/124: Add cluster_size mismatch test Jeff Cody
2016-03-01 10:34 ` [Qemu-devel] [PULL 00/12] Block patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160302151800.GE26318@localhost.localdomain \
--to=jcody@redhat.com \
--cc=famz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.