xfs
[Top] [All Lists]

Re: [patch] Re: XFS, Quotas and Samba

To: Nathan Scott <nathans@xxxxxxx>
Subject: Re: [patch] Re: XFS, Quotas and Samba
From: Jan Kara <jack@xxxxxxx>
Date: Mon, 10 Sep 2001 10:00:26 +0200
Cc: Bret Giddings <bret@xxxxxxxxxxx>, linux-xfs@xxxxxxxxxxx, samba-technical@xxxxxxxxxxxxxxx
In-reply-to: <20010909205752.A397355@wobbly.melbourne.sgi.com>; from nathans@sgi.com on Sun, Sep 09, 2001 at 08:57:52PM +1100
References: <7AC902A40BEDD411A3A800D0B7847B660882F5@sernt14.essex.ac.uk> <20010906105952.B345981@wobbly.melbourne.sgi.com> <20010906123515.A380241@wobbly.melbourne.sgi.com> <20010906163441.C24754@atrey.karlin.mff.cuni.cz> <20010909205752.A397355@wobbly.melbourne.sgi.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mutt/1.3.15i
  Hello,

> On Thu, Sep 06, 2001 at 04:34:41PM +0200, Jan Kara wrote:
> >   Hello,
> > 
> >   Actually it depends whether the samba code was compiled with
> > proper kernel headers. If so the Q_GETQUOTA is defined to be
> > right value and so everything should work fine. Ok, to be more
> > precise the utils probably won't compile in that case as struct dqblk
> > is no more and mem_dqblk should be used instead... But anyway it shouldn't
> > break silently.
> 
> Hmm ... I can't see any case where the new VFS quota code will
> work (ie. Jan's patches/AC kernels/Redhat 7.1+) with the smbd
> code, even if the kernel headers happened to correspond to the
> running kernel.  As I understand it, the new code returns a u64
> byte count in one field (curspace) where before there was a u32
> block count (curblocks).  Is that correct?  If so, smbd is in a
> bit of strife here cos it peeks at that field in particular...
  Yes. The returned structure is different and that was a reason
why it was renamed to struct mem_dqblk :). So code which is using
old structure doesn't compile...

> I took a stab at implementing the fix for this problem and for
> XFS quota - the XFS code should be correct, the VFS quota code
> (v1/v2 stuff) should be too, but I'm less certain on that - see
> attached patch.  The approach is basically to attempt the old
> Linux quotactl for non-XFS filesystems - if that fails, try
> the new version.  And for XFS filesystems, always use the XFS
> quotactl command, which is always the right thing to do.
> 
> Bret - could you let me know if this helps you?
  The patch seems to have one small problem: if version == 2 then
size is set to D2.dqb_curspace but IMHO it should be something like
toqb(D2.dqb_curspace).

                                                        Honza

--
Jan Kara <jack@xxxxxxx>
SuSE Labs


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