samba-3.0alpha23: linux quota compiling error
Andreas
andreas at conectiva.com.br
Wed Apr 23 14:30:01 GMT 2003
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 */
};
> > <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 */
> > Shouldn't samba use sys/quota.h instead of linux/quota.h?
> > My kernel is a heavily patched 2.4.20 one I'm afraid.
> Try the following (not yet well tested on non-Linux platforms) patch from Stephan
> Metzmacher which adds support for NT quotas and fixes this particular bug.
>
> It is a candidate for Samba 3.0 and a widespread testing is welcome.
>
> http://samba.org/~ab/samba-3.0-ntquotas-metze.patch.bz2
>
> Please report your results to me, as I'm responsible for its integration.
I'll try it now, thanks.
More information about the samba-technical
mailing list