History

blktrace: add block trace commands for zone operations

Add block trace commands for zone operations. These commands can only be handled with version 2 of the blktrace protocol. For version 1, warn if a command that does not fit into the 16 bits reserved for the command in this version is passed in.

Johannes Thumshirn committed 1 year ago

Commit f9ee38b1 parent 4d8bc7b2 files · +36 −6Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/blktrace_api.h+11−2
@@ -26,11 +26,20 @@ enum blktrace_cat { · 25 unmodified lines
26 BLK_TC_DRV_DATA = 1 << 14, /* binary per-driver data */26 BLK_TC_DRV_DATA = 1 << 14, /* binary per-driver data */
27 BLK_TC_FUA = 1 << 15, /* fua requests */27 BLK_TC_FUA = 1 << 15, /* fua requests */
28 28
29 BLK_TC_END = 1 << 15, /* we've run out of bits! */29 BLK_TC_END_V1 = 1 << 15, /* we've run out of bits! */
30
31 BLK_TC_ZONE_APPEND = 1ull << 16, /* zone append */
32 BLK_TC_ZONE_RESET = 1ull << 17, /* zone reset */
33 BLK_TC_ZONE_RESET_ALL = 1ull << 18, /* zone reset all */
34 BLK_TC_ZONE_FINISH = 1ull << 19, /* zone finish */
35 BLK_TC_ZONE_OPEN = 1ull << 20, /* zone open */
36 BLK_TC_ZONE_CLOSE = 1ull << 21, /* zone close */
37
38 BLK_TC_END_V2 = 1ull << 21,
30};39};
31 40
32#define BLK_TC_SHIFT (16)41#define BLK_TC_SHIFT (16)
33#define BLK_TC_ACT(act) ((act) << BLK_TC_SHIFT)42#define BLK_TC_ACT(act) ((u64)(act) << BLK_TC_SHIFT)
34 43
35/*44/*
36 * Basic trace actions45 * Basic trace actions