Support of files/raw partitions > 4Gb

Bill Davidsen davidsen at
Tue Feb 13 18:16:02 UTC 2007

Kirill Berezin wrote:
> There is problem with the size of field blocknumber of OVINDEX structure 
> while mapping a memory for writing/reading headers. Current size of 
> blocknumber is unsigned int and it seems enough to store a number of 
> blocks, but when we multiply this by OV_BLOCKSIZE we get a wrong result 
> for buffers with more than 500000 blocks.  I suggest a  macro  to 
> encapsulate a calculation of a block offset or use off_t instead of 
> unsigned int in blocknumber declaration. I used a macro. Innd started 4 
> days ago, today about 1,5 million indexes in use, 4 raw partitions 14Gb 
> each, no warning or errors.

As a matter of good practice, all offsets should be type off_t, since 
they may not match any other type in size.

bill davidsen <davidsen at>
  CTO TMR Associates, Inc
  Doing interesting things with small computers since 1979

More information about the inn-workers mailing list