qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC V2 04/10] quorum: Add quorum_close().


From: Blue Swirl
Subject: Re: [Qemu-devel] [RFC V2 04/10] quorum: Add quorum_close().
Date: Tue, 7 Aug 2012 20:30:35 +0000

On Tue, Aug 7, 2012 at 1:44 PM, Benoît Canet <address@hidden> wrote:
> Signed-off-by: Benoit Canet <address@hidden>
> ---
>  block/quorum.c |   12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/block/quorum.c b/block/quorum.c
> index de58ab8..9da0432 100644
> --- a/block/quorum.c
> +++ b/block/quorum.c
> @@ -107,6 +107,17 @@ clean_exit:
>      return ret;
>  }
>
> +static void quorum_close(BlockDriverState *bs)
> +{
> +    BDRVQuorumState *s = bs->opaque;
> +    int i;
> +
> +    /* Ensure writes reach stable storage */
> +    for (i = 0; i <= 2; i++) {
> +        bdrv_flush(s->bs[i]);

bdrv_close()

> +    }
> +}
> +
>  static BlockDriver bdrv_quorum = {
>      .format_name        = "quorum",
>      .protocol_name      = "quorum",
> @@ -114,6 +125,7 @@ static BlockDriver bdrv_quorum = {
>      .instance_size      = sizeof(BDRVQuorumState),
>
>      .bdrv_file_open     = quorum_open,
> +    .bdrv_close         = quorum_close,
>  };
>
>  static void bdrv_quorum_init(void)
> --
> 1.7.9.5
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]