samba-3.0alpha23: linux quota compiling error

Alexander Bokovoy a.bokovoy at sam-solutions.net
Wed Apr 23 14:42:33 GMT 2003


On Wed, Apr 23, 2003 at 11:30:01AM -0300, Andreas wrote:
> On Wed, Apr 23, 2003 at 05:09:56PM +0300, Alexander Bokovoy wrote:
> > On Wed, Apr 23, 2003 at 10:58:17AM -0300, Andreas wrote:
> > > I'm getting the following error while trying to compile samba-3.0alpha23:
> > > Compiling smbd/quotas.c
> > > smbd/quotas.c: In function `get_smb_linux_vfs_quota':
> > > smbd/quotas.c:115: storage size of `D' isn't known
> > Does it have if_dqblk?
> 
> if_dqblk is defined in /usr/include/linux/quota.h, yes:
> struct if_dqblk {
>         __u64 dqb_bhardlimit;
>         __u64 dqb_bsoftlimit;
>         __u64 dqb_curspace;
>         __u64 dqb_ihardlimit;
>         __u64 dqb_isoftlimit;
>         __u64 dqb_curinodes;
>         __u64 dqb_btime;
>         __u64 dqb_itime;
>         __u32 dqb_valid;
> };
> 
> sys/quota.h defines:
> struct dqblk
>   {
>     u_int32_t dqb_bhardlimit;   /* absolute limit on disk blks alloc */
>     u_int32_t dqb_bsoftlimit;   /* preferred limit on disk blks */
>     u_int32_t dqb_curblocks;    /* current block count */
>     u_int32_t dqb_ihardlimit;   /* maximum # allocated inodes */
>     u_int32_t dqb_isoftlimit;   /* preferred inode limit */
>     u_int32_t dqb_curinodes;    /* current # allocated inodes */
>     time_t dqb_btime;           /* time limit for excessive disk use */
>     time_t dqb_itime;           /* time limit for excessive files */
>   };
I have exactly same situation at my site.
It looks like you have Jan Kara 64-bit quotas in kernel. What's
interesting, do you have 64-bit block-devices support in kernel?
 
 
> > > <sys/quota.h>, on the other hand, does define dqblk (quota 1?) for user level applications.
> > Also, do your linux/quota.h and sys/quota.h have same defines for syscalls as
> > well? There are number of reports for vendors who actually provide them
> > different.
> 
> Hmm, they seem different indeed:
> <linux/quota.h>:
> #define Q_SYNC     0x800001     /* sync disk copy of a filesystems quotas */
> #define Q_QUOTAON  0x800002     /* turn quotas on */
> #define Q_QUOTAOFF 0x800003     /* turn quotas off */
> #define Q_GETFMT   0x800004     /* get quota format used on given filesystem */
> #define Q_GETINFO  0x800005     /* get information about quota files */
> #define Q_SETINFO  0x800006     /* set information about quota files */
> #define Q_GETQUOTA 0x800007     /* get user quota structure */
> #define Q_SETQUOTA 0x800008     /* set user quota structure */
> 
> <sys/quota.h>:
> #define Q_QUOTAON  0x0100       /* enable quotas */
> #define Q_QUOTAOFF 0x0200       /* disable quotas */
> #define Q_GETQUOTA 0x0300       /* get limits and usage */
> #define Q_SETQUOTA 0x0400       /* set limits and usage */
> #define Q_SETUSE   0x0500       /* set usage */
> #define Q_SYNC     0x0600       /* sync disk copy of a filesystems quotas */
> #define Q_SETQLIM  0x0700       /* set limits */
> #define Q_GETSTATS 0x0800       /* get collected stats */
> #define Q_RSQUASH  0x1000       /* set root_squash option */
This needs to be fixed somehow. We talked with SuSE people about same
problem during SambaXP but haven't yet came to clear decision as both
headers are provided by different packages (kernel-headers and
glibc-kern-headers or alike) and supposed to serve different purposes.

-- 
/ Alexander Bokovoy
---
I'm definitely not in Omaha!


More information about the samba-technical mailing list