tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: vnode lock and v_numoutput



   Date: Mon, 26 Jan 2015 20:04:17 +0100
   From: Manuel Bouyer <bouyer%antioche.eu.org@localhost>

   On Mon, Jan 26, 2015 at 06:54:35PM +0000, Taylor R Campbell wrote:
   > However, I think there's a bug in your new patch too: suppose VOP_BMAP
   > fails on one of the middle blocks -- then we won't call VOP_STRATEGY
   > for the last block even if VOP_BMAP succeeds for that block.

   AFAIK that can't happen: if VOP_BMAP fails for a middle block, error
   will be != 0 and we exit the loop:

OK, I didn't look that closely.  In that case, your patch looks good
to me, although I'd put a KASSERT(0 < b->b_resid) before the loop just
to be safe.

We should probably do the same thing in genfs_do_io and anywhere else
that uses nestiobuf for writes, and invent a better way to express the
nestiobuf API so it's less ridiculously error-prone.


Home | Main Index | Thread Index | Old Index