All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jeff Cody <jcody@redhat.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] block: add .bdrv_reopen_prepare() stub for iscsi
Date: Wed, 15 Jan 2014 10:45:21 +0100	[thread overview]
Message-ID: <52D658B1.6010307@redhat.com> (raw)
In-Reply-To: <bb7a59bbc15db400b49822c513adf7bf03d4a8db.1389722928.git.jcody@redhat.com>

Il 14/01/2014 19:10, Jeff Cody ha scritto:
> To suppport reopen(), the .bdrv_reopen_prepare() stub must exist.
> iSCSI does not have anything that needs to be done to support reopen,
> so we can just implement the _prepare() stub.
> 
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
>  block/iscsi.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/block/iscsi.c b/block/iscsi.c
> index c0ea0c4..5976bd1 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -1326,6 +1326,14 @@ static void iscsi_close(BlockDriverState *bs)
>      memset(iscsilun, 0, sizeof(IscsiLun));
>  }
>  
> +/* We have nothing to do for iSCSI reopen, stub just returns
> + * success */
> +static int iscsi_reopen_prepare(BDRVReopenState *state,
> +                                BlockReopenQueue *queue, Error **errp)
> +{
> +    return 0;
> +}
> +
>  static int iscsi_truncate(BlockDriverState *bs, int64_t offset)
>  {
>      IscsiLun *iscsilun = bs->opaque;
> @@ -1434,6 +1442,7 @@ static BlockDriver bdrv_iscsi = {
>      .bdrv_close      = iscsi_close,
>      .bdrv_create     = iscsi_create,
>      .create_options  = iscsi_create_options,
> +    .bdrv_reopen_prepare  = iscsi_reopen_prepare,
>  
>      .bdrv_getlength  = iscsi_getlength,
>      .bdrv_get_info   = iscsi_get_info,
> 

Applied to scsi-next branch, thanks.

Paolo

      parent reply	other threads:[~2014-01-15  9:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14 18:10 [Qemu-devel] [PATCH] block: add .bdrv_reopen_prepare() stub for iscsi Jeff Cody
2014-01-15  4:13 ` Stefan Hajnoczi
2014-01-15  9:45 ` Paolo Bonzini [this message]

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=52D658B1.6010307@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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.