[sheepdog] [PATCH 0/9] revive VDI locking mecahnism

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Fri Jun 27 08:13:47 CEST 2014


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

This mechainsm requires a change in QEMU, too. Counterpart QEMU can be
found here:
https://github.com/sheepdog/qemu/tree/vdi-locking

If consensus about the design can be achieved, I'll post the patches
to the QEMU list.

Thanks,
Hitoshi

Hitoshi Mitake (9):
  sheep: change a prototype of process_main() for obtaining sender
    information
  sheep: revive lock operation
  sheep: add a list for storing information of all clients
  sheep: associate client info and locked vdi
  sheep: add an API for releasing VDI
  sheep: unlock existing lock in a case of double locking
  dog: use GET_VDI_INFO unconditionally in dog
  sheep: snapshot and collect vdi state during joining to cluster
  sheep: log and play locking/unlock information in newly joining node

 dog/vdi.c                |    5 +-
 include/internal_proto.h |    2 +
 include/sheepdog_proto.h |    5 +
 sheep/group.c            |  162 ++++++++++++++++++++++-
 sheep/ops.c              |  215 +++++++++++++++++++++++++------
 sheep/request.c          |   25 ++++-
 sheep/sheep_priv.h       |   26 ++++-
 sheep/vdi.c              |  322 ++++++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 705 insertions(+), 57 deletions(-)




More information about the sheepdog mailing list