![]() | |||||||||||||
Messages in this thread |
On Wed, Jan 29 2003, Benjamin Herrenschmidt wrote: > On Tue, 2003-01-28 at 23:06, Jens Axboe wrote: > > On Tue, Jan 28 2003, Larry Sendlosky wrote: > > > I was glad to see the physical page support in 2.4.20. > > > (and also noticed that the current BK tree clobbered it > > > on a patch set from Alan). > > > > > > One question, > > > > > > + lastdataend = bh_phys(bh) + bh->b_size; > > > > > > bh_phys(x) uses bh->b_page. Does it make a difference > > > if bh->b_page is zero? What if someone combines virt and phys > > > buffer addresses in bh list? > > > > Yes good catch! New version attached. > > That's interesting. I wasn't awaye you could have a request > containing such a "mixed" set of bh without valid pages. > Actually, I though b_page was always valid. Looking at > other drivers (typically the the csiss.c driver), it also > unconditionally use b_page & bh_phys(). So either we are > looking at a false problem, or that driver need fixing as > well. b_page is not always valid for IDE, this is a special case. ide-scsi fabricates its own buffer_heads. cciss etc can rely on valid b_page always. > Now assuming that mix can happen, I don't like the fact that > your new version will use lastdataend to compare against both > physical and virtual addresses. They should not be mixed in one call of build_sglist(). > Maybe the solution is to have an additional variable indicating > if the last bh was virtual or physical, and reset lastdataend > to ~0 when the current one is different... That should be a BUG(), if anything. -- Jens Axboe - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | ||||||||||||
| Last update: 2005-03-22 12:32 [from the cache] ©2003-2008 | |||||||||||||