public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ryan Harper <ryanh@us.ibm.com>
To: Takuma Umeya <tumeya@redhat.com>
Cc: virtualization@lists.linux-foundation.org,
	john cooper <john.cooper@redhat.com>,
	Jens Axboe <jaxboe@fusionio.com>,
	linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>,
	Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] virtio_blk: decrement index when blockdevice is removed
Date: Wed, 6 Apr 2011 14:17:25 -0500	[thread overview]
Message-ID: <20110406191725.GJ5445@us.ibm.com> (raw)
In-Reply-To: <1969774563.659835.1301978981017.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com>

* Takuma Umeya <tumeya@redhat.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@redhat.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@redhat.com
> _______________________________________________
> Virtualization mailing list
> Virtualization@lists.linux-foundation.org
> https://lists.linux-foundation.org/mailman/listinfo/virtualization

-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
ryanh@us.ibm.com

      parent reply	other threads:[~2011-04-06 19:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1099995365.641718.1301903899721.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com>
2011-04-05  4:49 ` [PATCH] virtio_blk: decrement index when blockdevice is removed Takuma Umeya
2011-04-05  5:08   ` Jens Axboe
2011-04-06  1:32     ` Rusty Russell
2011-04-06  3:05       ` Jens Axboe
2011-04-06 19:17   ` Ryan Harper [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110406191725.GJ5445@us.ibm.com \
    --to=ryanh@us.ibm.com \
    --cc=hch@lst.de \
    --cc=jaxboe@fusionio.com \
    --cc=john.cooper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=tumeya@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox