set 'frag' size to the same value as the file system block size, so

that userland would pick up correct size of unit (it uses lower of
these values as the size of one 'block' for f_blocks et.al.)
fixes PR bin/25319 by Juan RP
This commit is contained in:
jdolecek 2004-06-05 06:28:11 +00:00
parent 62f70e2fb5
commit 88edd838ec
1 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: smbfs_smb.c,v 1.22 2004/05/23 11:18:28 jdolecek Exp $ */
/* $NetBSD: smbfs_smb.c,v 1.23 2004/06/05 06:28:11 jdolecek Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: smbfs_smb.c,v 1.22 2004/05/23 11:18:28 jdolecek Exp $");
__KERNEL_RCSID(0, "$NetBSD: smbfs_smb.c,v 1.23 2004/06/05 06:28:11 jdolecek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -215,8 +215,8 @@ smbfs_smb_statvfs2(struct smb_share *ssp, struct statvfs *sbp,
smb_t2_done(t2p);
sbp->f_bsize = bpu * bsize; /* fundamental file system block size */
sbp->f_frsize = bsize; /* fundamental file system frag size */
sbp->f_iosize = bsize; /* I/O size */
sbp->f_frsize = bpu * bsize; /* fundamental file system frag size */
sbp->f_iosize = bpu * bsize; /* I/O size */
sbp->f_blocks= units; /* total data blocks in file system */
sbp->f_bfree = funits; /* free blocks in fs */
sbp->f_bresvd = 0; /* reserved blocks in fs */
@ -257,8 +257,8 @@ smbfs_smb_statvfs(struct smb_share *ssp, struct statvfs *sbp,
smb_rq_done(rqp);
sbp->f_bsize = bpu * bsize; /* fundamental file system block size */
sbp->f_frsize = bsize; /* fundamental file system frag size */
sbp->f_iosize = bsize; /* I/O size */
sbp->f_frsize = bpu * bsize; /* fundamental file system frag size */
sbp->f_iosize = bpu * bsize; /* I/O size */
sbp->f_blocks= units; /* total data blocks in file system */
sbp->f_bfree = funits; /* free blocks in fs */
sbp->f_bavail= funits; /* free blocks avail to non-superuser */