Re: [PATCH v9 2/4] block: introduce folio awareness and add a bigger size from folio

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

 



On 09/09/24 10:23PM, Matthew Wilcox wrote:
On Fri, Aug 30, 2024 at 01:22:55PM +0530, Kundan Kumar wrote:
@@ -1237,30 +1238,61 @@ static int bio_iov_add_page(struct bio *bio, struct page *page,

 	if (bio->bi_vcnt > 0 &&
 	    bvec_try_merge_page(&bio->bi_io_vec[bio->bi_vcnt - 1],
-				page, len, offset, &same_page)) {
+				folio_page(folio, 0), len, offset,
+				&same_page)) {
 		bio->bi_iter.bi_size += len;
 		if (same_page)
-			bio_release_page(bio, page);
+			bio_release_page(bio, folio_page(folio, 0));

Shouldn't there be a subsequent patch that converts this to

Will do it in next version

		if (same_page && bio_flagged(bio, BIO_PAGE_PINNED))
			unpin_user_folio(folio, 1)

... also does this mean that 'same_page' is misnamed and it should
really be 'same_folio', in which case, is the bugfix in patch 1 correct?


No, we want to find same page rather than same folio. The logic still
determines whether two addresses lie in the same page. It's just
modified to take care of larger offset values that we may receive in
case of folios.






[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux