svn commit: r296718 - head/sys/fs/autofs
Edward Tomasz Napierala
trasz at FreeBSD.org
Sat Mar 12 09:33:28 UTC 2016
Author: trasz
Date: Sat Mar 12 09:33:26 2016
New Revision: 296718
URL: https://svnweb.freebsd.org/changeset/base/296718
Log:
Use S_BLKSIZE instead of magic constant.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/fs/autofs/autofs_vfsops.c
head/sys/fs/autofs/autofs_vnops.c
Modified: head/sys/fs/autofs/autofs_vfsops.c
==============================================================================
--- head/sys/fs/autofs/autofs_vfsops.c Sat Mar 12 09:05:43 2016 (r296717)
+++ head/sys/fs/autofs/autofs_vfsops.c Sat Mar 12 09:33:26 2016 (r296718)
@@ -39,6 +39,7 @@
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/mount.h>
+#include <sys/stat.h>
#include <sys/sx.h>
#include <sys/taskqueue.h>
#include <sys/vnode.h>
@@ -192,7 +193,7 @@ static int
autofs_statfs(struct mount *mp, struct statfs *sbp)
{
- sbp->f_bsize = 512;
+ sbp->f_bsize = S_BLKSIZE;
sbp->f_iosize = 0;
sbp->f_blocks = 0;
sbp->f_bfree = 0;
Modified: head/sys/fs/autofs/autofs_vnops.c
==============================================================================
--- head/sys/fs/autofs/autofs_vnops.c Sat Mar 12 09:05:43 2016 (r296717)
+++ head/sys/fs/autofs/autofs_vnops.c Sat Mar 12 09:33:26 2016 (r296718)
@@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
#include <sys/mutex.h>
#include <sys/namei.h>
#include <sys/signalvar.h>
+#include <sys/stat.h>
#include <sys/systm.h>
#include <sys/taskqueue.h>
#include <sys/vnode.h>
@@ -110,8 +111,8 @@ autofs_getattr(struct vop_getattr_args *
vap->va_rdev = NODEV;
vap->va_fsid = mp->mnt_stat.f_fsid.val[0];
vap->va_fileid = anp->an_fileno;
- vap->va_size = 512; /* XXX */
- vap->va_blocksize = 512;
+ vap->va_size = S_BLKSIZE;
+ vap->va_blocksize = S_BLKSIZE;
vap->va_mtime = anp->an_ctime;
vap->va_atime = anp->an_ctime;
vap->va_ctime = anp->an_ctime;
@@ -119,7 +120,7 @@ autofs_getattr(struct vop_getattr_args *
vap->va_gen = 0;
vap->va_flags = 0;
vap->va_rdev = 0;
- vap->va_bytes = 512; /* XXX */
+ vap->va_bytes = S_BLKSIZE;
vap->va_filerev = 0;
vap->va_spare = 0;
More information about the svn-src-all
mailing list