summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_cluster.c
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-03-04 00:04:44 +0000
committerjeff <jeff@FreeBSD.org>2003-03-04 00:04:44 +0000
commit4de0ae322cb45ae3620fef3a8fcf76d44208ee44 (patch)
tree60aed2b4c31a2d4a3c1cc94b83966280f8fc3eae /sys/kern/vfs_cluster.c
parent7880d78b5504f8df1d22b8539ee31167ccd22750 (diff)
downloadFreeBSD-src-4de0ae322cb45ae3620fef3a8fcf76d44208ee44.zip
FreeBSD-src-4de0ae322cb45ae3620fef3a8fcf76d44208ee44.tar.gz
- Add a new 'flags' parameter to getblk().
- Define one flag GB_LOCK_NOWAIT that tells getblk() to pass the LK_NOWAIT flag to the initial BUF_LOCK(). This will eventually be used in cases were we want to use a buffer only if it is not currently in use. - Convert all consumers of the getblk() api to use this extra parameter. Reviwed by: arch Not objected to by: mckusick
Diffstat (limited to 'sys/kern/vfs_cluster.c')
-rw-r--r--sys/kern/vfs_cluster.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c
index 96e541c..bf944c5 100644
--- a/sys/kern/vfs_cluster.c
+++ b/sys/kern/vfs_cluster.c
@@ -125,7 +125,7 @@ cluster_read(vp, filesize, lblkno, size, cred, totread, seqcount, bpp)
/*
* get the requested block
*/
- *bpp = reqbp = bp = getblk(vp, lblkno, size, 0, 0);
+ *bpp = reqbp = bp = getblk(vp, lblkno, size, 0, 0, 0);
origblkno = lblkno;
origtotread = totread;
@@ -243,7 +243,7 @@ single_block_read:
rbp = cluster_rbuild(vp, filesize, lblkno,
blkno, size, ntoread, NULL);
} else {
- rbp = getblk(vp, lblkno, size, 0, 0);
+ rbp = getblk(vp, lblkno, size, 0, 0, 0);
rbp->b_flags |= B_ASYNC | B_RAM;
rbp->b_iocmd = BIO_READ;
rbp->b_blkno = blkno;
@@ -349,7 +349,7 @@ cluster_rbuild(vp, filesize, lbn, blkno, size, run, fbp)
tbp = fbp;
tbp->b_iocmd = BIO_READ;
} else {
- tbp = getblk(vp, lbn, size, 0, 0);
+ tbp = getblk(vp, lbn, size, 0, 0, 0);
if (tbp->b_flags & B_CACHE)
return tbp;
tbp->b_flags |= B_ASYNC | B_RAM;
@@ -420,7 +420,7 @@ cluster_rbuild(vp, filesize, lbn, blkno, size, run, fbp)
break;
}
- tbp = getblk(vp, lbn + i, size, 0, 0);
+ tbp = getblk(vp, lbn + i, size, 0, 0, 0);
/*
* Stop scanning if the buffer is fully valid
OpenPOWER on IntegriCloud