linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the gfs2 tree
@ 2021-06-09  3:07 Stephen Rothwell
  2021-06-10 12:35 ` Andreas Gruenbacher
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2021-06-09  3:07 UTC (permalink / raw)
  To: Steven Whitehouse, Bob Peterson, Al Viro
  Cc: Andreas Gruenbacher, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1800 bytes --]

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 <sfr@canb.auug.org.au>
Date: Wed, 9 Jun 2021 12:51:59 +1000
Subject: [PATCH] iov_iter: fix up for iov changes

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 lib/iov_iter.c | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index d225e827b22a..b2d7289dc729 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -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;
 }
-- 
2.30.2


-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the gfs2 tree
  2021-06-09  3:07 linux-next: build failure after merge of the gfs2 tree Stephen Rothwell
@ 2021-06-10 12:35 ` Andreas Gruenbacher
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Gruenbacher @ 2021-06-10 12:35 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Steven Whitehouse, Bob Peterson, Al Viro,
	Linux Kernel Mailing List, Linux Next Mailing List

Hi Stephen,

On Wed, Jun 9, 2021 at 5:08 AM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 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?)

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


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

* Re: linux-next: build failure after merge of the gfs2 tree
  2021-10-19 22:22 Stephen Rothwell
@ 2021-10-19 23:21 ` Andreas Grünbacher
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Grünbacher @ 2021-10-19 23:21 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Steven Whitehouse, Bob Peterson, Andreas Gruenbacher,
	Linux Kernel Mailing List, Linux Next Mailing List

Hi Stephen,

Am Mi., 20. Okt. 2021 um 00:23 Uhr schrieb Stephen Rothwell
<sfr@canb.auug.org.au>:
> Hi all,
>
> [expected 'struct gfs2_glock *' but argument is of type 'const struct gfs2_glock *']

fixed now. Sorry for the mess.

Thanks,
Andreas

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

* linux-next: build failure after merge of the gfs2 tree
@ 2021-10-19 22:22 Stephen Rothwell
  2021-10-19 23:21 ` Andreas Grünbacher
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2021-10-19 22:22 UTC (permalink / raw)
  To: Steven Whitehouse, Bob Peterson
  Cc: Andreas Gruenbacher, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

Hi all,

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

In file included from fs/gfs2/glock.c:39:
fs/gfs2/glock.c: In function 'may_grant':
fs/gfs2/glock.c:332:16: error: passing argument 2 of 'gfs2_dump_glock' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
  332 |   GLOCK_BUG_ON(gl, !test_bit(HIF_HOLDER,
      |                ^~
fs/gfs2/glock.h:222:26: note: in definition of macro 'GLOCK_BUG_ON'
  222 |    gfs2_dump_glock(NULL, gl, true); \
      |                          ^~
fs/gfs2/glock.h:219:70: note: expected 'struct gfs2_glock *' but argument is of type 'const struct gfs2_glock *'
  219 | extern void gfs2_dump_glock(struct seq_file *seq, struct gfs2_glock *gl,
      |                                                   ~~~~~~~~~~~~~~~~~~~^~
cc1: all warnings being treated as errors

Caused by commit

  9d0f1e82baf2 ("gfs2: Introduce flag for glock holder auto-demotion")

I have used the gfs2 tree from next-20211019 for today.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2021-10-19 23:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09  3:07 linux-next: build failure after merge of the gfs2 tree Stephen Rothwell
2021-06-10 12:35 ` Andreas Gruenbacher
2021-10-19 22:22 Stephen Rothwell
2021-10-19 23:21 ` Andreas Grünbacher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).