Thread (85 messages) 85 messages, 21 authors, 2022-03-09

Re: [RFC PATCH 1/3] block: add copy offload support

From: Bart Van Assche <bvanassche@acm.org>
Date: 2022-02-03 22:50:02
Also in: dm-devel, linux-fsdevel, linux-nvme, linux-scsi

On 2/3/22 10:50, Mikulas Patocka wrote:
On Tue, 1 Feb 2022, Bart Van Assche wrote:
quoted
On 2/1/22 10:32, Mikulas Patocka wrote:
quoted
   /**
+ * blk_queue_max_copy_sectors - set maximum copy offload sectors for the
queue
+ * @q:  the request queue for the device
+ * @size:  the maximum copy offload sectors
+ */
+void blk_queue_max_copy_sectors(struct request_queue *q, unsigned int size)
+{
+	q->limits.max_copy_sectors = size;
+}
+EXPORT_SYMBOL_GPL(blk_queue_max_copy_sectors);
Please either change the unit of 'size' into bytes or change its type into
sector_t.
blk_queue_chunk_sectors, blk_queue_max_discard_sectors,
blk_queue_max_write_same_sectors, blk_queue_max_write_zeroes_sectors,
blk_queue_max_zone_append_sectors also have the unit of sectors and the
argument is "unsigned int". Should blk_queue_max_copy_sectors be
different?
As far as I know using the type sector_t for variables that represent a 
number of sectors is a widely followed convention:

$ git grep -w sector_t | wc -l
2575

I would appreciate it if that convention would be used consistently, 
even if that means modifying existing code.

Thanks,

Bart.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help