buffer_head size

buffer_head size

Post by z.. » Tue, 16 Jul 2002 12:00:19



Hi,
      in struct buffer_head, the actual data block size is stored in
b_size. Is there any limitation for the block size? Most buffer_head has
the size of 4096, but can I define a buffer_head with the size of 8K,16K
or even 128KB?

         Thanks!

 
 
 

buffer_head size

Post by Sagar A. Tamha » Fri, 26 Jul 2002 06:51:30



> Hi,
>       in struct buffer_head, the actual data block size is stored in
> b_size. Is there any limitation for the block size? Most buffer_head has
> the size of 4096, but can I define a buffer_head with the size of 8K,16K
> or even 128KB?

>          Thanks!

Hi,

The b_size field is "unsigned short". So you can have atmost
sizeof(unsigned short) in bits as the data block size. this value
might differ for different installations.
My system has unsigned short as 2 bytes = 16 bits.
Hence max block size = 64K

-Sagar

 
 
 

1. maximum block size in buffer_head

The current Linux kernel (both 2.4.xx and 2.5.xx) declare the b_size
member in struct buffer_head as an "unsigned short".  This obviously
limits the maximum block size to something less than 65536.  This is
bad because on some platforms (e.g., ia64), the page size can be up to
64KB large.

Two questions:

 - does anyone object to widening b_size to "unsigned int"?

 - does anyone know of any other code paths where the block
   size is assumed to fit into 16 bits?

Thanks,

        --david
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. sockets programming

3. include buffer_head.h in actual users instead of fs.h (9/10)

4. A terrible newbie question

5. How to setup a buffer_head in a driver

6. how do i update my xfree86 server?????

7. LVM2 modifies the buffer_head struct?

8. How to set hostname?

9. ide-tape.c must include buffer_head.h

10. Remove ext2's buffer_head cache

11. copy content of a buffer_head

12. move BH_JBD out of buffer_head.h

13. include buffer_head.h in actual users instead of fs.h (1/10)