Skip to content

Commit e711252

Browse files
leitaoaxboe
authored andcommitted
block: Name the RQF flags enum
Commit 5f89154 ("block: Use enum to define RQF_x bit indexes") converted the RQF flags to an anonymous enum, which was a beneficial change. This patch goes one step further by naming the enum as "rqf_flags". This naming enables exporting these flags to BPF clients, eliminating the need to duplicate these flags in BPF code. Instead, BPF clients can now access the same kernel-side values through CO:RE (Compile Once, Run Everywhere), as shown in this example: rqf_stats = bpf_core_enum_value(enum rqf_flags, __RQF_STATS) Suggested-by: Yonghong Song <[email protected]> Signed-off-by: Breno Leitao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent ca57b5b commit e711252

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/blk-mq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ typedef enum rq_end_io_ret (rq_end_io_fn)(struct request *, blk_status_t);
2828
typedef __u32 __bitwise req_flags_t;
2929

3030
/* Keep rqf_name[] in sync with the definitions below */
31-
enum {
31+
enum rqf_flags {
3232
/* drive already may have started this one */
3333
__RQF_STARTED,
3434
/* request for flush sequence */

0 commit comments

Comments
 (0)