journal: ignore invalid journal files

Even if journal files are broken, we can do nothing for recoverying
it. It is better to inform it as log messages and continue the
initialization process.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
journal: clean journal files when sheep exits correctly

Journal files don't have to exist if an owner sheep exits correctly.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
call a default signal handler in crash_handler()

This re-raises the signal in the crash handler for the default signal
hanldlers to dump a core file.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
collie: connect to server in collie_exec_req

This simplifies the collie codes a lot.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
sheep: remove unused 'flags' in remove_object()

Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
sheep: add helper functions to check the current thread

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
sheep: fix comment of put_vnode_info

We can call this function in the worker threads because urcu atomics
guard vnode_info.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
sheep/recovery: guard next_rw with RCU

We have to manipulate next_rw atomically because next_rw can be
accessed by the main and worker threads.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
sheep: introduce helpers to handle thread-unsafe variables

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
sheep: use thread_unsafe variables

Declare current_vnode_info, pending_block_list, pending_notify_list,
and recovering_work as thread_unsafe variables.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
sheep: force exec_req to be run in the worker thread

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
sheep: allow for get_vnode_info to return NULL

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
sheep: fix epoch_log_read_remote

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
work: don't call get_node_info in the worker thread

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
fix cluster_force_recover

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
sheep: allow notify when !SD_FLAG_CMD_WRITE

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
test abort

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>