Currently fadvise_flags is only used to check whether
buffered write is necessary, so there is no need
to keep it in the WriteContext as we have already
pre-calculated and kept the buffered field instead.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
uint64_t end = offset + length;
WriteContext wctx;
- wctx.fadvise_flags = fadvise_flags;
- if (wctx.fadvise_flags & CEPH_OSD_OP_FLAG_FADVISE_WILLNEED) {
+ if (fadvise_flags & CEPH_OSD_OP_FLAG_FADVISE_WILLNEED) {
dout(20) << __func__ << " will do buffered write" << dendl;
wctx.buffered = true;
}
// write ops
struct WriteContext {
- unsigned fadvise_flags = 0; ///< write flags
bool buffered = false; ///< buffered write
bool compress = false; ///< compressed write
uint64_t comp_blob_size = 0; ///< target compressed blob size