All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: linux-fsdevel@vger.kernel.org
Cc: linux-xfs@vger.kernel.org, Christoph Hellwig <hch@infradead.org>,
	"Darrick J . Wong" <djwong@kernel.org>
Subject: [PATCH v3 09/12] dax: advance the iomap_iter on pte and pmd faults
Date: Mon, 24 Feb 2025 09:47:54 -0500	[thread overview]
Message-ID: <20250224144757.237706-10-bfoster@redhat.com> (raw)
In-Reply-To: <20250224144757.237706-1-bfoster@redhat.com>

Advance the iomap_iter on PTE and PMD faults. Each of these
operations assign a hardcoded size to iter.processed. Replace those
with an advance and status return.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
---
 fs/dax.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/fs/dax.c b/fs/dax.c
index c8c0d81122ab..44701865ca94 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -1771,8 +1771,10 @@ static vm_fault_t dax_iomap_pte_fault(struct vm_fault *vmf, pfn_t *pfnp,
 			ret |= VM_FAULT_MAJOR;
 		}
 
-		if (!(ret & VM_FAULT_ERROR))
-			iter.processed = PAGE_SIZE;
+		if (!(ret & VM_FAULT_ERROR)) {
+			u64 length = PAGE_SIZE;
+			iter.processed = iomap_iter_advance(&iter, &length);
+		}
 	}
 
 	if (iomap_errp)
@@ -1885,8 +1887,10 @@ static vm_fault_t dax_iomap_pmd_fault(struct vm_fault *vmf, pfn_t *pfnp,
 			continue; /* actually breaks out of the loop */
 
 		ret = dax_fault_iter(vmf, &iter, pfnp, &xas, &entry, true);
-		if (ret != VM_FAULT_FALLBACK)
-			iter.processed = PMD_SIZE;
+		if (ret != VM_FAULT_FALLBACK) {
+			u64 length = PMD_SIZE;
+			iter.processed = iomap_iter_advance(&iter, &length);
+		}
 	}
 
 unlock_entry:
-- 
2.48.1


  parent reply	other threads:[~2025-02-24 14:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24 14:47 [PATCH v3 00/12] iomap: incremental advance conversion -- phase 2 Brian Foster
2025-02-24 14:47 ` [PATCH v3 01/12] iomap: advance the iter directly on buffered read Brian Foster
2025-02-24 14:47 ` [PATCH v3 02/12] iomap: advance the iter on direct I/O Brian Foster
2025-02-24 14:47 ` [PATCH v3 03/12] iomap: convert misc simple ops to incremental advance Brian Foster
2025-02-24 14:47 ` [PATCH v3 04/12] dax: advance the iomap_iter in the read/write path Brian Foster
2025-02-24 14:47 ` [PATCH v3 05/12] dax: push advance down into dax_iomap_iter() for read and write Brian Foster
2025-02-24 14:47 ` [PATCH v3 06/12] dax: advance the iomap_iter on zero range Brian Foster
2025-02-24 14:47 ` [PATCH v3 07/12] dax: advance the iomap_iter on unshare range Brian Foster
2025-02-24 14:47 ` [PATCH v3 08/12] dax: advance the iomap_iter on dedupe range Brian Foster
2025-02-24 14:47 ` Brian Foster [this message]
2025-02-24 14:47 ` [PATCH v3 10/12] iomap: remove unnecessary advance from iomap_iter() Brian Foster
2025-02-24 14:47 ` [PATCH v3 11/12] iomap: rename iomap_iter processed field to status Brian Foster
2025-02-24 14:47 ` [PATCH v3 12/12] iomap: introduce a full map advance helper Brian Foster
2025-02-26  8:43 ` [PATCH v3 00/12] iomap: incremental advance conversion -- phase 2 Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250224144757.237706-10-bfoster@redhat.com \
    --to=bfoster@redhat.com \
    --cc=djwong@kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.