projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not invalidate buffers that you return ENOSPC on (they may need
[unix-history]
/
usr
/
src
/
sys
/
ufs
/
lfs
/
lfs_bio.c
diff --git
a/usr/src/sys/ufs/lfs/lfs_bio.c
b/usr/src/sys/ufs/lfs/lfs_bio.c
index
3e99aa4
..
07edc13
100644
(file)
--- a/
usr/src/sys/ufs/lfs/lfs_bio.c
+++ b/
usr/src/sys/ufs/lfs/lfs_bio.c
@@
-4,7
+4,7
@@
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)lfs_bio.c 7.1
6
(Berkeley) %G%
+ * @(#)lfs_bio.c 7.1
7
(Berkeley) %G%
*/
#include <sys/param.h>
*/
#include <sys/param.h>
@@
-54,11
+54,16
@@
lfs_bwrite(ap)
* the buffer onto the LOCKED free list. This is necessary, otherwise
* getnewbuf() would try to reclaim the buffers using bawrite, which
* isn't going to work.
* the buffer onto the LOCKED free list. This is necessary, otherwise
* getnewbuf() would try to reclaim the buffers using bawrite, which
* isn't going to work.
+ *
+ * XXX we don't let meta-data writes run out of space because they can
+ * come from the segment writer. We need to make sure that there is
+ * enough space reserved so that there's room to write meta-data
+ * blocks.
*/
if (!(bp->b_flags & B_LOCKED)) {
fs = VFSTOUFS(bp->b_vp->v_mount)->um_lfs;
*/
if (!(bp->b_flags & B_LOCKED)) {
fs = VFSTOUFS(bp->b_vp->v_mount)->um_lfs;
- if (!LFS_FITS(fs, fsbtodb(fs, 1)) && !IS_IFILE(bp)
) {
- bp->b_flags |= B_INVAL;
+ if (!LFS_FITS(fs, fsbtodb(fs, 1)) && !IS_IFILE(bp)
&&
+ bp->b_lblkno > 0) {
brelse(bp);
wakeup(&lfs_allclean_wakeup);
return (ENOSPC);
brelse(bp);
wakeup(&lfs_allclean_wakeup);
return (ENOSPC);