Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm Use filesystem blocks to address filesystem objects....



details:   https://anonhg.NetBSD.org/src/rev/8864cb64de5a
branches:  trunk
changeset: 751532:8864cb64de5a
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sun Feb 07 15:51:28 2010 +0000

description:
Use filesystem blocks to address filesystem objects. f_iosize just
happens to be the same for current filesystems.

diffstat:

 sys/uvm/uvm_swap.c |  10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diffs (31 lines):

diff -r 662c9d6d81e0 -r 8864cb64de5a sys/uvm/uvm_swap.c
--- a/sys/uvm/uvm_swap.c        Sun Feb 07 12:52:04 2010 +0000
+++ b/sys/uvm/uvm_swap.c        Sun Feb 07 15:51:28 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_swap.c,v 1.148 2010/02/02 15:00:34 wiz Exp $       */
+/*     $NetBSD: uvm_swap.c,v 1.149 2010/02/07 15:51:28 mlelstv Exp $   */
 
 /*
  * Copyright (c) 1995, 1996, 1997, 2009 Matthew R. Green
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.148 2010/02/02 15:00:34 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.149 2010/02/07 15:51:28 mlelstv Exp $");
 
 #include "fs_nfs.h"
 #include "opt_uvmhist.h"
@@ -872,11 +872,7 @@
                if ((error = VOP_GETATTR(vp, &va, l->l_cred)))
                        goto bad;
                nblocks = (int)btodb(va.va_size);
-               if ((error =
-                    VFS_STATVFS(vp->v_mount, &vp->v_mount->mnt_stat)) != 0)
-                       goto bad;
-
-               sdp->swd_bsize = vp->v_mount->mnt_stat.f_iosize;
+               sdp->swd_bsize = 1 << vp->v_mount->mnt_fs_bshift;
                /*
                 * limit the max # of outstanding I/O requests we issue
                 * at any one time.   take it easy on NFS servers.



Home | Main Index | Thread Index | Old Index