Skip to contentSkip to conversation

why raw devices don't seek above 4GB (sometimes)

DISCUSSION [email protected] 2 participants 3 messages Apr 17, 2001 – Apr 18, 2001

lore
Share & tools
lore
#0 lore raw

ok,
I found my problem. As previously said, I'm on reiser. Which (obviously) has a file size limit of 4GB set in the superblock. Llseek only allows seek offsets which are smaller than the allowed file size. What happens is:
I set up a raw device: raw /dev/raw/raw1 /dev/hdd
with /dev/hdd being my DVD drive.
Xine then does repeated llseeks on /dev/raw/raw1 until it gets above 4G. Because /dev/raw/raw1 and the associated /dev/hdd both are on reiserfs, and reiserfs has a 4G limit, llseek assumes the same for the associated raw devices and returns from the llseek with EINVAL. Bang.
I don't know whether there's an easy solution.
Please contact me if you nee further details/tests

Klaus

Signature · 6 lines
------------------------------------------------------------------------ 
 Klaus Lichtenwalder, Dipl. Inform.,       http://www.webforum.de/Klaus/
 Fax +49-(0)89-91072699                            [email protected]
 NIC: KL2100, KL76-RIPE                     [email protected]
 PGP Key fingerprint = 2658 EA97 E1A1 2680 5ECA  0036 80F5 F250 3CF8
C2C7
#1 lore raw
Quoted 7 lines

I set up a raw device: raw /dev/raw/raw1 /dev/hdd
with /dev/hdd being my DVD drive.
Xine then does repeated llseeks on /dev/raw/raw1 until it gets above 4G. Because /dev/raw/raw1 and the associated /dev/hdd both are on reiserfs, and reiserfs has a 4G limit, llseek assumes the same for the associated raw devices and returns from the llseek with EINVAL. Bang.
I don't know whether there's an easy solution.

That sounds like /dev/raw/.. should have its own lseek method.

Alan

#2 lore raw
Quoted 10 lines · Alan Cox
Quoted 8 lines

I set up a raw device: raw /dev/raw/raw1 /dev/hdd
with /dev/hdd being my DVD drive.
Xine then does repeated llseeks on /dev/raw/raw1 until it gets above 4G. Because /dev/raw/raw1 and the associated /dev/hdd both are on reiserfs, and reiserfs has a 4G limit, llseek assumes the same for the associated raw devices and returns from the llseek with EINVAL. Bang.
I don't know whether there's an easy solution.

That sounds like /dev/raw/.. should have its own lseek method.

Yeah, while going to bed I thought that this can only be cured by doing an raw-device specific lseek method, as lseek has no other means to find out which device this really is. I guess I'll give it a try but I don't know whether I'm up to it.

Klaus

Signature · 6 lines
------------------------------------------------------------------------ 
 Klaus Lichtenwalder, Dipl. Inform.,       http://www.webforum.de/Klaus/
 Fax +49-(0)89-91072699                            [email protected]
 NIC: KL2100, KL76-RIPE                     [email protected]
 PGP Key fingerprint = 2658 EA97 E1A1 2680 5ECA  0036 80F5 F250 3CF8
C2C7