diff mbox series

[RFC,02/39] blktrace_api: add new trace definition

Message ID 20210225070231.21136-3-chaitanya.kulkarni@wdc.com (mailing list archive)
State New, archived
Headers show
Series [RFC,01/39] blktrace_api: add new trace definitions | expand

Commit Message

Chaitanya Kulkarni Feb. 25, 2021, 7:01 a.m. UTC
This patch adds new structure similar to struct blk_trace to support
block trace extensions.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 include/linux/blktrace_api.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Comments

Damien Le Moal Feb. 26, 2021, 4:33 a.m. UTC | #1
On 2021/02/25 16:03, Chaitanya Kulkarni wrote:
> This patch adds new structure similar to struct blk_trace to support
> block trace extensions.
> 
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
> ---
>  include/linux/blktrace_api.h | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
> index a083e15df608..6c2654f45ad2 100644
> --- a/include/linux/blktrace_api.h
> +++ b/include/linux/blktrace_api.h
> @@ -27,6 +27,24 @@ struct blk_trace {
>  	atomic_t dropped;
>  };
>  
> +struct blk_trace_ext {
> +	int trace_state;
> +	struct rchan *rchan;
> +	unsigned long __percpu *sequence;
> +	unsigned char __percpu *msg_data;
> +	u64 act_mask;
> +	u32 prio_mask;
> +	u64 start_lba;
> +	u64 end_lba;
> +	u32 pid;
> +	u32 dev;
> +	struct dentry *dir;
> +	struct dentry *dropped_file;
> +	struct dentry *msg_file;
> +	struct list_head running_ext_list;
> +	atomic_t dropped;
> +};

A comment describing what this structure is for would be nice.

> +
>  struct blkcg;
>  
>  extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *);
>
diff mbox series

Patch

diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h
index a083e15df608..6c2654f45ad2 100644
--- a/include/linux/blktrace_api.h
+++ b/include/linux/blktrace_api.h
@@ -27,6 +27,24 @@  struct blk_trace {
 	atomic_t dropped;
 };
 
+struct blk_trace_ext {
+	int trace_state;
+	struct rchan *rchan;
+	unsigned long __percpu *sequence;
+	unsigned char __percpu *msg_data;
+	u64 act_mask;
+	u32 prio_mask;
+	u64 start_lba;
+	u64 end_lba;
+	u32 pid;
+	u32 dev;
+	struct dentry *dir;
+	struct dentry *dropped_file;
+	struct dentry *msg_file;
+	struct list_head running_ext_list;
+	atomic_t dropped;
+};
+
 struct blkcg;
 
 extern int blk_trace_ioctl(struct block_device *, unsigned, char __user *);