2003-07-29 16:04:51

by Herbert Poetzl

[permalink] [raw]
Subject: Quota in 2.6.0-test2 broken ...


Hi Honza!

Quota is definitely broken in 2.6.0-test2 because the
code tries to acquire dqio_sem in *_read_file_info, while
already holding the same sem in vfs_quota_on, which
simply deadlocks ...

removing the down(dqio_sem) in vfs_quota_on at least
allows quota to be enabled 8-) but still deadlocks on
quota transfers? ... :(

it seems this stuff hasn't been tested since the last
update? doesn't anybody use quota anymore?

best,
Herbert


2003-07-29 16:49:40

by Jan Kara

[permalink] [raw]
Subject: Re: Quota in 2.6.0-test2 broken ...

Hello,

> Quota is definitely broken in 2.6.0-test2 because the
> code tries to acquire dqio_sem in *_read_file_info, while
> already holding the same sem in vfs_quota_on, which
> simply deadlocks ...
Huh I see. Actually only old quota format is affected by this bug
(that may be a reason why it went unnoticed for a while).

> removing the down(dqio_sem) in vfs_quota_on at least
> allows quota to be enabled 8-) but still deadlocks on
> quota transfers? ... :(
I'll have a look at this - I don't see a reason for this in a code.

> it seems this stuff hasn't been tested since the last
> update? doesn't anybody use quota anymore?
When you have test machine you usually don't run a quota on it and
when you have machine with lots of users on it you won't use unstable
kernels. So I guess this is not a big wonder (I suppose the bugreports
for 2.6 quota code will start to appear soon ;).

Honza

--
Jan Kara <[email protected]>
SuSE CR Labs

2003-07-29 20:59:36

by Jan Kara

[permalink] [raw]
Subject: Re: Quota in 2.6.0-test2 broken ...

Hello,

> > > Quota is definitely broken in 2.6.0-test2 because the
> > > code tries to acquire dqio_sem in *_read_file_info, while
> > > already holding the same sem in vfs_quota_on, which
> > > simply deadlocks ...
> > Huh I see. Actually only old quota format is affected by this bug
> > (that may be a reason why it went unnoticed for a while).
>
> yes, but the 'new' quota format doesn't work either ...
>
> quotacheck -vaugm
> quotacheck: Scanning /dev/discs/disc1/part2 [/mnt/part2] ...
> quotacheck: Checked 4 directories and 0 files
> quotacheck: Old file not found.
> quotacheck: Old file not found.
>
> quotaon /dev/discs/disc1/part2
> quotaon: using /mnt/part2/quota.user on /dev/discs/disc1/part2 [/mnt/part2]: Invalid argument
> quotaon: Maybe create new quota files with quotacheck(8)?
Are you sure you compiled old quota format support into the kernel?

> > > it seems this stuff hasn't been tested since the last
> > > update? doesn't anybody use quota anymore?
> > When you have test machine you usually don't run a quota on it and
> > when you have machine with lots of users on it you won't use unstable
> > kernels. So I guess this is not a big wonder (I suppose the bugreports
> > for 2.6 quota code will start to appear soon ;).
>
> yeah, but I would expect, that you at least
> once tested the stuff yourself ... well no such luck,
Of course I did. I don't know how this thing could get into the
kernel...

> when will it be fixed? any plans?
I've attached possible fix (untested because first I have to update
binutils to be able to compile the kernel and it will take some time
because I have only modem line).

Honza


Attachments:
(No filename) (1.63 kB)
quotafix.diff (922.00 B)
Download all attachments