Lines Matching +full:cache +full:- +full:op +full:- +full:block +full:- +full:size
1 /* SPDX-License-Identifier: GPL-2.0 */
29 #define CEPH_SNAPDIR ((__u64)(-1)) /* reserved for hidden .snap dir */
30 #define CEPH_NOSNAP ((__u64)(-2)) /* "head", "live" revision */
31 #define CEPH_MAXSNAP ((__u64)(-3)) /* largest valid snapid */
40 * object layout - how objects are mapped into PGs
47 * pg layout -- how PGs are mapped onto (sets of) OSDs
69 * pg_num -- base number of pseudorandomly placed pgs
71 * pgp_num -- effective number when calculating pg placement. this
78 * lpg_num -- localized pg count (per device). replicas are randomly
81 * lpgp_num -- as above.
83 #define CEPH_NOPOOL ((__u64) (-1)) /* pool id not defined */
91 * similar to straight-up modulo, but produces a stable mapping as b
95 * b <= bmask and bmask=(2**n)-1
96 * e.g., b=12 -> bmask=15, b=123 -> bmask=127
107 * object layout - how a given object should be stored.
111 __le32 ol_stripe_unit; /* for per-object parity, if any */
138 /* osd primary-affinity. fixed point value: 0x10000 == baseline */
153 #define CEPH_OSDMAP_NOUP (1<<5) /* block osd boot */
154 #define CEPH_OSDMAP_NODOWN (1<<6) /* block osd mark-down/failure */
155 #define CEPH_OSDMAP_NOOUT (1<<7) /* block osd auto mark-out */
156 #define CEPH_OSDMAP_NOIN (1<<8) /* block osd auto mark-in */
157 #define CEPH_OSDMAP_NOBACKFILL (1<<9) /* block osd backfill */
158 #define CEPH_OSDMAP_NORECOVER (1<<10) /* block osd recovery and backfill */
159 #define CEPH_OSDMAP_NOSCRUB (1<<11) /* block periodic scrub */
160 #define CEPH_OSDMAP_NODEEP_SCRUB (1<<12) /* block periodic deep-scrub */
162 #define CEPH_OSDMAP_NOREBALANCE (1<<14) /* block osd backfill unless pg is degraded */
178 * WARNING: do not use these op codes directly. Use the helpers
179 * defined below instead. In certain cases, op code behavior was
180 * redefined, resulting in special-cases in the helpers.
212 f(SPARSE_READ, __CEPH_OSD_OP(RD, DATA, 5), "sparse-read") \
215 f(NOTIFY_ACK, __CEPH_OSD_OP(RD, DATA, 7), "notify-ack") \
218 f(ASSERT_VER, __CEPH_OSD_OP(RD, DATA, 8), "assert-version") \
220 f(LIST_WATCHERS, __CEPH_OSD_OP(RD, DATA, 9), "list-watchers") \
222 f(LIST_SNAPS, __CEPH_OSD_OP(RD, DATA, 10), "list-snaps") \
249 f(OMAPGETKEYS, __CEPH_OSD_OP(RD, DATA, 17), "omap-get-keys") \
250 f(OMAPGETVALS, __CEPH_OSD_OP(RD, DATA, 18), "omap-get-vals") \
251 f(OMAPGETHEADER, __CEPH_OSD_OP(RD, DATA, 19), "omap-get-header") \
252 f(OMAPGETVALSBYKEYS, __CEPH_OSD_OP(RD, DATA, 20), "omap-get-vals-by-keys") \
253 f(OMAPSETVALS, __CEPH_OSD_OP(WR, DATA, 21), "omap-set-vals") \
254 f(OMAPSETHEADER, __CEPH_OSD_OP(WR, DATA, 22), "omap-set-header") \
255 f(OMAPCLEAR, __CEPH_OSD_OP(WR, DATA, 23), "omap-clear") \
256 f(OMAPRMKEYS, __CEPH_OSD_OP(WR, DATA, 24), "omap-rm-keys") \
257 f(OMAP_CMP, __CEPH_OSD_OP(RD, DATA, 25), "omap-cmp") \
260 f(COPY_FROM, __CEPH_OSD_OP(WR, DATA, 26), "copy-from") \
261 f(COPY_FROM2, __CEPH_OSD_OP(WR, DATA, 45), "copy-from2") \
262 f(COPY_GET_CLASSIC, __CEPH_OSD_OP(RD, DATA, 27), "copy-get-classic") \
265 f(COPY_GET, __CEPH_OSD_OP(RD, DATA, 30), "copy-get") \
266 f(CACHE_FLUSH, __CEPH_OSD_OP(CACHE, DATA, 31), "cache-flush") \
267 f(CACHE_EVICT, __CEPH_OSD_OP(CACHE, DATA, 32), "cache-evict") \
268 f(CACHE_TRY_FLUSH, __CEPH_OSD_OP(CACHE, DATA, 33), "cache-try-flush") \
274 f(SETALLOCHINT, __CEPH_OSD_OP(WR, DATA, 35), "set-alloc-hint") \
278 f(ASSERT_SRC_VERSION, __CEPH_OSD_OP(RD, MULTI, 2), "assert-src-version") \
279 f(SRC_CMPXATTR, __CEPH_OSD_OP(RD, MULTI, 3), "src-cmpxattr") \
296 f(BALANCEREADS, __CEPH_OSD_OP1(SUB, 3), "balance-reads") \
297 f(UNBALANCEREADS, __CEPH_OSD_OP1(SUB, 4), "unbalance-reads") \
299 f(SCRUB_RESERVE, __CEPH_OSD_OP1(SUB, 6), "scrub-reserve") \
300 f(SCRUB_UNRESERVE, __CEPH_OSD_OP1(SUB, 7), "scrub-unreserve") \
301 f(SCRUB_STOP, __CEPH_OSD_OP1(SUB, 8), "scrub-stop") \
302 f(SCRUB_MAP, __CEPH_OSD_OP1(SUB, 9), "scrub-map") \
313 /* note: the RD bit here is wrong; see special-case below in helper */ \
318 f(PGLS_FILTER, __CEPH_OSD_OP(RD, PG, 2), "pgls-filter") \
319 f(PG_HITSET_LS, __CEPH_OSD_OP(RD, PG, 3), "pg-hitset-ls") \
320 f(PG_HITSET_GET, __CEPH_OSD_OP(RD, PG, 4), "pg-hitset-get")
323 #define GENERATE_ENUM_ENTRY(op, opcode, str) CEPH_OSD_OP_##op = (opcode), argument
328 static inline int ceph_osd_op_type_lock(int op) in ceph_osd_op_type_lock() argument
330 return (op & CEPH_OSD_OP_TYPE) == CEPH_OSD_OP_TYPE_LOCK; in ceph_osd_op_type_lock()
332 static inline int ceph_osd_op_type_data(int op) in ceph_osd_op_type_data() argument
334 return (op & CEPH_OSD_OP_TYPE) == CEPH_OSD_OP_TYPE_DATA; in ceph_osd_op_type_data()
336 static inline int ceph_osd_op_type_attr(int op) in ceph_osd_op_type_attr() argument
338 return (op & CEPH_OSD_OP_TYPE) == CEPH_OSD_OP_TYPE_ATTR; in ceph_osd_op_type_attr()
340 static inline int ceph_osd_op_type_exec(int op) in ceph_osd_op_type_exec() argument
342 return (op & CEPH_OSD_OP_TYPE) == CEPH_OSD_OP_TYPE_EXEC; in ceph_osd_op_type_exec()
344 static inline int ceph_osd_op_type_pg(int op) in ceph_osd_op_type_pg() argument
346 return (op & CEPH_OSD_OP_TYPE) == CEPH_OSD_OP_TYPE_PG; in ceph_osd_op_type_pg()
348 static inline int ceph_osd_op_type_multi(int op) in ceph_osd_op_type_multi() argument
350 return (op & CEPH_OSD_OP_TYPE) == CEPH_OSD_OP_TYPE_MULTI; in ceph_osd_op_type_multi()
353 static inline int ceph_osd_op_mode_subop(int op) in ceph_osd_op_mode_subop() argument
355 return (op & CEPH_OSD_OP_MODE) == CEPH_OSD_OP_MODE_SUB; in ceph_osd_op_mode_subop()
357 static inline int ceph_osd_op_mode_read(int op) in ceph_osd_op_mode_read() argument
359 return (op & CEPH_OSD_OP_MODE_RD) && in ceph_osd_op_mode_read()
360 op != CEPH_OSD_OP_CALL; in ceph_osd_op_mode_read()
362 static inline int ceph_osd_op_mode_modify(int op) in ceph_osd_op_mode_modify() argument
364 return op & CEPH_OSD_OP_MODE_WR; in ceph_osd_op_mode_modify()
377 extern const char *ceph_osd_op_name(int op);
380 * osd op flags
382 * An op may be READ, WRITE, or READ|WRITE.
389 CEPH_OSD_FLAG_READ = 0x0010, /* op may read */
390 CEPH_OSD_FLAG_WRITE = 0x0020, /* op may write */
394 CEPH_OSD_FLAG_PARALLELEXEC = 0x0200, /* execute op in parallel */
395 CEPH_OSD_FLAG_PGOP = 0x0400, /* pg op, no object */
396 CEPH_OSD_FLAG_EXEC = 0x0800, /* op may exec */
397 CEPH_OSD_FLAG_EXEC_PUBLIC = 0x1000, /* DEPRECATED op may exec (public) */
400 CEPH_OSD_FLAG_IGNORE_CACHE = 0x8000, /* ignore cache logic */
407 CEPH_OSD_FLAG_REDIRECTED = 0x200000, /* op has been redirected */
409 CEPH_OSD_FLAG_FULL_TRY = 0x800000, /* try op despite full flag */
410 CEPH_OSD_FLAG_FULL_FORCE = 0x1000000, /* force op despite full flag */
416 CEPH_OSD_OP_FLAG_FADVISE_RANDOM = 0x4, /* the op is random */
417 CEPH_OSD_OP_FLAG_FADVISE_SEQUENTIAL = 0x8, /* the op is sequential */
448 CEPH_OSD_COPY_FROM_FLAG_IGNORE_CACHE = 4, /* ignore osd cache logic */
452 CEPH_OSD_COPY_FROM_FLAG_TRUNCATE_SEQ = 32, /* send truncate_{seq,size} */
458 /* note: use only ODD ids to prevent pre-giant code from
459 interpreting the op as UNWATCH */
491 __le16 op; /* CEPH_OSD_OP_* */ member
520 __u8 op; /* CEPH_OSD_WATCH_OP_* */ member