Skip to contentSkip to conversation

linux-next: build failure after merge of the gfs2 tree

PATCH Stephen Rothwell 2 participants 2 messages Jun 9, 2021 – Jun 10, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the gfs2 tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

Caused by commit

f8524fce6a88 ("iov_iter: Add iov_iter_fault_in_writeable()")

interacting with commits

e59c7577f5d6 ("iov_iter: separate direction from flavour")
30da2b24a3ed ("iov_iter: make the amount already copied available to iterator callbacks")

from the vfs tree.

I have applied the following fix up patch (I think it is mostly right?)

From: Stephen Rothwell <[email protected]>
Date: Wed, 9 Jun 2021 12:51:59 +1000
Subject: [PATCH] iov_iter: fix up for iov changes

---
 lib/iov_iter.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)
lib/iov_iter.c +14 -8
index d225e827b22a..b2d7289dc729 100644
@@ -462,17 +462,23 @@ EXPORT_SYMBOL(iov_iter_fault_in_readable);
 
 int iov_iter_fault_in_writeable(struct iov_iter *i, size_t bytes)
 {
-	size_t skip = i->iov_offset;
-	const struct iovec *iov;
-	int err;
-	struct iovec v;
+	if (iter_is_iovec(i)) {
+		const struct iovec *p;
+		size_t skip;
 
-	if (!(i->type & (ITER_BVEC|ITER_KVEC))) {
-		iterate_iovec(i, bytes, v, iov, skip, ({
-			err = fault_in_pages_writeable(v.iov_base, v.iov_len);
+		if (bytes > i->count)
+			bytes = i->count;
+		for (p = i->iov, skip = i->iov_offset; bytes; p++, skip = 0) {
+			size_t len = min(bytes, p->iov_len - skip);
+			int err;
+
+			if (unlikely(!len))
+				continue;
+			err = fault_in_pages_writeable(p->iov_base + skip, len);
 			if (unlikely(err))
 				return err;
-		0;}))
+			bytes -= len;
+		}
 	}
 	return 0;
 }
Signature · 6 lines
2.30.2


-- 
Cheers,
Stephen Rothwell
#1 lore raw

Hi Stephen,

Quoted 9 lines · Stephen Rothwell

Hi all,

After merging the gfs2 tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

Caused by commit

f8524fce6a88 ("iov_iter: Add iov_iter_fault_in_writeable()")

Quoted 8 lines

interacting with commits

e59c7577f5d6 ("iov_iter: separate direction from flavour")
30da2b24a3ed ("iov_iter: make the amount already copied available to iterator callbacks")

from the vfs tree.

I have applied the following fix up patch (I think it is mostly right?)

yes, that looks correct. I've updated the gfs2 for-next branch with a version that merges in the vfs bits, so the conflict should be gone now.

Thanks,
Andreas