[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110406191725.GJ5445@us.ibm.com>
Date: Wed, 6 Apr 2011 14:17:25 -0500
From: Ryan Harper <ryanh@...ibm.com>
To: Takuma Umeya <tumeya@...hat.com>
Cc: virtualization@...ts.linux-foundation.org,
john cooper <john.cooper@...hat.com>,
Jens Axboe <jaxboe@...ionio.com>, linux-kernel@...r.kernel.org,
Tejun Heo <tj@...nel.org>, Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] virtio_blk: decrement index when blockdevice is removed
* Takuma Umeya <tumeya@...hat.com> [2011-04-05 00:00]:
> When virtio block device is removed, index does not get decremented. When
> another virtio disk is attached it uses the next device letter to the
> one that is suppose to be available.
>
> Signed-off-by: Takuma Umeya <tumeya@...hat.com>
>
> diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
> index 6ecf89c..730e7af 100644
> --- a/drivers/block/virtio_blk.c
> +++ b/drivers/block/virtio_blk.c
> @@ -489,6 +489,7 @@ static void __devexit virtblk_remove(struct virtio_device *vdev)
> mempool_destroy(vblk->pool);
> vdev->config->del_vqs(vdev);
> kfree(vblk);
> + index--;
> }
What about referencing /dev/disk/by-id and using drive serial numbers?
How much do we care about re-using minor numbers? IIRC, virtio-blk can
go out to vdxxx; that's a lot of disks or add/removes.
>
> static const struct virtio_device_id id_table[] = {
>
> --
> Umeya, Takuma
> Technical Account Manager
> Red Hat GSS APAC
> +81.3.5798.8584 (direct)
> tumeya@...hat.com
> _______________________________________________
> Virtualization mailing list
> Virtualization@...ts.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/virtualization
--
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
ryanh@...ibm.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists