Project

General

Profile

Actions

Feature #9957

closed

librados: add fadvise op

Added by Sage Weil over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

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?

Actions #1

Updated by Sage Weil over 9 years ago

  • Description updated (diff)
  • Source changed from other to Community (dev)
Actions #2

Updated by Sage Weil over 9 years ago

  • Target version deleted (0.90)
Actions #3

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.

Actions #4

Updated by jianpeng ma over 9 years ago

Actions #5

Updated by Sage Weil over 9 years ago

  • Target version set to v.actually91
Actions #6

Updated by Sage Weil over 9 years ago

  • Status changed from New to 7
Actions #7

Updated by Sage Weil over 9 years ago

  • Status changed from 7 to Resolved
Actions

Also available in: Atom PDF