static inline int llog_data_len(int len)
{
- int mask = LLOG_MIN_REC_SIZE - 1;
- int remains = LLOG_MIN_REC_SIZE - sizeof(struct llog_rec_hdr) -
- sizeof(struct llog_rec_tail);
-
- return (len <= remains) ?
- remains : (((len + mask) & (~mask)) + remains);
+ return size_round(len);
}
static inline struct llog_ctxt *llog_get_context(struct obd_device *obd,
+ sizeof(struct llog_rec_tail);
else
buflen = le32_to_cpu(rec->lrh_len);
- LASSERT((buflen % LLOG_MIN_REC_SIZE) == 0);
+ LASSERT(size_round(buflen) == buflen);
rc = lop->lop_write_rec(handle, rec, logcookies, numcookies, buf, idx);
RETURN(rc);