public inbox for linux-bcachefs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] bcachefs: Use user_backed_iter instead of iter_is_iovec
@ 2025-07-18 18:16 Alan Huang
  2025-07-18 18:41 ` Kent Overstreet
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Huang @ 2025-07-18 18:16 UTC (permalink / raw)
  To: kent.overstreet; +Cc: linux-bcachefs, Alan Huang

ITER_UBUF is also one of the user backed iter, which is equivalent
of single-segment iovec. DIO handling should use user_backed_iter.

Signed-off-by: Alan Huang <mmpgouride@gmail.com>
---

V2: imporve commit message


 fs/bcachefs/fs-io-direct.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/bcachefs/fs-io-direct.c b/fs/bcachefs/fs-io-direct.c
index 1f5154d9676b..6fdc477c81af 100644
--- a/fs/bcachefs/fs-io-direct.c
+++ b/fs/bcachefs/fs-io-direct.c
@@ -127,7 +127,7 @@ static int bch2_direct_IO_read(struct kiocb *req, struct iov_iter *iter)
 	 * the dirtying of requests that are internal from the kernel (i.e. from
 	 * loopback), because we'll deadlock on page_lock.
 	 */
-	dio->should_dirty = iter_is_iovec(iter);
+	dio->should_dirty = user_backed_iter(iter);
 
 	blk_start_plug(&plug);
 
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] bcachefs: Use user_backed_iter instead of iter_is_iovec
  2025-07-18 18:16 [PATCH v2] bcachefs: Use user_backed_iter instead of iter_is_iovec Alan Huang
@ 2025-07-18 18:41 ` Kent Overstreet
  0 siblings, 0 replies; 2+ messages in thread
From: Kent Overstreet @ 2025-07-18 18:41 UTC (permalink / raw)
  To: Alan Huang; +Cc: linux-bcachefs

On Sat, Jul 19, 2025 at 02:16:35AM +0800, Alan Huang wrote:
> ITER_UBUF is also one of the user backed iter, which is equivalent
> of single-segment iovec. DIO handling should use user_backed_iter.

Applied...

> 
> Signed-off-by: Alan Huang <mmpgouride@gmail.com>
> ---
> 
> V2: imporve commit message
> 
> 
>  fs/bcachefs/fs-io-direct.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/bcachefs/fs-io-direct.c b/fs/bcachefs/fs-io-direct.c
> index 1f5154d9676b..6fdc477c81af 100644
> --- a/fs/bcachefs/fs-io-direct.c
> +++ b/fs/bcachefs/fs-io-direct.c
> @@ -127,7 +127,7 @@ static int bch2_direct_IO_read(struct kiocb *req, struct iov_iter *iter)
>  	 * the dirtying of requests that are internal from the kernel (i.e. from
>  	 * loopback), because we'll deadlock on page_lock.
>  	 */
> -	dio->should_dirty = iter_is_iovec(iter);
> +	dio->should_dirty = user_backed_iter(iter);
>  
>  	blk_start_plug(&plug);
>  
> -- 
> 2.48.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-18 18:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-18 18:16 [PATCH v2] bcachefs: Use user_backed_iter instead of iter_is_iovec Alan Huang
2025-07-18 18:41 ` Kent Overstreet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox