Support of files/raw partitions > 4Gb
kyb at online.ru
Mon Feb 12 15:09:28 UTC 2007
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.
Russ Allbery writes:
> Kirill Berezin <kyb at online.ru> writes:
>> I am talking about both cnfs and buffindexed buffers. CNFS seems
>> working fine with 64 bit offset. But buffindexed method requires a
>> little change to support a correct reading of buffers' length over 4 Gb.
>> Constant at line 316 of buffindexed.c must have an explicit type
>> len = strtoul(l, NULL, 10) * 1024; /* This value in KB in decimal */
>> ^ must be `(off_t)1024`
> This problem is now fixed in Subversion.
More information about the inn-workers