summaryrefslogtreecommitdiffstats
path: root/sys/gnu
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/gnu
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/gnu')
-rw-r--r--sys/gnu/ext2fs/ext2_balloc.c10
-rw-r--r--sys/gnu/ext2fs/ext2_bmap.c2
-rw-r--r--sys/gnu/ext2fs/ext2_inode.c2
-rw-r--r--sys/gnu/ext2fs/ext2_vfsops.c2
-rw-r--r--sys/gnu/fs/ext2fs/ext2_balloc.c10
-rw-r--r--sys/gnu/fs/ext2fs/ext2_bmap.c2
-rw-r--r--sys/gnu/fs/ext2fs/ext2_inode.c2
-rw-r--r--sys/gnu/fs/ext2fs/ext2_vfsops.c2
8 files changed, 16 insertions, 16 deletions
diff --git a/sys/gnu/ext2fs/ext2_balloc.c b/sys/gnu/ext2fs/ext2_balloc.c
index 62a94c1..53946e5 100644
--- a/sys/gnu/ext2fs/ext2_balloc.c
+++ b/sys/gnu/ext2fs/ext2_balloc.c
@@ -147,7 +147,7 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n",
nsize, cred, &newb);
if (error)
return (error);
- bp = getblk(vp, bn, nsize, 0, 0);
+ bp = getblk(vp, bn, nsize, 0, 0, 0);
bp->b_blkno = fsbtodb(fs, newb);
if (flags & B_CLRBUF)
vfs_bio_clrbuf(bp);
@@ -194,7 +194,7 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n",
cred, &newb)) != 0)
return (error);
nb = newb;
- bp = getblk(vp, indirs[1].in_lbn, fs->s_blocksize, 0, 0);
+ bp = getblk(vp, indirs[1].in_lbn, fs->s_blocksize, 0, 0, 0);
bp->b_blkno = fsbtodb(fs, newb);
vfs_bio_clrbuf(bp);
/*
@@ -246,7 +246,7 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n",
return (error);
}
nb = newb;
- nbp = getblk(vp, indirs[i].in_lbn, fs->s_blocksize, 0, 0);
+ nbp = getblk(vp, indirs[i].in_lbn, fs->s_blocksize, 0, 0, 0);
nbp->b_blkno = fsbtodb(fs, nb);
vfs_bio_clrbuf(nbp);
/*
@@ -281,7 +281,7 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n",
return (error);
}
nb = newb;
- nbp = getblk(vp, lbn, fs->s_blocksize, 0, 0);
+ nbp = getblk(vp, lbn, fs->s_blocksize, 0, 0, 0);
nbp->b_blkno = fsbtodb(fs, nb);
if (flags & B_CLRBUF)
vfs_bio_clrbuf(nbp);
@@ -306,7 +306,7 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n",
return (error);
}
} else {
- nbp = getblk(vp, lbn, fs->s_blocksize, 0, 0);
+ nbp = getblk(vp, lbn, fs->s_blocksize, 0, 0, 0);
nbp->b_blkno = fsbtodb(fs, nb);
}
*bpp = nbp;
diff --git a/sys/gnu/ext2fs/ext2_bmap.c b/sys/gnu/ext2fs/ext2_bmap.c
index 69a069f..1260d97f 100644
--- a/sys/gnu/ext2fs/ext2_bmap.c
+++ b/sys/gnu/ext2fs/ext2_bmap.c
@@ -185,7 +185,7 @@ ext2_bmaparray(vp, bn, bnp, runp, runb)
bqrelse(bp);
ap->in_exists = 1;
- bp = getblk(vp, metalbn, mp->mnt_stat.f_iosize, 0, 0);
+ bp = getblk(vp, metalbn, mp->mnt_stat.f_iosize, 0, 0, 0);
if ((bp->b_flags & B_CACHE) == 0) {
#ifdef DIAGNOSTIC
if (!daddr)
diff --git a/sys/gnu/ext2fs/ext2_inode.c b/sys/gnu/ext2fs/ext2_inode.c
index fc14dba..806c8a3 100644
--- a/sys/gnu/ext2fs/ext2_inode.c
+++ b/sys/gnu/ext2fs/ext2_inode.c
@@ -396,7 +396,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
* explicitly instead of letting bread do everything for us.
*/
vp = ITOV(ip);
- bp = getblk(vp, lbn, (int)fs->s_blocksize, 0, 0);
+ bp = getblk(vp, lbn, (int)fs->s_blocksize, 0, 0, 0);
if (bp->b_flags & (B_DONE | B_DELWRI)) {
} else {
bp->b_iocmd = BIO_READ;
diff --git a/sys/gnu/ext2fs/ext2_vfsops.c b/sys/gnu/ext2fs/ext2_vfsops.c
index d91a92e..964be9f 100644
--- a/sys/gnu/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/ext2fs/ext2_vfsops.c
@@ -1179,7 +1179,7 @@ ext2_sbupdate(mp, waitfor)
/*
printf("\nupdating superblock, waitfor=%s\n", waitfor == MNT_WAIT ? "yes":"no");
*/
- bp = getblk(mp->um_devvp, SBLOCK, SBSIZE, 0, 0);
+ bp = getblk(mp->um_devvp, SBLOCK, SBSIZE, 0, 0, 0);
bcopy((caddr_t)es, bp->b_data, (u_int)sizeof(struct ext2_super_block));
if (waitfor == MNT_WAIT)
error = bwrite(bp);
diff --git a/sys/gnu/fs/ext2fs/ext2_balloc.c b/sys/gnu/fs/ext2fs/ext2_balloc.c
index 62a94c1..53946e5 100644
--- a/sys/gnu/fs/ext2fs/ext2_balloc.c
+++ b/sys/gnu/fs/ext2fs/ext2_balloc.c
@@ -147,7 +147,7 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n",
nsize, cred, &newb);
if (error)
return (error);
- bp = getblk(vp, bn, nsize, 0, 0);
+ bp = getblk(vp, bn, nsize, 0, 0, 0);
bp->b_blkno = fsbtodb(fs, newb);
if (flags & B_CLRBUF)
vfs_bio_clrbuf(bp);
@@ -194,7 +194,7 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n",
cred, &newb)) != 0)
return (error);
nb = newb;
- bp = getblk(vp, indirs[1].in_lbn, fs->s_blocksize, 0, 0);
+ bp = getblk(vp, indirs[1].in_lbn, fs->s_blocksize, 0, 0, 0);
bp->b_blkno = fsbtodb(fs, newb);
vfs_bio_clrbuf(bp);
/*
@@ -246,7 +246,7 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n",
return (error);
}
nb = newb;
- nbp = getblk(vp, indirs[i].in_lbn, fs->s_blocksize, 0, 0);
+ nbp = getblk(vp, indirs[i].in_lbn, fs->s_blocksize, 0, 0, 0);
nbp->b_blkno = fsbtodb(fs, nb);
vfs_bio_clrbuf(nbp);
/*
@@ -281,7 +281,7 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n",
return (error);
}
nb = newb;
- nbp = getblk(vp, lbn, fs->s_blocksize, 0, 0);
+ nbp = getblk(vp, lbn, fs->s_blocksize, 0, 0, 0);
nbp->b_blkno = fsbtodb(fs, nb);
if (flags & B_CLRBUF)
vfs_bio_clrbuf(nbp);
@@ -306,7 +306,7 @@ ext2_debug("ext2_balloc called (%d, %d, %d)\n",
return (error);
}
} else {
- nbp = getblk(vp, lbn, fs->s_blocksize, 0, 0);
+ nbp = getblk(vp, lbn, fs->s_blocksize, 0, 0, 0);
nbp->b_blkno = fsbtodb(fs, nb);
}
*bpp = nbp;
diff --git a/sys/gnu/fs/ext2fs/ext2_bmap.c b/sys/gnu/fs/ext2fs/ext2_bmap.c
index 69a069f..1260d97f 100644
--- a/sys/gnu/fs/ext2fs/ext2_bmap.c
+++ b/sys/gnu/fs/ext2fs/ext2_bmap.c
@@ -185,7 +185,7 @@ ext2_bmaparray(vp, bn, bnp, runp, runb)
bqrelse(bp);
ap->in_exists = 1;
- bp = getblk(vp, metalbn, mp->mnt_stat.f_iosize, 0, 0);
+ bp = getblk(vp, metalbn, mp->mnt_stat.f_iosize, 0, 0, 0);
if ((bp->b_flags & B_CACHE) == 0) {
#ifdef DIAGNOSTIC
if (!daddr)
diff --git a/sys/gnu/fs/ext2fs/ext2_inode.c b/sys/gnu/fs/ext2fs/ext2_inode.c
index fc14dba..806c8a3 100644
--- a/sys/gnu/fs/ext2fs/ext2_inode.c
+++ b/sys/gnu/fs/ext2fs/ext2_inode.c
@@ -396,7 +396,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp)
* explicitly instead of letting bread do everything for us.
*/
vp = ITOV(ip);
- bp = getblk(vp, lbn, (int)fs->s_blocksize, 0, 0);
+ bp = getblk(vp, lbn, (int)fs->s_blocksize, 0, 0, 0);
if (bp->b_flags & (B_DONE | B_DELWRI)) {
} else {
bp->b_iocmd = BIO_READ;
diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c
index d91a92e..964be9f 100644
--- a/sys/gnu/fs/ext2fs/ext2_vfsops.c
+++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c
@@ -1179,7 +1179,7 @@ ext2_sbupdate(mp, waitfor)
/*
printf("\nupdating superblock, waitfor=%s\n", waitfor == MNT_WAIT ? "yes":"no");
*/
- bp = getblk(mp->um_devvp, SBLOCK, SBSIZE, 0, 0);
+ bp = getblk(mp->um_devvp, SBLOCK, SBSIZE, 0, 0, 0);
bcopy((caddr_t)es, bp->b_data, (u_int)sizeof(struct ext2_super_block));
if (waitfor == MNT_WAIT)
error = bwrite(bp);
OpenPOWER on IntegriCloud