CFS_INIT_LIST_HEAD(&oh->ot_dcb_list);
osd_th_alloced(oh);
- memset(oti->oti_declare_ops, 0, OSD_OT_MAX);
- memset(oti->oti_declare_ops_rb, 0, OSD_OT_MAX);
- memset(oti->oti_declare_ops_cred, 0, OSD_OT_MAX);
+#ifdef OSD_TRACK_DECLARES
+ memset(oti->oti_declare_ops, 0,
+ sizeof(oti->oti_declare_ops));
+ memset(oti->oti_declare_ops_rb, 0,
+ sizeof(oti->oti_declare_ops_rb));
+ memset(oti->oti_declare_ops_cred, 0,
+ sizeof(oti->oti_declare_ops_cred));
oti->oti_rollback = false;
+#endif
}
RETURN(th);
}
GOTO(out, rc);
if (unlikely(osd_param_is_not_sane(dev, th))) {
+#ifdef OSD_TRACK_DECLARES
static unsigned long last_printed;
static int last_credits;
+#endif
CWARN("%.16s: too many transaction credits (%d > %d)\n",
LDISKFS_SB(osd_sb(dev))->s_es->s_volume_name,
/* Tracking for transaction credits, to allow debugging and optimizing
* cases where a large number of credits are being allocated for
* single transaction. */
- unsigned char oti_declare_ops[OSD_OT_MAX];
- unsigned char oti_declare_ops_rb[OSD_OT_MAX];
+ unsigned short oti_declare_ops[OSD_OT_MAX];
+ unsigned short oti_declare_ops_rb[OSD_OT_MAX];
unsigned short oti_declare_ops_cred[OSD_OT_MAX];
bool oti_rollback;
#endif