VxFS quotas

Dirk De Wachter Dirk.DeWachter at rug.ac.be
Thu Aug 26 09:38:30 GMT 1999


Dear David et al.

I checked some more things and will report on my findings below.

On 26 Aug 99, at 2:34, David Lee wrote about Re: VxFS quotas (Was: Where to subm:

> On Wed, 25 Aug 1999, Dirk De Wachter wrote:
> 
> > just to remind you all that HP-UX 10.20 seems to work perfectly with 
> > quotas on a VxFS file system and may not need any patches. Yet, 
> > depending on the OS installation a file 
> > /usr/include/sys/fs/vx_ioctl.h may exist (as does a file 
> > /usr/include/sys/fs/vx_bsdquota.h).
> > 
> > The patch submitted by David Lee, assumes that the VxFS should be 
> > handled different if this file exists, but I believe it may only do 
> > this based on both OS and the presence of this file. (I refer to the 
> > patched lines 673-678 of include/includes.h). Or perhaps, it should 
> > check the vx_quota.h file instead of vx_ioctl.h.
> 
> For "configure.in" and its dependent "include/includes.h", I picked
> "vx_ioctl.h" almost at random from the list of vx_*.h files that Veritas
> adds into a Solaris2 machine.  These files are:
>    
>    /usr/include/sys/fs/vx_aioctl.h     /usr/include/sys/fs/vx_machdep.h
>    /usr/include/sys/fs/vx_const.h      /usr/include/sys/fs/vx_mlink.h
>    /usr/include/sys/fs/vx_disklog.h    /usr/include/sys/fs/vx_param.h
>    /usr/include/sys/fs/vx_ext.h	/usr/include/sys/fs/vx_param.h
>    /usr/include/sys/fs/vx_ext.h        /usr/include/sys/fs/vx_quota.h
>    /usr/include/sys/fs/vx_inode.h      /usr/include/sys/fs/vx_solaris.h
>    /usr/include/sys/fs/vx_ioctl.h      /usr/include/sys/fs/vx_sysmacros.h
>    /usr/include/sys/fs/vx_layout.h     /usr/include/sys/fs/vxio.h
The following 4 of these are found on HPUX 10.20 along with 11 others
/usr/include/sys/fs/vx_ext.h	/usr/include/sys/fs/vx_param.h
/usr/include/sys/fs/vx_inode.h     /usr/include/sys/fs/vx_ioctl.h

> 
> Let's try to summarise:
> 
> 1. Solaris 2:  VXFS is an add-on product.  The C code Veritas and native
>    filesystems is different.
True. But it seems the API is also different on different OS.
> 
>    At compile-time, the existence of a file in the list above (currently
>   "vx_ioctl.h", but any would do) is used to include a Veritas-specific
>    subroutine, and some code to call it.
> 
>    At run-time, the mount table is examined:  a type of "ufs" invokes the
>    code for native filesystem, a type of "vxfs" invokes my new subroutine.
Good.
> 
> 2. HPUX 10:  Apparently requires no change at all, if I correctly
>    understand Dirk.
Others may correct me here, but I don't see any problem.
> 
> My patch was simply a first attempt.  The only Veritas system I have
> available is Solaris 2.
> 
> I tried to keep the Veritas/quota code in "quotas.c" separate, guessing
> that, for those OSs like Solaris above, it would probably be common.
> I had assumed, perhaps erroneously, that most OSs would require something,
> not nothing.
I haven't gone so deep, but it might be that to CHANGE quotas on HPUX 
10.20 we will need a special interface. READing on the other hand 
works perfectly with the native interface.
> 
> Perhaps the "include/includes.h" variable VXFS (or VXFS_QUOTA as below) 
> should be dependent on "vx_solaris.h" and similar variables for analogous
> OSs.  For HPUX 10, it would carefully *not* be defined.  Indeed, it would
> only ever be defined on systems for which a port had been done and tested.
Agree. In fact on HPUX you will find a file vx_hpux.h to check for if 
needed.
> 
> > I would suggest that not VXFS should be defined (as yet) in 
> > include/includes.h but VXFS_QUOTA to reflect that only quotas may be 
> > handled differently on VxFS and not other aspects of SAMBA. That is, 
> > VXFS may defined also, but should be used in a more general way, e.g. 
> > if also locking or syncing would be handled in a special way by 
> > SAMBA.
> 
> I agree that VXFS_QUOTA might be a better thing to define than VXFS.
> 
> > Several of the includes mentioned in the patch for smbd/quotas.c 
> > (lines 725 and up) are not present on HPUX systems and the patch may 
> > therefore break quotas on this OS.
> 
> Hmmm... So my first approximation was not as portable as I hoped.
> (But wait a minute... for HPUX, you require no change to previous
> quotas, therefore this is irrelevant.)
> 
> So the entire list of includes needs to be in system-specific ifdefs?
> 
> Summary:
> 1. Change the "#define" from "VXFS" to "VXFS_QUOTA"
> 2. Make the "include/includes.h" stuff dependent on ths OS-specific file
>    (e.g. "vx_solaris.h") for those systems that need it (e.g Solaris 2
>    and NOT HPUX 10.)
> 3. "#includes ..." (quotas.c line 725) need checking on other OSs
>    (how relevant is HPUX here?)
Certainly true. But also, the code that you wrote may work only on 
SunOS, as many of the defines and struct I cannot find in the HPUX 
include files. So I would suggest to integrate your code either in 
the SUNOS part of quotas.c (no influence to other OS) or - for the 
moment - only activate VXFS(_QUOTA) for SUNOS.
> 
> Does that seem reasonable?
> 
> Shall I produce a revised patch, in accordance with the above summary?
Please do.


Best regards,

Dirk
*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*
Dirk De Wachter, MScEE, MScBME, PhD      mailto:Dirk.DeWachter at rug.ac.be
scientific researcher, systems administrator     http://navier.rug.ac.be
Hydraulics Laboratory, Ibitech, University of Gent  voice:+32 9 264 3281
Sint-Pietersnieuwstraat 41, B-9000 Gent Belgium     faxto:+32 9 264 3595
~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~--~


More information about the samba-technical mailing list