On Wed, October 4, 2006 4:14 pm, Niklas Edmundsson wrote: > sendfile_nonblocking() takes the _brigade_ as an argument, gets the > first bucket from the brigade, finds it not to be a FILE bucket and > barfs. > > The attached fix is trivial, and I really can't understand why > sendfile_nonblocking() was taking a brigade instead of a bucket as > argument in the first place.
I think there was an implicit (and invalid) assumption that a bucket brigade containing a file bucket would only ever take a single file bucket. The fix is definitely sane. If the cache is ever taught how to cache fragments of requests, this could be useful too. > On a side note, in send_brigade_nonblocking() it's unnecessary to > queue 0-length writes to the iovec. It probably won't do any > difference at all in real world performance but it's obviously not > optimal ;) > > Also, I'm not at all fond of all those "XXX: We really should > log/return error/foo here"-lines. It's not THAT hard doing it while > coding, or at least do a final touchup before submitting a > patch/comitting code... +++1. Regards, Graham --