Skip to contentSkip to conversation

64bit filesize limit on a 32bit linux

DISCUSSION Igor Schein 2 participants 2 messages May 31, 2005 – Jun 1, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

# ulimit -f `echo 2^22-1|bc`;ulimit -f
4194303
# ulimit -f `echo 2^22|bc`;ulimit -f
unlimited
# uname -r
2.6.11-1.1290_FC4

I need to limit users to 5GB per file instead of 4GB. Do I need any kernel patches or can it somehow be done in user space?

Thanks

Igor

#1 lore raw
Quoted 9 lines · Igor Schein
# ulimit -f `echo 2^22-1|bc`;ulimit -f
4194303
# ulimit -f `echo 2^22|bc`;ulimit -f
unlimited
# uname -r
2.6.11-1.1290_FC4

I need to limit users to 5GB per file instead of 4GB. Do I need any kernel patches or can it somehow be done in user space?

The syscall (and also glibc glue) for this only support 32-bit values. It's probably not hard to make a 64-bit version of these system calls (I'm not sure about the glibc changes though).