sheep: update inode coherence protocol for iSCSI multipath

This patch fixes 5 bugs of inode coherence protocol, especially in
gateway request handling:
1. add a new flag for indicating requests from tgtd
   It is required because dog command can read VDIs which are used by
   tgtd. Current coherence protocol can be violated by this
   behavior. The new flag is added for preventing this problem.
2. accurate detection of inode reload
   The previous way of detecting inode reload was incorrect.
3. return SD_RES_INODE_INVALIDATED in a case of create and write
   request
4. correct conditional branch for invalidation via gateway writes
5. remove the branch of is_modified() in is_refresh_required()
   Refresh is required even if no node is in modified state. If all
   nodes are in  shared and invalidated states, invalidated nodes must
   refresh inode.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
sheep: don't validate other invalidated nodes

Current inode coherence protocol validates all invalidated nodes when
one node validate itself. This behavior is incorrect so this patch
fixes it.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
sheep: correct locking of vdi status in inode coherence protocol

Currnet critical sections of vdi status in inode coherence protocl (in
functions validate_myself(), invalidate_other_nodes(),
inode_coherence_update()) are illegally short. This patch let the
the functions lock the vdi_state_lock correctly.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
tests/functional: launch tgt with multi threaded mode in 096

There's no reason for launching tgt with only 1 backing store thread.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
tests/functional: use failover path grouping policy in iSCSI

sheepdog cannot support multibus path grouping policy.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Update version for sheepdog v0.9.0_rc0

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Revert "corosync: handle network partition"

This reverts commit 15df161958a38cf3f7bc83b5bc2c8a1817b3072e.

The commit introduced a better handling method of network
partition. But the method seems to have a possibility of losing event
from corosync. According to an experiment by Tsuji-san, dispatching
of leave event can be delayed because of the poll(2) in
__corosync_dispatch() with corosync < 2.x.

In the next commit, simpler method for detecting network partition
based on a parameter of cpg callback function will be implemented. The
reverted method based on poll(2) depends on semantics of fd obtained
by cpg_fd_get(3) of corosync. The poll(2) based method worked well on
corosync 1.x, but it doesn't work well on 2.x. Internal big change
of corosync (maybe employing libqb) seemed to change the semantics so
we cannot use poll(2) for detecting queued messages.

With this change, sheepdog cannot use corosync 1.x as its cluster
manager any more. But the version has a critical bug in its message
delivery mechanism which can produce broken epoch log. So it is
reasonable to force users to stop using the version and introduce
this change.

Reported bug: https://bugs.launchpad.net/sheepdog-project/+bug/1368503

Conflicts:
	sheep/cluster/corosync.c
[ Conflicts were resolved by Hitoshi Mitake ]

Reported-by: Masahiro Tsuji <tuji@atworks.co.jp>
Tested-by: Masahiro Tsuji <tuji@atworks.co.jp>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
corosync: detect network partition based on left_list_entries

Corosync passes a number of leaving node with the parameter
left_list_entries of confchg callback. It can be used for detecting
network partition.

Tested-by: Masahiro Tsuji <tuji@atworks.co.jp>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
sheep: forbid double locking by single tgtd

Previous tgtd could cause double locking as an ordinal action. But
recent change
(https://github.com/fujita/tgt/commit/744aa51940c10c7986fc3911eb3ea44d6116ed45)
removed this confusing action. So this patch let sheep forbid the
double locking.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
sheep: treat inode object as a sparse object

Sparse object cannot handle erasure coded objects well. But inode
objects are always stored with naive replication. So this patch adds a
change for treating inode objects as a sparse object for reducing disk
space.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>