mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-16 15:11:52 +00:00
Remove unused B_WRITEINPROG flag
This commit is contained in:
parent
273350ad0f
commit
08dbd671ff
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=135280
@ -328,9 +328,7 @@ nwfs_doio(vp, bp, cr, td)
|
||||
uiop->uio_offset = ((off_t)bp->b_blkno) * DEV_BSIZE + bp->b_dirtyoff;
|
||||
io.iov_base = (char *)bp->b_data + bp->b_dirtyoff;
|
||||
uiop->uio_rw = UIO_WRITE;
|
||||
bp->b_flags |= B_WRITEINPROG;
|
||||
error = ncp_write(NWFSTOCONN(nmp), &np->n_fh, uiop, cr);
|
||||
bp->b_flags &= ~B_WRITEINPROG;
|
||||
|
||||
/*
|
||||
* For an interrupted write, the buffer is still valid
|
||||
|
@ -353,9 +353,7 @@ smbfs_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td
|
||||
uiop->uio_offset = ((off_t)bp->b_blkno) * DEV_BSIZE + bp->b_dirtyoff;
|
||||
io.iov_base = (char *)bp->b_data + bp->b_dirtyoff;
|
||||
uiop->uio_rw = UIO_WRITE;
|
||||
bp->b_flags |= B_WRITEINPROG;
|
||||
error = smb_write(smp->sm_share, np->n_fid, uiop, &scred);
|
||||
bp->b_flags &= ~B_WRITEINPROG;
|
||||
|
||||
/*
|
||||
* For an interrupted write, the buffer is still valid
|
||||
|
@ -877,7 +877,7 @@ ibwrite(struct buf *bp)
|
||||
|
||||
bp->b_flags &= ~B_DONE;
|
||||
bp->b_ioflags &= ~BIO_ERROR;
|
||||
bp->b_flags |= B_WRITEINPROG | B_CACHE;
|
||||
bp->b_flags |= B_CACHE;
|
||||
bp->b_iocmd = BIO_WRITE;
|
||||
|
||||
VI_LOCK(bp->b_vp);
|
||||
|
@ -913,7 +913,6 @@ vwakeup(bp)
|
||||
{
|
||||
register struct vnode *vp;
|
||||
|
||||
bp->b_flags &= ~B_WRITEINPROG;
|
||||
if ((vp = bp->b_vp)) {
|
||||
VI_LOCK(vp);
|
||||
vp->v_numoutput--;
|
||||
|
@ -2715,7 +2715,6 @@ nfs4_flush(struct vnode *vp, struct ucred *cred, int waitfor, struct thread *td,
|
||||
wcred = bp->b_wcred;
|
||||
else if (wcred != bp->b_wcred)
|
||||
wcred = NOCRED;
|
||||
bp->b_flags |= B_WRITEINPROG;
|
||||
vfs_busy_pages(bp, 1);
|
||||
|
||||
VI_LOCK(vp);
|
||||
@ -2780,7 +2779,7 @@ nfs4_flush(struct vnode *vp, struct ucred *cred, int waitfor, struct thread *td,
|
||||
*/
|
||||
for (i = 0; i < bvecpos; i++) {
|
||||
bp = bvec[i];
|
||||
bp->b_flags &= ~(B_NEEDCOMMIT | B_WRITEINPROG | B_CLUSTEROK);
|
||||
bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK);
|
||||
if (retv) {
|
||||
/*
|
||||
* Error, leave B_DELWRI intact
|
||||
@ -2851,7 +2850,7 @@ nfs4_flush(struct vnode *vp, struct ucred *cred, int waitfor, struct thread *td,
|
||||
if (passone || !commit)
|
||||
bp->b_flags |= B_ASYNC;
|
||||
else
|
||||
bp->b_flags |= B_ASYNC | B_WRITEINPROG;
|
||||
bp->b_flags |= B_ASYNC;
|
||||
splx(s);
|
||||
bwrite(bp);
|
||||
goto loop;
|
||||
@ -2931,12 +2930,10 @@ nfs4_print(struct vop_print_args *ap)
|
||||
|
||||
/*
|
||||
* This is the "real" nfs::bwrite(struct buf*).
|
||||
* B_WRITEINPROG isn't set unless the force flag is one and it
|
||||
* handles the B_NEEDCOMMIT flag.
|
||||
* We set B_CACHE if this is a VMIO buffer.
|
||||
*/
|
||||
int
|
||||
nfs4_writebp(struct buf *bp, int force, struct thread *td)
|
||||
nfs4_writebp(struct buf *bp, int force __unused, struct thread *td)
|
||||
{
|
||||
int s;
|
||||
int oldflags = bp->b_flags;
|
||||
@ -2977,8 +2974,6 @@ nfs4_writebp(struct buf *bp, int force, struct thread *td)
|
||||
*/
|
||||
vfs_busy_pages(bp, 1);
|
||||
|
||||
if (force)
|
||||
bp->b_flags |= B_WRITEINPROG;
|
||||
BUF_KERNPROC(bp);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_STRATEGY(bp->b_vp, bp);
|
||||
|
@ -1271,7 +1271,6 @@ nfs_asyncio(struct nfsmount *nmp, struct buf *bp, struct ucred *cred, struct thr
|
||||
if (bp->b_rcred == NOCRED && cred != NOCRED)
|
||||
bp->b_rcred = crhold(cred);
|
||||
} else {
|
||||
bp->b_flags |= B_WRITEINPROG;
|
||||
if (bp->b_wcred == NOCRED && cred != NOCRED)
|
||||
bp->b_wcred = crhold(cred);
|
||||
}
|
||||
@ -1405,11 +1404,9 @@ nfs_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td)
|
||||
off_t off;
|
||||
|
||||
off = ((u_quad_t)bp->b_blkno) * DEV_BSIZE + bp->b_dirtyoff;
|
||||
bp->b_flags |= B_WRITEINPROG;
|
||||
retv = (nmp->nm_rpcops->nr_commit)(
|
||||
bp->b_vp, off, bp->b_dirtyend-bp->b_dirtyoff,
|
||||
bp->b_wcred, td);
|
||||
bp->b_flags &= ~B_WRITEINPROG;
|
||||
if (retv == 0) {
|
||||
bp->b_dirtyoff = bp->b_dirtyend = 0;
|
||||
bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK);
|
||||
@ -1443,7 +1440,6 @@ nfs_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td)
|
||||
else
|
||||
iomode = NFSV3WRITE_FILESYNC;
|
||||
|
||||
bp->b_flags |= B_WRITEINPROG;
|
||||
error = (nmp->nm_rpcops->nr_writerpc)(vp, uiop, cr, &iomode, &must_commit);
|
||||
|
||||
/*
|
||||
@ -1467,7 +1463,6 @@ nfs_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td)
|
||||
} else {
|
||||
bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK);
|
||||
}
|
||||
bp->b_flags &= ~B_WRITEINPROG;
|
||||
|
||||
/*
|
||||
* For an interrupted write, the buffer is still valid
|
||||
|
@ -2708,7 +2708,6 @@ nfs_flush(struct vnode *vp, struct ucred *cred, int waitfor, struct thread *td,
|
||||
wcred = bp->b_wcred;
|
||||
else if (wcred != bp->b_wcred)
|
||||
wcred = NOCRED;
|
||||
bp->b_flags |= B_WRITEINPROG;
|
||||
vfs_busy_pages(bp, 1);
|
||||
|
||||
VI_LOCK(vp);
|
||||
@ -2773,7 +2772,7 @@ nfs_flush(struct vnode *vp, struct ucred *cred, int waitfor, struct thread *td,
|
||||
*/
|
||||
for (i = 0; i < bvecpos; i++) {
|
||||
bp = bvec[i];
|
||||
bp->b_flags &= ~(B_NEEDCOMMIT | B_WRITEINPROG | B_CLUSTEROK);
|
||||
bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK);
|
||||
if (retv) {
|
||||
/*
|
||||
* Error, leave B_DELWRI intact
|
||||
@ -2843,7 +2842,7 @@ nfs_flush(struct vnode *vp, struct ucred *cred, int waitfor, struct thread *td,
|
||||
if (passone || !commit)
|
||||
bp->b_flags |= B_ASYNC;
|
||||
else
|
||||
bp->b_flags |= B_ASYNC | B_WRITEINPROG;
|
||||
bp->b_flags |= B_ASYNC;
|
||||
splx(s);
|
||||
bwrite(bp);
|
||||
goto loop;
|
||||
@ -2921,12 +2920,10 @@ nfs_print(struct vop_print_args *ap)
|
||||
|
||||
/*
|
||||
* This is the "real" nfs::bwrite(struct buf*).
|
||||
* B_WRITEINPROG isn't set unless the force flag is one and it
|
||||
* handles the B_NEEDCOMMIT flag.
|
||||
* We set B_CACHE if this is a VMIO buffer.
|
||||
*/
|
||||
int
|
||||
nfs_writebp(struct buf *bp, int force, struct thread *td)
|
||||
nfs_writebp(struct buf *bp, int force __unused, struct thread *td)
|
||||
{
|
||||
int s;
|
||||
int oldflags = bp->b_flags;
|
||||
@ -2967,8 +2964,6 @@ nfs_writebp(struct buf *bp, int force, struct thread *td)
|
||||
*/
|
||||
vfs_busy_pages(bp, 1);
|
||||
|
||||
if (force)
|
||||
bp->b_flags |= B_WRITEINPROG;
|
||||
BUF_KERNPROC(bp);
|
||||
bp->b_iooffset = dbtob(bp->b_blkno);
|
||||
VOP_STRATEGY(bp->b_vp, bp);
|
||||
|
@ -221,7 +221,7 @@ struct buf {
|
||||
#define B_DIRTY 0x00200000 /* Needs writing later (in EXT2FS). */
|
||||
#define B_RELBUF 0x00400000 /* Release VMIO buffer. */
|
||||
#define B_00800000 0x00800000 /* Available flag. */
|
||||
#define B_WRITEINPROG 0x01000000 /* Write in progress. */
|
||||
#define B_01000000 0x01000000 /* Available flag. */
|
||||
#define B_02000000 0x02000000 /* Available flag. */
|
||||
#define B_PAGING 0x04000000 /* volatile paging I/O -- bypass VMIO */
|
||||
#define B_08000000 0x08000000 /* Available flag. */
|
||||
@ -231,7 +231,7 @@ struct buf {
|
||||
#define B_80000000 0x80000000 /* Available flag. */
|
||||
|
||||
#define PRINT_BUF_FLAGS "\20\40b31\37cluster\36vmio\35ram\34b27" \
|
||||
"\33paging\32b25\31writeinprog\30b23\27relbuf\26dirty\25b20" \
|
||||
"\33paging\32b25\31b24\30b23\27relbuf\26dirty\25b20" \
|
||||
"\24b19\23phys\22clusterok\21malloc\20nocache\17locked\16inval" \
|
||||
"\15scanned\14nowdrain\13eintr\12done\11b8\10delwri\7validsuspwrt" \
|
||||
"\6cache\5deferred\4direct\3async\2needcommit\1age"
|
||||
|
Loading…
Reference in New Issue
Block a user