Skip to contentSkip to conversation

64-bit block sizes on 32-bit systems

DISCUSSION Manfred Spraul 3 participants 5 messages Mar 26, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines
Quoted 4 lines

I vaguely remember a discussion about this a few months back. If I remember, the reasoning was it would unnecessarily slow down smaller systems that would never have block devices in the 4-28T range attached.

4k page size * 2GB = 8TB.

Try it.
If your drive (array) is larger than 512byte*4G (4TB) linux will eat your data.

drivers/block/ll_rw_blk.c, in submit_bh()

Quoted 1 line
   bh->b_rsector = bh->b_blocknr * (bh->b_size >> 9);

But it shouldn't cause data corruptions:
It was discussed a few months ago, and iirc LVM refuses to create too large volumes.

--
Manfred

#1 lore raw
Quoted 6 lines · Manfred Spraul

drivers/block/ll_rw_blk.c, in submit_bh()

Quoted 1 line
   bh->b_rsector = bh->b_blocknr * (bh->b_size >> 9);

But it shouldn't cause data corruptions:
It was discussed a few months ago, and iirc LVM refuses to create too large volumes.

Ah yes, I'd forgotten the block layer still works in terms of 512-byte blocks.

Signature · 1 line
Revolutions do not require corporate support.
#2 lore raw
In reply to Manfred Spraul
Quoted 6 lines · Manfred Spraul
Quoted 2 lines

4k page size * 2GB = 8TB.

Try it.
If your drive (array) is larger than 512byte*4G (4TB) linux will eat your data.

---
I have a block device that doesn't use 'sectors'. It
only uses the logical block size (which is currently set for 1K). Seems I could up that to the max blocksize (4k?) and get 8TB...No?

I don't use the generic block make request (have my
own).

Signature · 2 lines
L A Walsh                        | Trust Technology, Core Linux, SGI
[email protected]                      | Voice: (650) 933-5338
#3 lore raw
In reply to Manfred Spraul

From: "LA Walsh" <[email protected]>

Quoted 7 lines
Quoted 6 lines · Manfred Spraul
Quoted 2 lines

4k page size * 2GB = 8TB.

Try it.
If your drive (array) is larger than 512byte*4G (4TB) linux will eat your data.

Quoted 9 lines

---
I have a block device that doesn't use 'sectors'. It only uses the logical block size (which is currently set for 1K). Seems I could up that to the max blocksize (4k?) and get 8TB...No?

I don't use the generic block make request (have my own).

Which field do you access? bh->b_blocknr instead of bh->r_sector?

There were plans to split the buffer_head into 2 structures: buffer cache data and the block io data.
b_blocknr is buffer cache only, no driver should access them.

http://groups.google.com/groups?q=NeilBrown+io_head&hl=en&lr=&safe=off&r
num=1&seld=928643305&ic=1

--
Manfred

#4 lore raw
In reply to Manfred Spraul
Quoted 1 line · Manfred Spraul

Which field do you access? bh->b_blocknr instead of bh->r_sector?

---
Yes.

Quoted 4 lines

There were plans to split the buffer_head into 2 structures: buffer cache data and the block io data.
b_blocknr is buffer cache only, no driver should access them.

---
My 'device' only lives in the buffer cache. I write
to the device 95% only from kernel space and then it is read out in large 256K reads by a user-land daemon to copy to a file. The user-land daemon may also use 'sendfile' to pull the data out of the device and copy it to a file which should, as I understand it, result in a kernel only copy from the device to the output file buffers -- meaning no copy of the data to user space would be needed. My primary 'dig' in all this is the 32-bit block_nr's in the buffer cache.

-l

Signature · 2 lines
L A Walsh                        | Trust Technology, Core Linux, SGI
[email protected]                      | Voice: (650) 933-5338