Skip to contentSkip to conversation

Quota support for UID >65534

DISCUSSION Zeljko Brajdic 3 participants 6 messages Jul 15, 2002 – Jul 17, 2002

lore
Share & tools
lore
#0 lore raw

Hello,

I've applied quota patches for vanilla kernel-2.4.18 found at ftp://ftp.suse.com/pub/people/mason/patches/reiserfs/quota-2.4/2.4.18/ Everything works perfectly except for checking quota with command quota -v username' if username have UID >65534. Interesting is that repquota' doesn't have that problem and showing.

This is output of `quota':

root@led 12:02 (/usr/src/linux) > quota -v bureq
quota: Error while getting quota from /dev/sda4 for 200000: Invalid argument Disk quotas for user bureq (uid 200000): none

Strace output is (last few lines):

stat64("/dev/sda4", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 4), ...}) = 0
getuid32() = 0
quotactl(0xd00 /* Q_??? */|USRQUOTA, "/dev/sda4", 0, {0, 0, 2, 0, 0, 2538116, 0, 0}) = 0
quotactl(0x900 /* Q_??? */|USRQUOTA, "/dev/sda4", 0, {604800, 604800, 0, 2476, 0, 2475, 3221224236, 134536589}) = 0
geteuid32() = 0
quotactl(0xd00 /* Q_??? */|USRQUOTA, "/dev/sda4", 200000, {1073780232, 1073821628, 1073823040, 1, 0, 0, 0, 0}) = -1 EINVAL (Invalid argument)
write(2, "quota: ", 7quota: ) = 7
write(2, "Error while getting quota from /"..., 70Error while getting quota from /dev/sda4 for 200000: Invalid argument ) = 70
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40014000
write(1, "Disk quotas for user bureq (uid "..., 46Disk quotas for user bureq (uid 200000): none
) = 46
munmap(0x40014000, 4096) = 0
_exit(0) = ?

Signature · 2 lines
v            ,   v  v
Zeljko Brajdic - Zorz
#1 lore raw
Quoted 8 lines · Zeljko Brajdic

Hello,

I've applied quota patches for vanilla kernel-2.4.18 found at ftp://ftp.suse.com/pub/people/mason/patches/reiserfs/quota-2.4/2.4.18/ Everything works perfectly except for checking quota with command quota -v username' if username have UID >65534. Interesting is that repquota' doesn't have that problem and showing.

Quoted 5 lines

This is output of `quota':

root@led 12:02 (/usr/src/linux) > quota -v bureq
quota: Error while getting quota from /dev/sda4 for 200000: Invalid argument Disk quotas for user bureq (uid 200000): none

Which disk format are you using? You can check this with debugreiserfs /dev/xxxxx

-chris

#2 lore raw
Quoted 9 lines · Chris Mason
Quoted 8 lines · Zeljko Brajdic

Hello,

I've applied quota patches for vanilla kernel-2.4.18 found at ftp://ftp.suse.com/pub/people/mason/patches/reiserfs/quota-2.4/2.4.18/ Everything works perfectly except for checking quota with command quota -v username' if username have UID >65534. Interesting is that repquota' doesn't have that problem and showing.

Quoted 9 lines
Quoted 5 lines

This is output of `quota':

root@led 12:02 (/usr/src/linux) > quota -v bureq
quota: Error while getting quota from /dev/sda4 for 200000: Invalid argument Disk quotas for user bureq (uid 200000): none

Which disk format are you using? You can check this with debugreiserfs /dev/xxxxx

root@led 13:12 (/usr/src/linux) > debugreiserfs /dev/sda4

<-------------debugreiserfs, 2002------------->
reiserfsprogs 3.x.1b

Filesystem state: consistency is not checked after last mounting

Reiserfs super block in block 16 on 0x804 of format 3.6 with standard journal

We have found "error". :) In fs/dquot.c at line 2057 exists if statement:

        if (id & ~0xFFFF)
                goto out;

Is this feature or bug?! :) This have been found in vanilla kernel-2.4.18

Signature · 2 lines
v            ,   v  v
Zeljko Brajdic - Zorz
#3 lore raw
Quoted 21 lines · Zeljko Brajdic
Quoted 9 lines · Chris Mason
Quoted 8 lines · Zeljko Brajdic

Hello,

I've applied quota patches for vanilla kernel-2.4.18 found at ftp://ftp.suse.com/pub/people/mason/patches/reiserfs/quota-2.4/2.4.18/ Everything works perfectly except for checking quota with command quota -v username' if username have UID >65534. Interesting is that repquota' doesn't have that problem and showing.

Quoted 9 lines
Quoted 5 lines

This is output of `quota':

root@led 12:02 (/usr/src/linux) > quota -v bureq
quota: Error while getting quota from /dev/sda4 for 200000: Invalid argument Disk quotas for user bureq (uid 200000): none

Which disk format are you using? You can check this with debugreiserfs /dev/xxxxx

root@led 13:12 (/usr/src/linux) > debugreiserfs /dev/sda4

Quoted 7 lines

<-------------debugreiserfs, 2002------------->
reiserfsprogs 3.x.1b

Filesystem state: consistency is not checked after last mounting

Reiserfs super block in block 16 on 0x804 of format 3.6 with standard journal

This means your reiserfs disk can support the high uids.

Quoted 9 lines

We have found "error". :) In fs/dquot.c at line 2057 exists if statement:

        if (id & ~0xFFFF)
                goto out;

Is this feature or bug?! :) This have been found in vanilla kernel-2.4.18

This check is not in a quota patched kernel. sys_quotactl isn't in fs/dquot.c with the quota patches applied.

Did you apply all of the patches in my quota directory? I think so, since the kernel wouldn't compile otherwise ;-)

quota -v high_uid_user works fine for me, which version of the quota utils do you have installed?

-chris

author
#4 lore raw
Quoted 40 lines · Chris Mason
Quoted 21 lines · Zeljko Brajdic
Quoted 9 lines · Chris Mason
Quoted 8 lines · Zeljko Brajdic

Hello,

I've applied quota patches for vanilla kernel-2.4.18 found at ftp://ftp.suse.com/pub/people/mason/patches/reiserfs/quota-2.4/2.4.18/ Everything works perfectly except for checking quota with command quota -v username' if username have UID >65534. Interesting is that repquota' doesn't have that problem and showing.

Quoted 9 lines
Quoted 5 lines

This is output of `quota':

root@led 12:02 (/usr/src/linux) > quota -v bureq
quota: Error while getting quota from /dev/sda4 for 200000: Invalid argument Disk quotas for user bureq (uid 200000): none

Which disk format are you using? You can check this with debugreiserfs /dev/xxxxx

root@led 13:12 (/usr/src/linux) > debugreiserfs /dev/sda4

Quoted 7 lines

<-------------debugreiserfs, 2002------------->
reiserfsprogs 3.x.1b

Filesystem state: consistency is not checked after last mounting

Reiserfs super block in block 16 on 0x804 of format 3.6 with standard journal

This means your reiserfs disk can support the high uids.

Quoted 8 lines

We have found "error". :) In fs/dquot.c at line 2057 exists if statement:

        if (id & ~0xFFFF)
                goto out;
Quoted 8 lines
Quoted 1 line

Is this feature or bug?! :) This have been found in vanilla kernel-2.4.18

This check is not in a quota patched kernel. sys_quotactl isn't in fs/dquot.c with the quota patches applied.

Did you apply all of the patches in my quota directory? I think so, since the kernel wouldn't compile otherwise ;-)

Yes, i've applied: 50_quota-patch-2.4.15-1-2.4.16, dquot_deadlock.diff, kinoded-8.diff, nesting-10.diff, reiserfs-quota-20.diff

Quoted 3 lines

quota -v high_uid_user works fine for me, which version of the quota utils do you have installed?

root@led 15:03 (~) > quota -V
Quota utilities version 3.06.

Signature · 2 lines
v            ,   v  v
Zeljko Brajdic - Zorz
#5 lore raw
In reply to Zeljko Brajdic

On 16 Jul 2002 10:14:08 +0200
Zeljko Brajdic <[email protected]> wrote:

Following Honza recommandations , we simply stripped out the
"if (id & ~0xFFFF)" line by hand and we now use quota ith 32bits UIDs without any problem :o)

It's not a bug , more likely a test that's been there for long at the time of 32bit UIDs were not ready , it think.

Thanks,

Philippe.

  |  We have found "error". :) In fs/dquot.c at line 2057 exists if
  |  statement:
  |  
  |          if (id & ~0xFFFF)
  |                  goto out;
  |  
  |  Is this feature or bug?! :) This have been found in vanilla kernel-2.4.18
  |  -- 
  |  v            ,   v  v
  |  Zeljko Brajdic - Zorz
  |  
  |