Whamcloud - gitweb
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>