From: Jianpeng Ma Date: Sat, 6 Dec 2014 12:35:04 +0000 (+0800) Subject: librados.h: Add read/write op fadvise flags LIBRADOS_OP_FLAG_FADVISE_*. X-Git-Tag: v0.91~55^2~3^2~25 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f5abed7aa838912049b52b32f3e2741e53c929bf;p=ceph.git librados.h: Add read/write op fadvise flags LIBRADOS_OP_FLAG_FADVISE_*. Signed-off-by: Jianpeng Ma --- diff --git a/src/include/rados/librados.h b/src/include/rados/librados.h index 9c4a5732ff69..1de83a300759 100644 --- a/src/include/rados/librados.h +++ b/src/include/rados/librados.h @@ -63,10 +63,20 @@ extern "C" { * Flags that can be set on a per-op basis via * rados_read_op_set_flags() and rados_write_op_set_flags(). */ -// fail a create operation if the object already exists -#define LIBRADOS_OP_FLAG_EXCL 1 -// allow the transaction to succeed even if the flagged op fails -#define LIBRADOS_OP_FLAG_FAILOK 2 +enum { + // fail a create operation if the object already exists + LIBRADOS_OP_FLAG_EXCL = 0x1, + // allow the transaction to succeed even if the flagged op fails + LIBRADOS_OP_FLAG_FAILOK = 0x2, + // indicate read/write op random + LIBRADOS_OP_FLAG_FADVISE_RANDOM = 0x4, + // indicate read/write op sequential + LIBRADOS_OP_FLAG_FADVISE_SEQUENTIAL = 0x8, + // indicate read/write data will be accessed in the near future + LIBRADOS_OP_FLAG_FADVISE_WILLNEED = 0x10, + // indicate read/write data will not accessed int the near future + LIBRADOS_OP_FLAG_FADVISE_DONTNEED = 0x20, +}; #if __GNUC__ >= 4 #define CEPH_RADOS_API __attribute__ ((visibility ("default")))