[patch] Re: XFS, Quotas and Samba

Jan Kara jack at suse.cz
Mon Sep 10 01:00:04 GMT 2001


> 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


Jan Kara <jack at suse.cz>
SuSE Labs

More information about the samba-technical mailing list