Re: [PATCH v7 1/4] block: Added folio-lized version of bvec_try_merge_hw_page()

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

 



I'd say folio-ized, in the subject (also for the next patch), but I'm not
a native speaker and this is all pretty odd terminology anyway..

> index e9e809a63c59..c10f5fa0ba27 100644
> --- a/block/bio.c
> +++ b/block/bio.c
> @@ -952,6 +952,23 @@ bool bvec_try_merge_hw_page(struct request_queue *q, struct bio_vec *bv,
>  		struct page *page, unsigned len, unsigned offset,
>  		bool *same_page)
>  {
> +	struct folio *folio = page_folio(page);
> +
> +	return bvec_try_merge_hw_folio(q, bv, folio, len,
> +			((size_t)folio_page_idx(folio, page) << PAGE_SHIFT) +
> +			offset, same_page);
> +}
> +
> +/*
> + * Try to merge a folio into a segment, while obeying the hardware segment
> + * size limit.  This is not for normal read/write bios, but for passthrough
> + * or Zone Append operations that we can't split.
> + */
> +bool bvec_try_merge_hw_folio(struct request_queue *q, struct bio_vec *bv,
> +		struct folio *folio, size_t len, size_t offset,
> +		bool *same_page)

Placing the wrapper above the guts of the implementation is a bit odd.
Can you reorder these?

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>




[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