Feature #9957
closedlibrados: add fadvise op
0%
Description
Add an fadvise operation to ObjectOperation. Mirror posix_fadvise(2).
Add it right around here: https://github.com/ceph/ceph/blob/master/src/include/rados/librados.hpp#L338
Probably use these hints:
DONTNEED don't cache
RANDOM don't do readahead
SEQUENTIAL will read/write more
WILLNEED positive indication that we should cache something
but not
? NOREUSE? this is sort of the same as DONTNEED?
Updated by Sage Weil over 9 years ago
- Description updated (diff)
- Source changed from other to Community (dev)
Updated by jianpeng ma over 9 years ago
From the man posix_advise & kernel related code:
In kernels before 2.6.18, POSIX_FADV_NOREUSE had the same semantics as POSIX_FADV_WILLNEED. This was probably a bug; since kernel 2.6.18, this flag is a no-op.
So we can remove this flag. Except those flags
DONTNEED don't cache
RANDOM don't do readahead
SEQUENTIAL will read/write more
WILLNEED positive indication that we should cache something
We should add NORMAL. Because RANDOM/SEQUENTIAL will effect whole file(expect we close and reopen this flag), for two flags don't care the offset/length.
Updated by jianpeng ma over 9 years ago
See the pull request: https://github.com/ceph/ceph/pull/2905