NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/39536 (bufq related problem when writing DVDR and DVDRWs)
The following reply was made to PR kern/39536; it has been noted by GNATS.
From: Juergen Hannken-Illjes <hannken%eis.cs.tu-bs.de@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/39536 (bufq related problem when writing DVDR and DVDRWs)
Date: Fri, 22 May 2009 10:40:10 +0200
Hans,
could you please try the attached diff.
If you are not able to rebuild a kernel, please drop me a note.
--
Juergen Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig
(Germany)
Index: sys/kern/kern_physio.c
===================================================================
RCS file: /cvsroot/src/sys/kern/kern_physio.c,v
retrieving revision 1.90
diff -p -u -4 -r1.90 kern_physio.c
--- sys/kern/kern_physio.c 18 May 2009 21:12:33 -0000 1.90
+++ sys/kern/kern_physio.c 22 May 2009 07:45:13 -0000
@@ -111,8 +111,9 @@ physio_done(struct work *wk, void *dummy
struct buf *bp = (void *)wk;
size_t todo = bp->b_bufsize;
size_t done = bp->b_bcount - bp->b_resid;
struct physio_stat *ps = bp->b_private;
+ bool is_iobuf;
KASSERT(&bp->b_work == wk);
KASSERT(bp->b_bcount <= todo);
KASSERT(bp->b_resid <= bp->b_bcount);
@@ -122,8 +123,9 @@ physio_done(struct work *wk, void *dummy
vunmapbuf(bp, todo);
uvm_vsunlock(bp->b_proc->p_vmspace, bp->b_data, todo);
mutex_enter(&ps->ps_lock);
+ is_iobuf = (bp != ps->ps_orig_bp);
if (__predict_false(done != todo)) {
off_t endoffset = dbtob(bp->b_blkno) + done;
/*
@@ -157,9 +159,9 @@ physio_done(struct work *wk, void *dummy
ps->ps_running--;
cv_signal(&ps->ps_cv);
mutex_exit(&ps->ps_lock);
- if (bp != ps->ps_orig_bp)
+ if (is_iobuf)
putiobuf(bp);
}
static void
Home |
Main Index |
Thread Index |
Old Index