RETURN(rc);
}
- rc = dt_declare_record_write(env, obj, size, pos, handle);
+ rc = dt_declare_record_write(env, obj, lfsck_buf_get(env, lo, size),
+ pos, handle);
if (rc != 0) {
CERROR("%s: fail to declare trans for storing lfsck_layout(1): "
"rc = %d\n", lfsck_lfsck2name(lfsck), rc);
if (rc != 0)
GOTO(stop, rc);
- rc = dt_declare_record_write(env, obj, sizeof(lastid), pos, th);
+ rc = dt_declare_record_write(env, obj,
+ lfsck_buf_get(env, &lastid,
+ sizeof(lastid)),
+ pos, th);
if (rc != 0)
GOTO(stop, rc);
continue;
}
+ lastid = cpu_to_le64(lls->lls_lastid);
rc = dt_declare_record_write(env, lls->lls_lastid_obj,
- sizeof(lastid), pos, th);
+ lfsck_buf_get(env, &lastid,
+ sizeof(lastid)), pos, th);
if (rc != 0)
goto stop;
if (rc != 0)
goto stop;
- lastid = cpu_to_le64(lls->lls_lastid);
dt_write_lock(env, lls->lls_lastid_obj, 0);
rc = dt_record_write(env, lls->lls_lastid_obj,
lfsck_buf_get(env, &lastid,