linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfs_db: set b_ops to NULL in set_cur for types without verifiers
@ 2020-08-27 16:53 Eric Sandeen
  2020-08-27 17:22 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2020-08-27 16:53 UTC (permalink / raw)
  To: linux-xfs

If we are using set_cur() to set a type that has no verifier ops,
be sure to set b_ops to NULL so that the old verifiers don't run
against the buffer anymore, which may have changed size.

Fixes: cdabe556 ("xfs_db: consolidate set_iocur_type behavior")
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/db/io.c b/db/io.c
index 9309f361..c79cf105 100644
--- a/db/io.c
+++ b/db/io.c
@@ -561,8 +561,10 @@ set_cur(
 		return;
 	iocur_top->buf = bp->b_addr;
 	iocur_top->bp = bp;
-	if (!ops)
+	if (!ops) {
+		bp->b_ops = NULL;
 		bp->b_flags |= LIBXFS_B_UNCHECKED;
+	}
 
 	iocur_top->bb = blknum;
 	iocur_top->blen = len;


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

* Re: [PATCH] xfs_db: set b_ops to NULL in set_cur for types without verifiers
  2020-08-27 16:53 [PATCH] xfs_db: set b_ops to NULL in set_cur for types without verifiers Eric Sandeen
@ 2020-08-27 17:22 ` Darrick J. Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2020-08-27 17:22 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: linux-xfs

On Thu, Aug 27, 2020 at 11:53:33AM -0500, Eric Sandeen wrote:
> If we are using set_cur() to set a type that has no verifier ops,
> be sure to set b_ops to NULL so that the old verifiers don't run
> against the buffer anymore, which may have changed size.
> 
> Fixes: cdabe556 ("xfs_db: consolidate set_iocur_type behavior")
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Seems to fix the xfs/070 regression, thanks.

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
> 
> diff --git a/db/io.c b/db/io.c
> index 9309f361..c79cf105 100644
> --- a/db/io.c
> +++ b/db/io.c
> @@ -561,8 +561,10 @@ set_cur(
>  		return;
>  	iocur_top->buf = bp->b_addr;
>  	iocur_top->bp = bp;
> -	if (!ops)
> +	if (!ops) {
> +		bp->b_ops = NULL;
>  		bp->b_flags |= LIBXFS_B_UNCHECKED;
> +	}
>  
>  	iocur_top->bb = blknum;
>  	iocur_top->blen = len;
> 

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

end of thread, other threads:[~2020-08-27 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 16:53 [PATCH] xfs_db: set b_ops to NULL in set_cur for types without verifiers Eric Sandeen
2020-08-27 17:22 ` Darrick J. Wong

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).