Author: avg
Date: Sat Apr 17 11:38:18 2010
New Revision: 206754
URL: http://svn.freebsd.org/changeset/base/206754
Log:
MFC r206129: vn_stat: use va_blocksize when setting st_blksize
Modified:
stable/7/sys/kern/vfs_vnops.c
Directory Properties:
stable/7/sys/ (props changed)
stable/7/sys/cddl/contrib/opensolaris/ (props changed)
stable/7/sys/contrib/dev/acpica/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
Modified: stable/7/sys/kern/vfs_vnops.c
==============================================================================
--- stable/7/sys/kern/vfs_vnops.c Sat Apr 17 11:25:30 2010
(r206753)
+++ stable/7/sys/kern/vfs_vnops.c Sat Apr 17 11:38:18 2010
(r206754)
@@ -729,11 +729,10 @@ vn_stat(vp, sb, active_cred, file_cred,
* "a filesystem-specific preferred I/O block size for this
* object. In some filesystem types, this may vary from file
* to file"
- * Default to PAGE_SIZE after much discussion.
- * XXX: min(PAGE_SIZE, vp->v_bufobj.bo_bsize) may be more correct.
+ * Use miminum/default of PAGE_SIZE (e.g. for VCHR).
*/
- sb->st_blksize = PAGE_SIZE;
+ sb->st_blksize = max(PAGE_SIZE, vap->va_blocksize);
sb->st_flags = vap->va_flags;
if (priv_check(td, PRIV_VFS_GENERATION))
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"