[sheepdog] [PATCH v2 0/7] revive VDI locking mecahnism

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Wed Jul 30 09:29:40 CEST 2014


At Wed, 30 Jul 2014 16:24:35 +0900,
Hitoshi Mitake wrote:
> 
> This patch revives VDI locking mechanism. When two or more clients
> (QEMU and tgt) try to open one VDI, sheep returns an error to the
> later one.
> 
> Example:
> $ sudo qemu-system-x86_64 -hda sheepdog:debian
> qemu-system-x86_64: -hda sheepdog:debian: could not open disk image sheepdog:debian: cannot get vdi info, VDI isn't locked, debian 0
> 
> v2:
>  - Changes for QEMU side are needless
>  - Manual unlocking is required for keeping data integrity
>  -- New dog subcommands are provided for this purpose
> 
> Hitoshi Mitake (7):
>   sheep: change a prototype of process_main() for obtaining sender
>     information
>   sheep: revive lock operation
>   dog: use GET_VDI_INFO unconditionally in dog
>   sheep: snapshot and collect vdi state during joining to cluster
>   sheep: a new helper function for formatting struct node_id
>   dog: add a new subcommand "dog vdi lock list" for listing vdi locking
>     status
>   dog: add a new subcommand "dog vdi lock force-unlock" for unlocking
>     VDI forcibly
> 
>  dog/treeview.c           |  41 ++++++++
>  dog/treeview.h           |   2 +
>  dog/vdi.c                |  96 +++++++++++++++++-
>  include/internal_proto.h |  23 +++++
>  include/sheep.h          |  11 +-
>  include/sheepdog_proto.h |   6 ++
>  sheep/group.c            | 165 ++++++++++++++++++++++++++++--
>  sheep/ops.c              | 177 +++++++++++++++++++++++++--------
>  sheep/request.c          |   3 +-
>  sheep/sheep.c            |   2 +
>  sheep/sheep_priv.h       |  24 +++--
>  sheep/vdi.c              | 254 +++++++++++++++++++++++++++++++++++++++++++++++
>  12 files changed, 736 insertions(+), 68 deletions(-)

Valerio, Fabian, could you test this series? You can pull the same
thing from our repository:

https://github.com/sheepdog/sheepdog/tree/vdi-locking-v2

In addition, you can use existing QEMU.

Thanks,
Hitoshi



More information about the sheepdog mailing list