diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2020-05-29 20:31:37 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2020-06-01 23:32:35 +0200 |
commit | d3798acc094c8ff2406e9acc7a9b2c09da994616 (patch) | |
tree | 5ada40171a9d15868733c648b3fe6825e045fd07 /include/linux/ceph/rados.h | |
parent | 8ad44d5e0d1eda7e4a0ed382174888476dc81789 (diff) | |
download | linux-next-d3798acc094c8ff2406e9acc7a9b2c09da994616.tar.gz |
libceph: support for alloc hint flags
Allow indicating future I/O pattern via flags. This is supported since
Kraken (and bluestore persists flags together with expected_object_size
and expected_write_size).
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Diffstat (limited to 'include/linux/ceph/rados.h')
-rw-r--r-- | include/linux/ceph/rados.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/ceph/rados.h b/include/linux/ceph/rados.h index 88ed3c5c04c5..3a518fd0eaad 100644 --- a/include/linux/ceph/rados.h +++ b/include/linux/ceph/rados.h @@ -465,6 +465,19 @@ enum { const char *ceph_osd_watch_op_name(int o); enum { + CEPH_OSD_ALLOC_HINT_FLAG_SEQUENTIAL_WRITE = 1, + CEPH_OSD_ALLOC_HINT_FLAG_RANDOM_WRITE = 2, + CEPH_OSD_ALLOC_HINT_FLAG_SEQUENTIAL_READ = 4, + CEPH_OSD_ALLOC_HINT_FLAG_RANDOM_READ = 8, + CEPH_OSD_ALLOC_HINT_FLAG_APPEND_ONLY = 16, + CEPH_OSD_ALLOC_HINT_FLAG_IMMUTABLE = 32, + CEPH_OSD_ALLOC_HINT_FLAG_SHORTLIVED = 64, + CEPH_OSD_ALLOC_HINT_FLAG_LONGLIVED = 128, + CEPH_OSD_ALLOC_HINT_FLAG_COMPRESSIBLE = 256, + CEPH_OSD_ALLOC_HINT_FLAG_INCOMPRESSIBLE = 512, +}; + +enum { CEPH_OSD_BACKOFF_OP_BLOCK = 1, CEPH_OSD_BACKOFF_OP_ACK_BLOCK = 2, CEPH_OSD_BACKOFF_OP_UNBLOCK = 3, @@ -517,6 +530,7 @@ struct ceph_osd_op { struct { __le64 expected_object_size; __le64 expected_write_size; + __le32 flags; /* CEPH_OSD_OP_ALLOC_HINT_FLAG_* */ } __attribute__ ((packed)) alloc_hint; struct { __le64 snapid; |