Whamcloud - gitweb
LU-3536 lod: Separate thandle to different layers. 40/10640/55
authorWang Di <di.wang@intel.com>
Thu, 19 Jun 2014 10:18:29 +0000 (03:18 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 8 Apr 2015 02:04:02 +0000 (02:04 +0000)
commitb4e6b6b280626dbafebe3e35858707f3143de24a
tree1efbbf066a1f3e57ff43759100a3ff1151c10f1b
parent61787e1cea610ba38ba917b73db0d43589c029df
LU-3536 lod: Separate thandle to different layers.

Separate thandle into different layers on MDT stack.

The current implementation use single thandle in all
layers, which might cause some issues for cross-MDT
transaction, for example during transaction stop,
it needs to stop local OSD transaction first,
then send remote RPC, because we do not want hold the
transaction, during RPC sending, but once we stop osd
transaction, which might cause this single thandle be
destroyed (see osd_trans_stop()), but all of remote
updates are still attached in this thandle.

This patch will separate the thandle to different layers:
1. MDD thandle will present itself in MDD transaction.
2. LOD thandle will distribute the thandle to all sub-thandles,
   and also attach the update blob buffer to store updates for
   cross-MDT operations.
3. OSP thandle will store the updates for the remote
   correspondent target, and also manage to send them to the
   remote target.
4. OSD thandle will still be the same as the original one,
   relying on the bottom FS to achieve the "atomic".

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I0c73cc80fa692c2e5d5a09e441c28e228d822ce0
Reviewed-on: http://review.whamcloud.com/10640
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
25 files changed:
lustre/include/dt_object.h
lustre/include/lustre_update.h
lustre/lfsck/lfsck_layout.c
lustre/lfsck/lfsck_namespace.c
lustre/lod/Makefile.in
lustre/lod/lod_dev.c
lustre/lod/lod_internal.h
lustre/lod/lod_lov.c
lustre/lod/lod_object.c
lustre/lod/lod_qos.c
lustre/lod/lod_sub_object.c [new file with mode: 0644]
lustre/mdd/mdd_dir.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-zfs/osd_handler.c
lustre/osp/osp_internal.h
lustre/osp/osp_md_object.c
lustre/osp/osp_object.c
lustre/osp/osp_sync.c
lustre/osp/osp_trans.c
lustre/ptlrpc/Makefile.in
lustre/ptlrpc/layout.c
lustre/target/Makefile.am
lustre/target/out_lib.c
lustre/target/update_trans.c [new file with mode: 0644]
lustre/tests/test-framework.sh