Re: amount of blocks on a device

Miquel van Smoorenburg (
23 May 1998 13:56:53 +0200

In article <Pine.OSF.3.96.980522200158.15451A-100000@ALUX19>,
Sieger Ralf AI <> wrote:
>On Thu, 21 May 1998, Sieger Ralf AI wrote:
>> How can I determine the amount of blocks on a given block device?
>Sorry I forgot to say that I want to know this from inside the kernel.

There's a global array called blksize_size[major][minor]

First check if blksize_size[major] is not NULL then check
blksize_size[major][minor]. If the first is NULL assume 1024


 Miquel van Smoorenburg | Our vision is to speed up time,  |   eventually eliminating it.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to