At test 10h thread should set failloc before the test
starts adding records. And the main llog_process_thread
should wait a bitmap modification.
Signed-off-by: Alexander Boyko <c17825@cray.com>
Change-Id: I4fdedf10f943f6ab264c2d83414f0a404ca42b9c
Reviewed-on: https://review.whamcloud.com/34287
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
synced_idx == LLOG_HDR_TAIL(llh)->lrt_index)
GOTO(out, rc = 0);
synced_idx == LLOG_HDR_TAIL(llh)->lrt_index)
GOTO(out, rc = 0);
+ if (OBD_FAIL_PRECHECK(OBD_FAIL_LLOG_PROCESS_TIMEOUT) &&
+ cfs_fail_val == (unsigned int)
+ (loghandle->lgh_id.lgl_oi.oi.oi_id &
+ 0xFFFFFFFF)) {
+ OBD_RACE(OBD_FAIL_LLOG_PROCESS_TIMEOUT);
+ }
+
/* the bitmap could be changed during processing
* records from the chunk. For wrapped catalog
* it means we can read deleted record and try to
/* the bitmap could be changed during processing
* records from the chunk. For wrapped catalog
* it means we can read deleted record and try to
loghandle->lgh_cur_offset = (char *)rec - (char *)buf +
chunk_offset;
loghandle->lgh_cur_offset = (char *)rec - (char *)buf +
chunk_offset;
- if (OBD_FAIL_PRECHECK(OBD_FAIL_LLOG_PROCESS_TIMEOUT) &&
- index == lh_last_idx &&
- cfs_fail_val == (unsigned int)
- (loghandle->lgh_id.lgl_oi.oi.oi_id &
- 0xFFFFFFFF)) {
- OBD_RACE(OBD_FAIL_LLOG_PROCESS_TIMEOUT);
- }
/* if set, process the callback on this record */
if (ext2_test_bit(index, LLOG_HDR_BITMAP(llh))) {
struct llog_cookie *lgc;
/* if set, process the callback on this record */
if (ext2_test_bit(index, LLOG_HDR_BITMAP(llh))) {
struct llog_cookie *lgc;
cfs_fail_loc = OBD_FAIL_ONCE | OBD_FAIL_LLOG_PROCESS_TIMEOUT;
cfs_fail_val = (unsigned int) (llh->lgh_id.lgl_oi.oi.oi_id &
0xFFFFFFFF);
cfs_fail_loc = OBD_FAIL_ONCE | OBD_FAIL_LLOG_PROCESS_TIMEOUT;
cfs_fail_val = (unsigned int) (llh->lgh_id.lgl_oi.oi.oi_id &
0xFFFFFFFF);
+ msleep(1 * MSEC_PER_SEC);
kthread_run(llog_test_process_thread, &lpi, "llog_test_process_thread");
kthread_run(llog_test_process_thread, &lpi, "llog_test_process_thread");
+ msleep(1 * MSEC_PER_SEC / 2);
enospc = 0;
eok = 0;
CWARN("10h: write %d more log records\n", llog_test_recnum);
enospc = 0;
eok = 0;
CWARN("10h: write %d more log records\n", llog_test_recnum);