Subject: Re: [PATCH net-next 1/8] Move netfs_extract_iter_to_sg() to lib/scatterlist.c

From: Simon Horman <[email-masked]>
Date: Sat, 27 May 2023 14:20:46 +0200

On Fri, May 26, 2023 at 03:30:57PM +0100, David Howells wrote:

...

> +/**
> + * netfs_extract_iter_to_sg - Extract pages from an iterator and add ot an sglist
> + * @iter: The iterator to extract from
> + * @maxsize: The amount of iterator to copy
> + * @sgtable: The scatterlist table to fill in
> + * @sg_max: Maximum number of elements in @sgtable that may be filled
> + * @extraction_flags: Flags to qualify the request
> + *
> + * Extract the page fragments from the given amount of the source iterator and
> + * add them to a scatterlist that refers to all of those bits, to a maximum
> + * addition of @sg_max elements.
> + *
> + * The pages referred to by UBUF- and IOVEC-type iterators are extracted and
> + * pinned; BVEC-, KVEC- and XARRAY-type are extracted but aren't pinned; PIPE-
> + * and DISCARD-type are not supported.
> + *
> + * No end mark is placed on the scatterlist; that's left to the caller.
> + *
> + * @extraction_flags can have ITER_ALLOW_P2PDMA set to request peer-to-peer DMA
> + * be allowed on the pages extracted.
> + *
> + * If successul, @sgtable->nents is updated to include the number of elements

Hi David,

I know you are just moving things about here.
But if you need to re-spin for some other reason,
perhaps you could correct the spelling of successful.

> + * added and the number of bytes added is returned.  @sgtable->orig_nents is
> + * left unaltered.
> + *
> + * The iov_iter_extract_mode() function should be used to query how cleanup
> + * should be performed.
> + */

...