Skip to content
Snippets Groups Projects
Commit 7068276e authored by Wang Di's avatar Wang Di
Browse files

Branch: HEAD

format fixes in commit 16717
parent 8ac25a15
No related merge requests found
...@@ -236,8 +236,8 @@ static int llog_test_3(struct obd_device *obd, struct llog_handle *llh) ...@@ -236,8 +236,8 @@ static int llog_test_3(struct obd_device *obd, struct llog_handle *llh)
if ((rc = verify_handle("3c", llh, num_recs))) if ((rc = verify_handle("3c", llh, num_recs)))
RETURN(rc); RETURN(rc);
CWARN("3d: write log more than BITMAP_SIZE, return -ENOSPC\n"); CWARN("3d: write log more than BITMAP_SIZE, return -ENOSPC\n");
for (i = 0; i < LLOG_BITMAP_SIZE(llh->lgh_hdr) + 1; i++) { for (i = 0; i < LLOG_BITMAP_SIZE(llh->lgh_hdr) + 1; i++) {
struct llog_rec_hdr hdr; struct llog_rec_hdr hdr;
char buf_even[24]; char buf_even[24];
...@@ -245,30 +245,30 @@ static int llog_test_3(struct obd_device *obd, struct llog_handle *llh) ...@@ -245,30 +245,30 @@ static int llog_test_3(struct obd_device *obd, struct llog_handle *llh)
memset(buf_odd, 0, sizeof buf_odd); memset(buf_odd, 0, sizeof buf_odd);
memset(buf_even, 0, sizeof buf_even); memset(buf_even, 0, sizeof buf_even);
if ((i % 2) == 0) { if ((i % 2) == 0) {
hdr.lrh_len = 24; hdr.lrh_len = 24;
hdr.lrh_type = OBD_CFG_REC; hdr.lrh_type = OBD_CFG_REC;
rc = llog_write_rec(llh, &hdr, NULL, 0, buf_even, -1); rc = llog_write_rec(llh, &hdr, NULL, 0, buf_even, -1);
} else { } else {
hdr.lrh_len = 32; hdr.lrh_len = 32;
hdr.lrh_type = OBD_CFG_REC; hdr.lrh_type = OBD_CFG_REC;
rc = llog_write_rec(llh, &hdr, NULL, 0, buf_odd, -1); rc = llog_write_rec(llh, &hdr, NULL, 0, buf_odd, -1);
} }
if (rc) { if (rc) {
if (rc == -ENOSPC) { if (rc == -ENOSPC) {
break; break;
} else { } else {
CERROR("3c: write 8k recs failed at #%d: %d\n", CERROR("3c: write recs failed at #%d: %d\n",
i + 1, rc); i + 1, rc);
RETURN(rc); RETURN(rc);
} }
} }
num_recs++; num_recs++;
} }
if (rc != -ENOSPC) { if (rc != -ENOSPC) {
CWARN("3d: write record more than BITMAP size!\n"); CWARN("3d: write record more than BITMAP size!\n");
RETURN(-EINVAL); RETURN(-EINVAL);
} }
if ((rc = verify_handle("3d", llh, num_recs))) if ((rc = verify_handle("3d", llh, num_recs)))
RETURN(rc); RETURN(rc);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment