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

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Thu Jul 31 06:51:22 CEST 2014


At Thu, 31 Jul 2014 11:51:21 +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
> 
> v3:
>  - renaming functions
> 
> v2:
>  - Changes for QEMU side are needless
>  - Manual unlocking is required for keeping data integrity
>  -- New dog subcommands are provided for this purpose

Applied this series because v3 already contains updates for Yuan's
comments.

If uncorrectable design problems are found in the future, I'll remove
it at that time.

Thanks,
Hitoshi

> 
> 
> 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(-)
> 
> -- 
> 1.8.3.2
> 



More information about the sheepdog mailing list