On 4/10/25 6:29 AM, Jared Holzman wrote: > @@ -3052,6 +3053,22 @@ static int ublk_ctrl_get_features(struct io_uring_cmd *cmd) > return 0; > } > > +static int ublk_ctrl_set_size(struct ublk_device *ub, > + struct io_uring_cmd *cmd) Minor style nit, but that would fit on a single line, doesn't need to be split in two. > +{ > + const struct ublksrv_ctrl_cmd *header = io_uring_sqe_cmd(cmd->sqe); > + struct ublk_param_basic *p = &ub->params.basic; > + size_t new_size = (int)header->data[0]; > + int ret = 0; > + > + p->dev_sectors = new_size; > + > + mutex_lock(&ub->mutex); > + set_capacity_and_notify(ub->ub_disk, p->dev_sectors); > + mutex_unlock(&ub->mutex); > + > + return ret; > +} Get rid of 'ret' here, it's entirely unused. In fact maybe just get rid of the return value in the first place, as the function can't fail? -- Jens Axboe