Whamcloud - gitweb
LU-2640 osd: enhance transaction debug to trace rollback
authorFan Yong <yong.fan@whamcloud.com>
Thu, 10 Jan 2013 15:17:38 +0000 (23:17 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 31 Jan 2013 00:55:27 +0000 (19:55 -0500)
commit28fc8fcc8bfe092c9a1a8c192ab6fe22d92820e7
tree891bc04f3551b46a49cf7b94821d2c163d8bb869
parent40137f1d07295ee4a0bb75d2ae553c42e66295f4
LU-2640 osd: enhance transaction debug to trace rollback

Some modifications may need to rollback because of failures during
the transactions. The original transaction trace mechanism did not
consider rollback cases, so cannot correctly record sub-operations
and the rollback cases.

In this patch, not only the specified sub-operation will be traced,
but also its rollback operation (if may rollback) will be recorded
also. For example:

When declare for ref_add, it will record the ref_add sub-operation
by "osd_thandle::ot_declare_ops[OSD_OT_REF_ADD]"; when consume the
ref_add credit, the possible rollback will be recorded through the
"osd_thandle::ot_declare_ops_rb[OSD_OT_REF_ADD]"; and when need to
rollback the ref_add (by ref_del) in subsequent processing, it can
be traced by the "osd_thandle::ot_declare_ops_rb[OSD_OT_REF_ADD]";
and once rollback starts, only "osd_thandle::ot_declare_ops_rb[X]"
can be consumed.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Iade214eff468c2298f84920b997040e06f1a204f
Reviewed-on: http://review.whamcloud.com/5138
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/mdd/mdd_dir.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_internal.h
lustre/osd-ldiskfs/osd_io.c
lustre/osd-ldiskfs/osd_quota.c