Changeset View
Changeset View
Standalone View
Standalone View
head/sys/fs/ext2fs/ext2_bmap.c
Show All 36 Lines | |||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/bio.h> | #include <sys/bio.h> | ||||
#include <sys/buf.h> | #include <sys/buf.h> | ||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/vnode.h> | #include <sys/vnode.h> | ||||
#include <sys/mount.h> | #include <sys/mount.h> | ||||
#include <sys/racct.h> | |||||
#include <sys/resourcevar.h> | #include <sys/resourcevar.h> | ||||
#include <sys/stat.h> | #include <sys/stat.h> | ||||
#include <fs/ext2fs/inode.h> | #include <fs/ext2fs/inode.h> | ||||
#include <fs/ext2fs/fs.h> | #include <fs/ext2fs/fs.h> | ||||
#include <fs/ext2fs/ext2fs.h> | #include <fs/ext2fs/ext2fs.h> | ||||
#include <fs/ext2fs/ext2_dinode.h> | #include <fs/ext2fs/ext2_dinode.h> | ||||
#include <fs/ext2fs/ext2_extern.h> | #include <fs/ext2fs/ext2_extern.h> | ||||
▲ Show 20 Lines • Show All 189 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
bp->b_blkno = blkptrtodb(ump, daddr); | bp->b_blkno = blkptrtodb(ump, daddr); | ||||
bp->b_iocmd = BIO_READ; | bp->b_iocmd = BIO_READ; | ||||
bp->b_flags &= ~B_INVAL; | bp->b_flags &= ~B_INVAL; | ||||
bp->b_ioflags &= ~BIO_ERROR; | bp->b_ioflags &= ~BIO_ERROR; | ||||
vfs_busy_pages(bp, 0); | vfs_busy_pages(bp, 0); | ||||
bp->b_iooffset = dbtob(bp->b_blkno); | bp->b_iooffset = dbtob(bp->b_blkno); | ||||
bstrategy(bp); | bstrategy(bp); | ||||
#ifdef RACCT | |||||
if (racct_enable) { | |||||
PROC_LOCK(curproc); | |||||
racct_add_buf(curproc, bp, 0); | |||||
PROC_UNLOCK(curproc); | |||||
} | |||||
#endif | |||||
curthread->td_ru.ru_inblock++; | curthread->td_ru.ru_inblock++; | ||||
error = bufwait(bp); | error = bufwait(bp); | ||||
if (error) { | if (error) { | ||||
brelse(bp); | brelse(bp); | ||||
return (error); | return (error); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines |