lkml.org 
[lkml]   [2020]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/5] block: add request->io_data_len
From
Date
On 2020-04-08 13:14, Tejun Heo wrote:
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index 32868fbedc9e..bfd34c6a27ef 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -142,6 +142,14 @@ struct request {
>
> /* the following two fields are internal, NEVER access directly */
> unsigned int __data_len; /* total data len */
> +#ifdef CONFIG_BLK_RQ_IO_DATA_LEN
> + /*
> + * Total data len at the time of issue. This doesn't get deducted by
> + * blk_update_request() and can be used by completion path to determine
> + * the request size.
> + */
> + unsigned int io_data_len;
> +#endif
> sector_t __sector; /* sector cursor */
>
> struct bio *bio;

So we have one struct member with the description "total data len" and
another struct member with the description "total data len at the time
of issue"? How could one not get confused by these descriptions?

This change makes the comment above __data_len incorrect. Please update
that comment or move io_data_len in front of that comment.

How does this change interact with the code in drivers/scsi/sd.c that
manipulates __data_len directly?

Thanks,

Bart.


\
 
 \ /
  Last update: 2020-04-09 05:45    [W:0.083 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site