On 26.02.24 08:15, Chaitanya Kulkarni wrote: > @@ -1684,8 +1689,13 @@ static void null_del_dev(struct nullb *nullb) > dev->nullb = NULL; > } > > -static void null_config_discard(struct nullb *nullb, struct queue_limits *lim) > +static void null_config_discard_write_zeroes(struct nullb *nullb, > + struct queue_limits *lim) > { > + /* REQ_OP_WRITE_ZEROES only supported in non memory backed mode */ > + if (!nullb->dev->memory_backed && nullb->dev->write_zeroes) > + lim->max_write_zeroes_sectors = UINT_MAX >> 9; > + > if (nullb->dev->discard == false) > return; Please use SECTOR_SHIFT instead of the magic '9'.