mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 19:43:41 +00:00
Don't allow partial buffers to be cluster-comitted.
Zero the b_dirty{off,end} after cluster-comitting a group of buffers. With these fixes, I was able to complete a 'make world' with remote src and obj directories.
This commit is contained in:
parent
e38dff1718
commit
18cab10cb3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=25003
@ -33,7 +33,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vfs_cluster.c 8.7 (Berkeley) 2/13/94
|
||||
* $Id: vfs_cluster.c,v 1.43 1997/03/07 14:40:54 dyson Exp $
|
||||
* $Id: vfs_cluster.c,v 1.44 1997/04/01 11:48:30 bde Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -468,6 +468,7 @@ cluster_callback(bp)
|
||||
tbp->b_flags |= B_ERROR;
|
||||
tbp->b_error = error;
|
||||
}
|
||||
tbp->b_dirtyoff = tbp->b_dirtyend = 0;
|
||||
biodone(tbp);
|
||||
}
|
||||
relpbuf(bp);
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
|
||||
* $Id: nfs_bio.c,v 1.33 1997/03/09 10:21:26 bde Exp $
|
||||
* $Id: nfs_bio.c,v 1.34 1997/04/03 07:52:00 dfr Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -962,9 +962,12 @@ nfs_doio(bp, cr, p)
|
||||
iomode = NFSV3WRITE_FILESYNC;
|
||||
bp->b_flags |= B_WRITEINPROG;
|
||||
error = nfs_writerpc(vp, uiop, cr, &iomode, &must_commit);
|
||||
if (!error && iomode == NFSV3WRITE_UNSTABLE)
|
||||
bp->b_flags |= B_NEEDCOMMIT | B_CLUSTEROK;
|
||||
else
|
||||
if (!error && iomode == NFSV3WRITE_UNSTABLE) {
|
||||
bp->b_flags |= B_NEEDCOMMIT;
|
||||
if (bp->b_dirtyoff == 0
|
||||
&& bp->b_dirtyend == bp->b_bufsize)
|
||||
bp->b_flags |= B_CLUSTEROK;
|
||||
} else
|
||||
bp->b_flags &= ~B_NEEDCOMMIT;
|
||||
bp->b_flags &= ~B_WRITEINPROG;
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
|
||||
* $Id: nfs_bio.c,v 1.33 1997/03/09 10:21:26 bde Exp $
|
||||
* $Id: nfs_bio.c,v 1.34 1997/04/03 07:52:00 dfr Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -962,9 +962,12 @@ nfs_doio(bp, cr, p)
|
||||
iomode = NFSV3WRITE_FILESYNC;
|
||||
bp->b_flags |= B_WRITEINPROG;
|
||||
error = nfs_writerpc(vp, uiop, cr, &iomode, &must_commit);
|
||||
if (!error && iomode == NFSV3WRITE_UNSTABLE)
|
||||
bp->b_flags |= B_NEEDCOMMIT | B_CLUSTEROK;
|
||||
else
|
||||
if (!error && iomode == NFSV3WRITE_UNSTABLE) {
|
||||
bp->b_flags |= B_NEEDCOMMIT;
|
||||
if (bp->b_dirtyoff == 0
|
||||
&& bp->b_dirtyend == bp->b_bufsize)
|
||||
bp->b_flags |= B_CLUSTEROK;
|
||||
} else
|
||||
bp->b_flags &= ~B_NEEDCOMMIT;
|
||||
bp->b_flags &= ~B_WRITEINPROG;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user