diff options
author | dyson <dyson@FreeBSD.org> | 1995-12-11 04:58:34 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1995-12-11 04:58:34 +0000 |
commit | 601ed1a4c089930a40f8f1dedb927f3b5b9f2d90 (patch) | |
tree | 2b7bb6b5f65218fdc977df2e1db5ccaf89d154c6 /sys/fs | |
parent | 0e4700269e1c805f7d7e0caae28fbaebf096ac31 (diff) | |
download | FreeBSD-src-601ed1a4c089930a40f8f1dedb927f3b5b9f2d90.zip FreeBSD-src-601ed1a4c089930a40f8f1dedb927f3b5b9f2d90.tar.gz |
Changes to support 1Tb filesizes. Pages are now named by an
(object,index) pair instead of (object,offset) pair.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/procfs/procfs_mem.c | 6 | ||||
-rw-r--r-- | sys/fs/specfs/spec_vnops.c | 37 |
2 files changed, 37 insertions, 6 deletions
diff --git a/sys/fs/procfs/procfs_mem.c b/sys/fs/procfs/procfs_mem.c index d24cbbf..d07acf0 100644 --- a/sys/fs/procfs/procfs_mem.c +++ b/sys/fs/procfs/procfs_mem.c @@ -37,7 +37,7 @@ * * @(#)procfs_mem.c 8.4 (Berkeley) 1/21/94 * - * $Id: procfs_mem.c,v 1.11 1995/12/03 14:54:35 bde Exp $ + * $Id: procfs_mem.c,v 1.12 1995/12/07 12:47:15 davidg Exp $ */ /* @@ -170,8 +170,8 @@ procfs_rwmem(p, uio) /* Find space in kernel_map for the page we're interested in */ if (!error) - error = vm_map_find(kernel_map, object, off, &kva, - PAGE_SIZE, 1); + error = vm_map_find(kernel_map, object, + IDX_TO_OFF(off), &kva, PAGE_SIZE, 1); if (!error) { /* diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 3a04353..e3dbfaf 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)spec_vnops.c 8.6 (Berkeley) 4/9/94 - * $Id: spec_vnops.c,v 1.21 1995/12/07 12:47:17 davidg Exp $ + * $Id: spec_vnops.c,v 1.22 1995/12/08 11:17:52 julian Exp $ */ #include <sys/param.h> @@ -365,7 +365,8 @@ spec_write(ap) } error = uiomove((char *)bp->b_data + on, n, uio); if (n + on == bsize) { - bawrite(bp); + /* bawrite(bp); */ + cluster_write(bp, 0); } else bdwrite(bp); } while (error == 0 && uio->uio_resid > 0 && n != 0); @@ -750,7 +751,7 @@ spec_getpages(ap) /* * Calculate the size of the transfer. */ - blkno = (ap->a_m[0]->offset + ap->a_offset) / DEV_BSIZE; + blkno = (IDX_TO_OFF(ap->a_m[0]->pindex) + ap->a_offset) / DEV_BSIZE; /* * Round up physical size for real devices. @@ -839,3 +840,33 @@ spec_getpages(ap) printf("spec_getpages: I/O read error\n"); return (error ? VM_PAGER_ERROR : VM_PAGER_OK); } + +/* ARGSUSED */ +int +spec_getattr(ap) + struct vop_getattr_args /* { + struct vnode *a_vp; + struct vattr *a_vap; + struct ucred *a_cred; + struct proc *a_p; + } */ *ap; +{ + register struct vnode *vp = ap->a_vp; + register struct vattr *vap = ap->a_vap; + struct partinfo dpart; + + bzero(vap, sizeof (*vap)); + + if (vp->v_type == VBLK) + vap->va_blocksize = BLKDEV_IOSIZE; + else if (vp->v_type == VCHR) + vap->va_blocksize = MAXBSIZE; + + if ((*bdevsw[major(vp->v_rdev)].d_ioctl)(vp->v_rdev, DIOCGPART, + (caddr_t)&dpart, FREAD, ap->a_p) == 0) { + vap->va_bytes = (u_quad_t) dpart.disklab->d_partitions[minor(vp->v_rdev)].p_size * DEV_BSIZE; + vap->va_size = vap->va_bytes; + } + return (0); +} + |