xfs
[Top] [All Lists]

Re: Problem setting up quotas ...

To: James Pearson <james-p@xxxxxxxxxxxxxxxxxx>
Subject: Re: Problem setting up quotas ...
From: Russell Cattelan <cattelan@xxxxxxxxxxx>
Date: Thu, 03 May 2001 13:31:54 -0400
Cc: Jan Rekorajski <baggins@xxxxxxxxxxxxxxxxx>, linux-xfs@xxxxxxxxxxx
References: <3AF16D0A.2D12C344@moving-picture.com> <20010503170018.A31942@sith.mimuw.edu.pl> <3AF17D9A.D9B648A4@moving-picture.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
I'n not quite spotting the problem either... could you send  the diff?

I'm not very familiar with the quota code...
Nathan  can you see a problem in the dquot.c stuff referenced below?


> Jan Rekorajski wrote:
> >
> > On Thu, 03 May 2001, James Pearson wrote:
> >
> > > I've just installed RedHat 7.1/XFS1.0 on a Athlon based system and I'm
> > > trying to get quotas working - so far without success.
> > >
> > > I've made a XFS file system and mounted it with -o quota and tried to
> > > follow the instructions in the quotaon man page and
> > > /usr/share/doc/xfsprogs/README.quota but get the following:
> > >
> > > # rpm -q quota
> > > quota-3.01-SGI_5
> > >
> > > # uname -r
> > > 2.4.2-SGI_XFS_1.0
> > >
> > > # mount | grep quota
> > > /dev/hda4 on /disk1 type xfs (rw,quota)
> > >
> > > # setquota james 600 800 15 20 /disk1
> > > Not all specified mountpoints are using quota.
> > >
> > > # repquota /disk1
> > > Not all specified mountpoints are using quota.
> > >
> > > # edquota james
> > > No filesystems with quota detected.
> > >
> > > I've also recompiled the kernel with CONFIG_QUOTA=y and
> > > CONFIG_XFS_QUOTA=y just in case the supplied kernel didn't have quotas
> > > enabled - but with the same results.
> > >
> > > Is there anything else I need to do?
> >
> > I had the same problem. It may be the effect of misplaced patch.
> >
> > Look in the fs/dquot.c file somewhere around line 1450,
> > and move the following after the if (special != NULL...) statement:
> >
> >         if (sb && sb->s_op && sb->s_op->quotactl) {
> >                 unlock_kernel();
> >                 return sb->s_op->quotactl(sb, cmds, type, id, addr);
> >         }
> >
> >         if (id & ~0xFFFF)
> >                 goto out;
> >
> > I don't know why, but it happened.
> >
>
> Not quite sure what needs to be moved where - there's nothing like that
> around line 1450, but at around line 2050 there is:
>
>         dev = NODEV;
>         if (special != NULL || (cmds != Q_SYNC && cmds != Q_GETSTATS)) {
>                 mode_t mode;
>                 struct nameidata nd;
>
>                 ret = user_path_walk(special, &nd);
>                 if (ret)
>                         goto out;
>
>                 dev = nd.dentry->d_inode->i_rdev;
>                 mode = nd.dentry->d_inode->i_mode;
>                 path_release(&nd);
>
>                 ret = -ENOTBLK;
>                 if (!S_ISBLK(mode))
>                         goto out;
>                 ret = -ENODEV;
>                 sb = get_super(dev);
>                 if (!sb)
>                         goto out;
>         }
>
>         if (sb && sb->s_op && sb->s_op->quotactl) {
>                 unlock_kernel();
>                 return sb->s_op->quotactl(sb, cmds, type, id, addr);
>         }
>
>         if (id & ~0xFFFF)
>                 goto out;
>
>         ret = -EINVAL;
>
> What needs to be changed?
>
> Thanks
>
> James Pearson

--
Russell Cattelan
--
Digital Elves inc. -- Currently on loan to SGI
Linux XFS core developer.




<Prev in Thread] Current Thread [Next in Thread>