On Mon, Sep 14, 2015 at 05:34:02PM +0800, Qu Wenruo wrote: > >>And in your case: > >>(With a little modification, decompressed length is 32K now) > >> File layout > >> [0 - 8K] [8K - 24K] > >> | | > >> | | > >> points to extent X, points to extent X, > >> offset 4K, length of 8K offset 0, length 16K > >> > >> [extent X, compressed length = 4K uncompressed length = 32K] > >> > >>We want to read [4K,12K) and [0,16K) of uncompressed extent X, > >>then the real needed max range will be [0,16K). > >> > >>So submit one bio to read the extent, then extract the first 16K. > >>Then copy [4K,12K) into pages for first extent, and [0,16K) for 2nd. > >> > >>Any idea for such enhancement? > > > >Yes, but I really didn't like the complexity of such solution (I tried > >something similar) and didn't saw any significant overhead in my > >testing that justifies it. > > > >thanks > > Right, I didn't take block layer into consideration. > That's what block layer should do and it has already done it well. > > So I'm completely OK with your fix, especially for your nice and clear > comment in the code. Yeah, I'd rather keep it simple until we have workloads that are hitting a performance problem here. -chris -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html