Re: [PATCH 10/10] null_blk: Support configuring the maximum segment size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/20/22 16:13, Damien Le Moal wrote:
On 10/20/22 07:23, Bart Van Assche wrote:
diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
index 1f154f92f4c2..bc811ab52c4a 100644
--- a/drivers/block/null_blk/main.c
+++ b/drivers/block/null_blk/main.c
@@ -157,6 +157,10 @@ static int g_max_sectors;
  module_param_named(max_sectors, g_max_sectors, int, 0444);
  MODULE_PARM_DESC(max_sectors, "Maximum size of a command (in 512B sectors)");
+static unsigned int g_max_segment_size = 1UL << 31;

Nit: UINT_MAX ?

Hi Damien,

That would be a valid alternative. I will consider changing the value into UINT_MAX.

@@ -2088,6 +2100,7 @@ static int null_add_dev(struct nullb_device *dev)
  	nullb->q->queuedata = nullb;
  	blk_queue_flag_set(QUEUE_FLAG_NONROT, nullb->q);
  	blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, nullb->q);
+	blk_queue_flag_set(QUEUE_FLAG_SUB_PAGE_SEGMENTS, nullb->q);

Where is this defined ? I do not see this flag defined anywhere in Linus
tree nor in Jens for-next...

That flag has been defined in patch 05/10 of this series.

In case you would like to take a look, the code I used to test this series is available here: https://github.com/bvanassche/blktests/commits/master

Thanks,

Bart.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux