Re: [PATCH] virtio_blk: add helper function to support mass of disks naming

2012-03-28 Thread Ren Mingxin
On 03/28/2012 06:58 PM, Michael S. Tsirkin wrote: On Wed, Mar 28, 2012 at 02:54:43PM +0800, Ren Mingxin wrote: Hi, The current virtblk's naming algorithm just supports 26^3 disks. If there are mass of virtblks(exceeding 26^3), there will be disks with the same name. Accordi

[PATCH 0/4] block: move sd_format_disk_name() into block core as disk_name_format()

2012-03-30 Thread Ren Mingxin
This patch series renames "sd_format_disk_name()" to "disk_name_format()" and moves it into block core. So that who needs formatting disk name can use it, instead of duplicating these similar help functions. Ren Mingxin (4): block: add function disk_name_format() in

[PATCH 1/4] block: add function disk_name_format() into block core

2012-03-30 Thread Ren Mingxin
According to 3e1a7ff8a0a7b948f2684930166954f9e8e776fe, I copied function "sd_format_disk_name()" into block core with the name of "disk_name_format()". Signed-off-by: Ren Mingxin --- block/genhd.c | 49 + include/

[PATCH 2/4] scsi: replace sd_format_disk_name() to disk_name_format()

2012-03-30 Thread Ren Mingxin
Since "sd_format_disk_name()"has been copied into block core as "disk_name_format()", the original function should be removed, and the place used original function should be replaced by the renamed function. Signed-off-by: Ren Mingx

[PATCH 3/4] block: replace rssd_disk_name_format() to disk_name_format()

2012-03-30 Thread Ren Mingxin
Currently, block core has been supplied "disk_name_format()", so we should remove duplicate function "rssd_disk_name_format()" and use the new function to format rssd disk names. Signed-off-by: Ren Mingxin --- mtip32xx.c | 33 + 1 file

[PATCH 4/4] virtio_blk: use disk_name_format() to support mass of disks naming

2012-03-30 Thread Ren Mingxin
nction to support mass of disks. Signed-off-by: Ren Mingxin --- virtio_blk.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index c4a60ba..54612c2 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/bloc

Re: [PATCH 0/4] block: move sd_format_disk_name() into block core as disk_name_format()

2012-03-30 Thread Ren Mingxin
Hi, James: On 03/30/2012 05:56 PM, James Bottomley wrote: On Fri, 2012-03-30 at 17:50 +0800, Ren Mingxin wrote: This patch series renames "sd_format_disk_name()" to "disk_name_format()" and moves it into block core. So that who needs formatting disk name can use it, in

Re: [PATCH 4/4] virtio_blk: use disk_name_format() to support mass of disks naming

2012-03-30 Thread Ren Mingxin
Hi, He: On 03/30/2012 07:22 PM, Asias He wrote: On Fri, Mar 30, 2012 at 5:53 PM, Ren Mingxin wrote: The current virtblk's naming algorithm only supports 263 disks. If there are mass of virtblks(exceeding 263), there will be disks with the same name. This fix is pretty nice. Ho

Re: [PATCH 4/4] virtio_blk: use disk_name_format() to support mass of disks naming

2012-04-01 Thread Ren Mingxin
On 03/30/2012 11:38 PM, Tejun Heo wrote: On Fri, Mar 30, 2012 at 08:26:06AM -0700, Tejun Heo wrote: On Fri, Mar 30, 2012 at 05:53:52PM +0800, Ren Mingxin wrote: The current virtblk's naming algorithm only supports 263 disks. If there are mass of virtblks(exceeding 263), there will be

Re: [PATCH 4/4] virtio_blk: use disk_name_format() to support mass of disks naming

2012-04-01 Thread Ren Mingxin
On 03/30/2012 11:28 PM, Tejun Heo wrote: On Fri, Mar 30, 2012 at 08:26:06AM -0700, Tejun Heo wrote: On Fri, Mar 30, 2012 at 05:53:52PM +0800, Ren Mingxin wrote: The current virtblk's naming algorithm only supports 263 disks. If there are mass of virtblks(exceeding 263), there will be

Re: [PATCH 3/4] block: replace rssd_disk_name_format() to disk_name_format()

2012-04-01 Thread Ren Mingxin
On 03/31/2012 07:54 AM, Asai Thambi Samymuthu Pattrayasamy (asamymuthupa) [CONT - Type 2] wrote: On 3/30/2012 2:53 AM, Ren Mingxin wrote: Currently, block core has been supplied "disk_name_format()", so we should remove duplicate function "rssd_disk_name_format()" and

Re: [PATCH 4/4] virtio_blk: use disk_name_format() to support mass of disks naming

2012-04-08 Thread Ren Mingxin
On 04/04/2012 04:01 PM, Michael S. Tsirkin wrote: On Mon, Apr 02, 2012 at 12:00:45PM -0700, Tejun Heo wrote: On Mon, Apr 02, 2012 at 11:56:18AM -0700, James Bottomley wrote: So if we're agreed no other devices going forwards should ever use this interface, is there any point unifying the inter

[PATCH] virtio_blk: Add help function to format mass of disks

2012-04-10 Thread Ren Mingxin
to support mass of disks naming. Signed-off-by: Ren Mingxin --- drivers/block/virtio_blk.c | 38 ++ 1 files changed, 26 insertions(+), 12 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index c4a60ba..86516c8 100644 ---

Re: [PATCH] virtio_blk: Add help function to format mass of disks

2012-04-10 Thread Ren Mingxin
On 04/10/2012 09:16 PM, Avi Kivity wrote: On 04/10/2012 10:28 AM, Ren Mingxin wrote: The current virtio block's naming algorithm just supports 18278 (26^3 + 26^2 + 26) disks. If there are mass of virtio blocks, there will be disks with the same name. Based on c

Re: [PATCH] virtio_blk: Add help function to format mass of disks

2012-04-10 Thread Ren Mingxin
On 04/11/2012 09:21 AM, Asias He wrote: On 04/10/2012 11:53 PM, Michael S. Tsirkin wrote: On Tue, Apr 10, 2012 at 08:49:43AM -0700, Tejun Heo wrote: Hello, guys. On Tue, Apr 10, 2012 at 04:34:06PM +0300, Michael S. Tsirkin wrote: Why not use 'base' below? neither unit nor base change. Yes

[PATCH v2] virtio_blk: Add help function to format mass of disks

2012-04-10 Thread Ren Mingxin
to support mass of disks naming. Signed-off-by: Ren Mingxin --- v1->v2: wipe off the duplicate line --- drivers/block/virtio_blk.c | 37 + 1 files changed, 25 insertions(+), 12 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_b