[PATCH 6/7] ubd: remove the queue pointer in struct ubd

Richard Weinberger richard at nod.at
Tue Feb 27 13:01:01 PST 2024


----- Ursprüngliche Mail -----
> Von: "hch" <hch at lst.de>
> An: "richard" <richard at nod.at>, "anton ivanov" <anton.ivanov at cambridgegreys.com>, "Johannes Berg"
> <johannes at sipsolutions.net>, "Jens Axboe" <axboe at kernel.dk>
> CC: "linux-um" <linux-um at lists.infradead.org>, "linux-block" <linux-block at vger.kernel.org>
> Gesendet: Donnerstag, 22. Februar 2024 08:24:16
> Betreff: [PATCH 6/7] ubd: remove the queue pointer in struct ubd

> No need for it now, everything goes through the gendisk.
> 
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> ---
> arch/um/drivers/ubd_kern.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
> index c5d32e75426366..9bf1d6a88bae59 100644
> --- a/arch/um/drivers/ubd_kern.c
> +++ b/arch/um/drivers/ubd_kern.c
> @@ -163,7 +163,6 @@ struct ubd {
> 	struct cow cow;
> 	struct platform_device pdev;
> 	struct gendisk *disk;
> -	struct request_queue *queue;
> 	struct blk_mq_tag_set tag_set;
> 	spinlock_t lock;
> };
> @@ -892,10 +891,9 @@ static int ubd_add(int n, char **error_out)
> 		err = PTR_ERR(disk);
> 		goto out_cleanup_tags;
> 	}
> -	ubd_dev->queue = disk->queue;
> 
> 	blk_queue_flag_set(QUEUE_FLAG_NONROT, disk->queue);
> -	blk_queue_write_cache(ubd_dev->queue, true, false);
> +	blk_queue_write_cache(disk->queue, true, false);
> 	disk->major = UBD_MAJOR;
> 	disk->first_minor = n << UBD_SHIFT;
> 	disk->minors = 1 << UBD_SHIFT;
> --
> 2.39.2

Reviewed-by: Richard Weinberger <richard at nod.at>

Thanks,
//richard



More information about the linux-um mailing list