Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src - Fix fallout for recent bread() change (removing cred arg).
details: https://anonhg.NetBSD.org/src/rev/7dee3587114e
branches: trunk
changeset: 336994:7dee3587114e
user: chopps <chopps%NetBSD.org@localhost>
date: Sun Mar 29 19:35:58 2015 +0000
description:
- Fix fallout for recent bread() change (removing cred arg).
diffstat:
libexec/lfs_cleanerd/coalesce.c | 6 +++---
libexec/lfs_cleanerd/lfs_cleanerd.c | 10 +++++-----
sbin/fsck_lfs/bufcache.c | 5 ++---
sbin/fsck_lfs/bufcache.h | 4 ++--
sbin/fsck_lfs/dir.c | 18 +++++++++---------
sbin/fsck_lfs/inode.c | 4 ++--
sbin/fsck_lfs/lfs.c | 21 ++++++++++-----------
sbin/fsck_lfs/pass6.c | 14 +++++++-------
sbin/fsck_lfs/segwrite.c | 4 ++--
sbin/fsck_lfs/setup.c | 6 +++---
sbin/newfs_lfs/make_lfs.c | 8 ++++----
11 files changed, 49 insertions(+), 51 deletions(-)
diffs (truncated from 437 to 300 lines):
diff -r da014510241a -r 7dee3587114e libexec/lfs_cleanerd/coalesce.c
--- a/libexec/lfs_cleanerd/coalesce.c Sun Mar 29 19:33:55 2015 +0000
+++ b/libexec/lfs_cleanerd/coalesce.c Sun Mar 29 19:35:58 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: coalesce.c,v 1.23 2013/06/18 18:18:57 christos Exp $ */
+/* $NetBSD: coalesce.c,v 1.24 2015/03/29 19:35:58 chopps Exp $ */
/*-
* Copyright (c) 2002, 2005 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@
if (daddr == 0x0)
return NULL;
- bread(fs->clfs_devvp, daddr, fs->lfs_ibsize, NOCRED, 0, &bp);
+ bread(fs->clfs_devvp, daddr, fs->lfs_ibsize, 0, &bp);
for (dip = (struct ulfs1_dinode *)bp->b_data;
dip < (struct ulfs1_dinode *)(bp->b_data + fs->lfs_ibsize); dip++)
if (dip->di_inumber == ino) {
@@ -297,7 +297,7 @@
bps = lfs_segtod(fs, 1);
for (tbip = bip; tbip < bip + nb; tbip += bps) {
do {
- bread(fs->lfs_ivnode, 0, fs->lfs_bsize, NOCRED, 0, &bp);
+ bread(fs->lfs_ivnode, 0, fs->lfs_bsize, 0, &bp);
cip = *(CLEANERINFO *)bp->b_data;
brelse(bp, B_INVAL);
diff -r da014510241a -r 7dee3587114e libexec/lfs_cleanerd/lfs_cleanerd.c
--- a/libexec/lfs_cleanerd/lfs_cleanerd.c Sun Mar 29 19:33:55 2015 +0000
+++ b/libexec/lfs_cleanerd/lfs_cleanerd.c Sun Mar 29 19:35:58 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_cleanerd.c,v 1.37 2013/10/19 17:19:30 christos Exp $ */
+/* $NetBSD: lfs_cleanerd.c,v 1.38 2015/03/29 19:35:58 chopps Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -331,7 +331,7 @@
int error;
error = bread(fs->lfs_ivnode, ino / fs->lfs_ifpb + fs->lfs_cleansz +
- fs->lfs_segtabsz, fs->lfs_bsize, NOCRED, 0, bpp);
+ fs->lfs_segtabsz, fs->lfs_bsize, 0, bpp);
if (error)
syslog(LOG_ERR, "%s: ientry failed for ino %d",
fs->lfs_fsmnt, (int)ino);
@@ -514,7 +514,7 @@
syslog(LOG_WARNING, "fixing short FINFO at %x (seg %d)",
odaddr, lfs_dtosn(fs, odaddr));
bread(fs->clfs_devvp, odaddr, fs->lfs_fsize,
- NOCRED, 0, &nbp);
+ 0, &nbp);
nssp = (SEGSUM *)nbp->b_data;
--nssp->ss_nfinfo;
nssp->ss_sumsum = cksum(&nssp->ss_datasum,
@@ -1014,7 +1014,7 @@
npos = 0;
for (i = 0; i < fs->lfs_nseg; i+= fs->lfs_sepb) {
bread(fs->lfs_ivnode, fs->lfs_cleansz + i / fs->lfs_sepb,
- fs->lfs_bsize, NOCRED, 0, &bp);
+ fs->lfs_bsize, 0, &bp);
for (j = 0; j < fs->lfs_sepb && i + j < fs->lfs_nseg; j++) {
sup = ((SEGUSE *)bp->b_data) + j;
fs->clfs_segtab[i + j].nbytes = sup->su_nbytes;
@@ -1214,7 +1214,7 @@
* the cached information, so invalidate the buffer before
* handing it back.
*/
- if (bread(fs->lfs_ivnode, 0, fs->lfs_bsize, NOCRED, 0, &bp)) {
+ if (bread(fs->lfs_ivnode, 0, fs->lfs_bsize, 0, &bp)) {
syslog(LOG_ERR, "%s: can't read inode", fs->lfs_fsmnt);
return -1;
}
diff -r da014510241a -r 7dee3587114e sbin/fsck_lfs/bufcache.c
--- a/sbin/fsck_lfs/bufcache.c Sun Mar 29 19:33:55 2015 +0000
+++ b/sbin/fsck_lfs/bufcache.c Sun Mar 29 19:35:58 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bufcache.c,v 1.14 2013/10/19 01:09:58 christos Exp $ */
+/* $NetBSD: bufcache.c,v 1.15 2015/03/29 19:35:58 chopps Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -339,8 +339,7 @@
/* Read the given block from disk, return it B_BUSY. */
int
-bread(struct uvnode * vp, daddr_t lbn, int size, void * unused,
- int flags, struct ubuf ** bpp)
+bread(struct uvnode * vp, daddr_t lbn, int size, int flags, struct ubuf ** bpp)
{
struct ubuf *bp;
daddr_t daddr;
diff -r da014510241a -r 7dee3587114e sbin/fsck_lfs/bufcache.h
--- a/sbin/fsck_lfs/bufcache.h Sun Mar 29 19:33:55 2015 +0000
+++ b/sbin/fsck_lfs/bufcache.h Sun Mar 29 19:35:58 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bufcache.h,v 1.11 2008/05/16 09:21:59 hannken Exp $ */
+/* $NetBSD: bufcache.h,v 1.12 2015/03/29 19:35:58 chopps Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -120,6 +120,6 @@
struct ubuf *getblk(struct uvnode *, daddr_t, int);
void bwrite(struct ubuf *);
void brelse(struct ubuf *, int);
-int bread(struct uvnode *, daddr_t, int, void *, int, struct ubuf **);
+int bread(struct uvnode *, daddr_t, int, int, struct ubuf **);
void reassignbuf(struct ubuf *, struct uvnode *);
void dump_free_lists(void);
diff -r da014510241a -r 7dee3587114e sbin/fsck_lfs/dir.c
--- a/sbin/fsck_lfs/dir.c Sun Mar 29 19:33:55 2015 +0000
+++ b/sbin/fsck_lfs/dir.c Sun Mar 29 19:35:58 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.32 2013/06/18 18:18:58 christos Exp $ */
+/* $NetBSD: dir.c,v 1.33 2015/03/29 19:35:58 chopps Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -155,7 +155,7 @@
memcpy(dbuf, dp, (size_t) dsize);
idesc->id_dirp = (struct lfs_direct *) dbuf;
if ((n = (*idesc->id_func) (idesc)) & ALTERED) {
- bread(vp, idesc->id_lblkno, blksiz, NOCRED, 0, &bp);
+ bread(vp, idesc->id_lblkno, blksiz, 0, &bp);
memcpy(bp->b_data + idesc->id_loc - dsize, dbuf,
(size_t) dsize);
VOP_BWRITE(bp);
@@ -178,7 +178,7 @@
long size, blksiz, fix, dploc;
blksiz = idesc->id_numfrags * fs->lfs_fsize;
- bread(vp, idesc->id_lblkno, blksiz, NOCRED, 0, &bp);
+ bread(vp, idesc->id_lblkno, blksiz, 0, &bp);
if (idesc->id_loc % LFS_DIRBLKSIZ == 0 && idesc->id_filesize > 0 &&
idesc->id_loc < blksiz) {
dp = (struct lfs_direct *) (bp->b_data + idesc->id_loc);
@@ -188,7 +188,7 @@
if (idesc->id_fix == IGNORE)
return (0);
fix = dofix(idesc, "DIRECTORY CORRUPTED");
- bread(vp, idesc->id_lblkno, blksiz, NOCRED, 0, &bp);
+ bread(vp, idesc->id_lblkno, blksiz, 0, &bp);
dp = (struct lfs_direct *) (bp->b_data + idesc->id_loc);
dp->d_reclen = LFS_DIRBLKSIZ;
dp->d_ino = 0;
@@ -226,7 +226,7 @@
if (idesc->id_fix == IGNORE)
return 0;
fix = dofix(idesc, "DIRECTORY CORRUPTED");
- bread(vp, idesc->id_lblkno, blksiz, NOCRED, 0, &bp);
+ bread(vp, idesc->id_lblkno, blksiz, 0, &bp);
dp = (struct lfs_direct *) (bp->b_data + dploc);
dp->d_reclen += size;
if (fix)
@@ -573,11 +573,11 @@
dp->di_size += fs->lfs_bsize;
dp->di_blocks += lfs_btofsb(fs, fs->lfs_bsize);
bread(vp, dp->di_db[lastbn + 1],
- (long) lfs_dblksize(fs, dp, lastbn + 1), NOCRED, 0, &bp);
+ (long) lfs_dblksize(fs, dp, lastbn + 1), 0, &bp);
if (bp->b_flags & B_ERROR)
goto bad;
memcpy(firstblk, bp->b_data, LFS_DIRBLKSIZ);
- bread(vp, lastbn, fs->lfs_bsize, NOCRED, 0, &bp);
+ bread(vp, lastbn, fs->lfs_bsize, 0, &bp);
if (bp->b_flags & B_ERROR)
goto bad;
memcpy(bp->b_data, firstblk, LFS_DIRBLKSIZ);
@@ -587,7 +587,7 @@
memcpy(cp, &emptydir, sizeof emptydir);
VOP_BWRITE(bp);
bread(vp, dp->di_db[lastbn + 1],
- (long) lfs_dblksize(fs, dp, lastbn + 1), NOCRED, 0, &bp);
+ (long) lfs_dblksize(fs, dp, lastbn + 1), 0, &bp);
if (bp->b_flags & B_ERROR)
goto bad;
memcpy(bp->b_data, &emptydir, sizeof emptydir);
@@ -626,7 +626,7 @@
dirp->dotdot_ino = parent;
vp = vget(fs, ino);
dp = VTOD(vp);
- bread(vp, dp->di_db[0], fs->lfs_fsize, NOCRED, 0, &bp);
+ bread(vp, dp->di_db[0], fs->lfs_fsize, 0, &bp);
if (bp->b_flags & B_ERROR) {
brelse(bp, 0);
freeino(ino);
diff -r da014510241a -r 7dee3587114e sbin/fsck_lfs/inode.c
--- a/sbin/fsck_lfs/inode.c Sun Mar 29 19:33:55 2015 +0000
+++ b/sbin/fsck_lfs/inode.c Sun Mar 29 19:35:58 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inode.c,v 1.52 2014/03/23 05:39:32 dholland Exp $ */
+/* $NetBSD: inode.c,v 1.53 2015/03/29 19:35:58 chopps Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -246,7 +246,7 @@
devvp = fs->lfs_devvp;
bread(devvp, LFS_FSBTODB(fs, idesc->id_blkno), fs->lfs_bsize,
- NOCRED, 0, &bp);
+ 0, &bp);
ilevel--;
for (sizepb = fs->lfs_bsize, i = 0; i < ilevel; i++)
sizepb *= LFS_NINDIR(fs);
diff -r da014510241a -r 7dee3587114e sbin/fsck_lfs/lfs.c
--- a/sbin/fsck_lfs/lfs.c Sun Mar 29 19:33:55 2015 +0000
+++ b/sbin/fsck_lfs/lfs.c Sun Mar 29 19:35:58 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs.c,v 1.43 2014/07/13 02:44:21 dholland Exp $ */
+/* $NetBSD: lfs.c,v 1.44 2015/03/29 19:35:58 chopps Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -367,7 +367,7 @@
/* Load inode block and find inode */
if (daddr > 0) {
bread(fs->lfs_devvp, LFS_FSBTODB(fs, daddr), fs->lfs_ibsize,
- NULL, 0, &bp);
+ 0, &bp);
bp->b_flags |= B_AGE;
dip = lfs_ifind(fs, ino, bp);
if (dip == NULL) {
@@ -479,7 +479,7 @@
dev_bsize = DEV_BSIZE;
- (void)bread(devvp, sblkno, LFS_SBPAD, NOCRED, 0, &bp);
+ (void)bread(devvp, sblkno, LFS_SBPAD, 0, &bp);
fs = ecalloc(1, sizeof(*fs));
fs->lfs_dlfs = *((struct dlfs *) bp->b_data);
fs->lfs_devvp = devvp;
@@ -490,7 +490,7 @@
if (tryalt) {
(void)bread(devvp, LFS_FSBTODB(fs, fs->lfs_sboffs[1]),
- LFS_SBPAD, NOCRED, 0, &bp);
+ LFS_SBPAD, 0, &bp);
altfs = ecalloc(1, sizeof(*altfs));
altfs->lfs_dlfs = *((struct dlfs *) bp->b_data);
altfs->lfs_devvp = devvp;
@@ -598,7 +598,7 @@
/* Read in summary block */
bread(devvp, LFS_FSBTODB(osb, daddr), osb->lfs_sumsize,
- NULL, 0, &bp);
+ 0, &bp);
sp = (SEGSUM *)bp->b_data;
/*
@@ -790,7 +790,7 @@
}
while (j < howmany(sp->ss_ninos, LFS_INOPB(fs)) && *idp == daddr) {
bread(devvp, LFS_FSBTODB(fs, daddr), fs->lfs_ibsize,
- NOCRED, 0, &bp);
+ 0, &bp);
datap[datac++] = ((u_int32_t *) (bp->b_data))[0];
brelse(bp, 0);
@@ -806,7 +806,7 @@
fp->fi_lastlength
: fs->lfs_bsize);
bread(devvp, LFS_FSBTODB(fs, daddr), len,
- NOCRED, 0, &bp);
+ 0, &bp);
datap[datac++] = ((u_int32_t *) (bp->b_data))[0];
brelse(bp, 0);
daddr += lfs_btofsb(fs, len);
@@ -1043,7 +1043,7 @@
if (nsize <= osize) {
/* No need to extend */
if (bpp && (error = bread(vp, lbn, osize,
- NOCRED, 0, &bp)))
+ 0, &bp)))
return error;
} else {
/* Extend existing block */
@@ -1149,8 +1149,7 @@
break;
default:
idp = &indirs[num - 1];
- if (bread(vp, idp->in_lbn, fs->lfs_bsize, NOCRED,
- 0, &ibp))
+ if (bread(vp, idp->in_lbn, fs->lfs_bsize, 0, &ibp))
panic("lfs_balloc: bread bno %lld",
(long long)idp->in_lbn);
/* XXX ondisk32 */
@@ -1200,7 +1199,7 @@
* appropriate things and making sure it all goes to disk.
* Don't bother to read in that case.
*/
- if (bpp && (error = bread(vp, lbn, osize, NOCRED, 0, bpp))) {
+ if (bpp && (error = bread(vp, lbn, osize, 0, bpp))) {
brelse(*bpp, 0);
goto out;
}
diff -r da014510241a -r 7dee3587114e sbin/fsck_lfs/pass6.c
--- a/sbin/fsck_lfs/pass6.c Sun Mar 29 19:33:55 2015 +0000
+++ b/sbin/fsck_lfs/pass6.c Sun Mar 29 19:35:58 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pass6.c,v 1.32 2013/10/19 01:09:58 christos Exp $ */
+/* $NetBSD: pass6.c,v 1.33 2015/03/29 19:35:58 chopps Exp $ */
Home |
Main Index |
Thread Index |
Old Index