1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00

performance patch from HP-UX folks (cant remember who)

(This used to be commit 9180e2d062)
This commit is contained in:
Gerald Carter 2003-01-28 02:14:33 +00:00
parent 9c50a316f5
commit 99bb7dccb2

View File

@ -886,10 +886,21 @@ BOOL disk_quotas(const char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB
#if !defined(__FreeBSD__) && !defined(AIX) && !defined(__OpenBSD__)
char dev_disk[256];
SMB_STRUCT_STAT S;
/* find the block device file */
if ((sys_stat(path, &S)<0) ||
(devnm(S_IFBLK, S.st_dev, dev_disk, 256, 0)<0)) return (False);
#endif
#ifdef HPUX
/* Need to set the cache flag to 1 for HPUX. Seems
* to have a significant performance boost when
* lstat calls on /dev access this function.
*/
if ((sys_stat(path, &S)<0) || (devnm(S_IFBLK, S.st_dev, dev_disk, 256, 1)<0))
#else
if ((sys_stat(path, &S)<0) || (devnm(S_IFBLK, S.st_dev, dev_disk, 256, 0)<0))
return (False);
#endif /* ifdef HPUX */
#endif /* !defined(__FreeBSD__) && !defined(AIX) && !defined(__OpenBSD__) */
euser_id = geteuid();