2002-10-03 10:29:03

by Joe Thornber

[permalink] [raw]
Subject: block device size in 2.5

Why is the total size of a block device held in struct gendisk rather
than struct block_device ?

Joe Thornber


2002-10-03 10:40:59

by Alexander Viro

[permalink] [raw]
Subject: Re: block device size in 2.5



On Thu, 3 Oct 2002, Joe Thornber wrote:

> Why is the total size of a block device held in struct gendisk rather
> than struct block_device ?

It is mirrored into bdev->bd_inode->i_size. However, struct block_device
is not persistent - persistent stuff lives in struct gendisk.

2002-10-03 10:50:54

by Joe Thornber

[permalink] [raw]
Subject: Re: block device size in 2.5

On Thu, Oct 03, 2002 at 06:46:30AM -0400, Alexander Viro wrote:
>
>
> On Thu, 3 Oct 2002, Joe Thornber wrote:
>
> > Why is the total size of a block device held in struct gendisk rather
> > than struct block_device ?
>
> It is mirrored into bdev->bd_inode->i_size. However, struct block_device
> is not persistent - persistent stuff lives in struct gendisk.

Thanks.

Is gendisk the right name for that structure now ? Since all block
devices now have to use it. I've always avoided using gendisk before,
arguing that dm produces block devices, not disks. I don't need
partitions and I don't particularly want the devices to appear in
/proc/partitions.

Joe Thornber

2002-10-03 10:56:28

by Alexander Viro

[permalink] [raw]
Subject: Re: block device size in 2.5



On Thu, 3 Oct 2002, Joe Thornber wrote:

> Is gendisk the right name for that structure now ? Since all block
> devices now have to use it. I've always avoided using gendisk before,
> arguing that dm produces block devices, not disks. I don't need
> partitions and I don't particularly want the devices to appear in
> /proc/partitions.

*shrug* Probably we should change the name at some point. struct gendisk
was the best starting point for creating such structure...