ffs_inode.c (295950) | ffs_inode.c (297633) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)ffs_inode.c 8.13 (Berkeley) 4/21/95 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)ffs_inode.c 8.13 (Berkeley) 4/21/95 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/ufs/ffs/ffs_inode.c 295950 2016-02-24 01:58:40Z mckusick $"); | 33__FBSDID("$FreeBSD: head/sys/ufs/ffs/ffs_inode.c 297633 2016-04-07 04:23:25Z trasz $"); |
34 35#include "opt_quota.h" 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/bio.h> 40#include <sys/buf.h> 41#include <sys/malloc.h> 42#include <sys/mount.h> 43#include <sys/proc.h> | 34 35#include "opt_quota.h" 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/bio.h> 40#include <sys/buf.h> 41#include <sys/malloc.h> 42#include <sys/mount.h> 43#include <sys/proc.h> |
44#include <sys/racct.h> |
|
44#include <sys/random.h> 45#include <sys/resourcevar.h> 46#include <sys/rwlock.h> 47#include <sys/stat.h> 48#include <sys/vmmeter.h> 49#include <sys/vnode.h> 50 51#include <vm/vm.h> --- 602 unchanged lines hidden (view full) --- 654 * double(triple) indirect before single(double) indirect, calls 655 * to bmap on these blocks will fail. However, we already have 656 * the on disk address, so we have to set the b_blkno field 657 * explicitly instead of letting bread do everything for us. 658 */ 659 vp = ITOV(ip); 660 bp = getblk(vp, lbn, (int)fs->fs_bsize, 0, 0, 0); 661 if ((bp->b_flags & B_CACHE) == 0) { | 45#include <sys/random.h> 46#include <sys/resourcevar.h> 47#include <sys/rwlock.h> 48#include <sys/stat.h> 49#include <sys/vmmeter.h> 50#include <sys/vnode.h> 51 52#include <vm/vm.h> --- 602 unchanged lines hidden (view full) --- 655 * double(triple) indirect before single(double) indirect, calls 656 * to bmap on these blocks will fail. However, we already have 657 * the on disk address, so we have to set the b_blkno field 658 * explicitly instead of letting bread do everything for us. 659 */ 660 vp = ITOV(ip); 661 bp = getblk(vp, lbn, (int)fs->fs_bsize, 0, 0, 0); 662 if ((bp->b_flags & B_CACHE) == 0) { |
663#ifdef RACCT 664 if (racct_enable) { 665 PROC_LOCK(curproc); 666 racct_add_buf(curproc, bp, 0); 667 PROC_UNLOCK(curproc); 668 } 669#endif /* RACCT */ |
|
662 curthread->td_ru.ru_inblock++; /* pay for read */ 663 bp->b_iocmd = BIO_READ; 664 bp->b_flags &= ~B_INVAL; 665 bp->b_ioflags &= ~BIO_ERROR; 666 if (bp->b_bcount > bp->b_bufsize) 667 panic("ffs_indirtrunc: bad buffer size"); 668 bp->b_blkno = dbn; 669 vfs_busy_pages(bp, 0); --- 86 unchanged lines hidden --- | 670 curthread->td_ru.ru_inblock++; /* pay for read */ 671 bp->b_iocmd = BIO_READ; 672 bp->b_flags &= ~B_INVAL; 673 bp->b_ioflags &= ~BIO_ERROR; 674 if (bp->b_bcount > bp->b_bufsize) 675 panic("ffs_indirtrunc: bad buffer size"); 676 bp->b_blkno = dbn; 677 vfs_busy_pages(bp, 0); --- 86 unchanged lines hidden --- |