[sheepdog] [sheepdog/sheepdog] a413c8: sheep: fix missing .stale problem

Meng Lingkun menglingkun at cmss.chinamobile.com
Sat Aug 8 15:11:11 CEST 2015


  Branch: refs/heads/stable-0.9
  Home:   https://github.com/sheepdog/sheepdog
  Commit: a413c8b562b163b82d636dc815c178116696e2b7
      https://github.com/sheepdog/sheepdog/commit/a413c8b562b163b82d636dc815c178116696e2b7
  Author: Liu Yuan <liuyuan at cmss.chinamobile.com>
  Date:   2015-08-08 (Sat, 08 Aug 2015)

  Changed paths:
    M include/util.h
    M lib/util.c
    M sheep/plain_store.c

  Log Message:
  -----------
  sheep: fix missing .stale problem

If .stale is missing, the recovery algorithm is almost broken. We have this
problem because following logic for .stale:

store->format() purge all the directories including .stale, rmdir(.stale)
   |
   V
store->init() then mkdir(.stale)

This order was previously strickly honored but dbf0e8782 that pushed the purge
work into the worker thread, broke this ordering. On many systems, the actual
execution order for .stale becomes:

mkdir(.stale) -> rmdir(.stale)

because rmdir(.stale) is deffered after store->init(), so this poor node will
never have .stale exist.

Since the store->cleanup() is the actual user of async rmdir, the fix is just
add a new async interface and call it and have others call sync one.

Cc: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
Signed-off-by: Liu Yuan <liuyuan at cmss.chinamobile.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>


  Commit: 668922f6d15981bd2b902e5e9bc5d0e9d9daa806
      https://github.com/sheepdog/sheepdog/commit/668922f6d15981bd2b902e5e9bc5d0e9d9daa806
  Author: Meng Lingkun <menglingkun at cmss.chinamobile.com>
  Date:   2015-08-08 (Sat, 08 Aug 2015)

  Changed paths:
    M dog/common.c

  Log Message:
  -----------
  dog: fix dog help messages output

When a subcommand given by argv[3], always output help messages incorrectly.
For example: dog vdi object location|map|dump-inode, always output location's
help messages instead of map's or dump-inode's. So fix it.

Signed-off-by: Meng Lingkun <menglingkun at cmss.chinamobile.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>


  Commit: 63bf0ca197917c05699c96cbc85de9bfe65466a2
      https://github.com/sheepdog/sheepdog/commit/63bf0ca197917c05699c96cbc85de9bfe65466a2
  Author: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
  Date:   2015-08-08 (Sat, 08 Aug 2015)

  Changed paths:
    M sheep/cluster/zookeeper.c

  Log Message:
  -----------
  zookeeper: print error code in lock_table_lookup_acquire()

Cc: zhanghongzhou <zhang.hongzhou at hotmail.com>
Cc: Ruoyu <liangry at ucweb.com>
Cc: Robin Dong <robin.k.dong at gmail.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>


  Commit: 5f292bd53ad7f9a5feee179f8f1483535d0cecbf
      https://github.com/sheepdog/sheepdog/commit/5f292bd53ad7f9a5feee179f8f1483535d0cecbf
  Author: Meng Lingkun <menglingkun at cmss.chinamobile.com>
  Date:   2015-08-08 (Sat, 08 Aug 2015)

  Changed paths:
    M dog/cluster.c

  Log Message:
  -----------
  dog: compare copies with zones_nr instead of nodes_nr when format

Since cluster stores data in different nodes with different zones,
So fix it.

Signed-off-by: Meng Lingkun <menglingkun at cmss.chinamobile.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>


Compare: https://github.com/sheepdog/sheepdog/compare/937ee5161252...5f292bd53ad7


More information about the sheepdog mailing list