All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: "Darrick J. Wong" <darrick.wong@oracle.com>, sandeen@redhat.com
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 11/10] xfs_repair: clear extent size hints when clearing inode core
Date: Thu, 28 Jun 2018 14:24:33 -0500	[thread overview]
Message-ID: <07330d87-0cd4-0d37-9c77-0e2b1f66f67d@sandeen.net> (raw)
In-Reply-To: <20180628172937.GI5711@magnolia>

On 6/28/18 12:29 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> In kernel 4.18 we become more strict about what can be in the extent
> size hint fields, even for freed inodes.  Therefore, if repair decides
> to clear out an inode core, zero the hint fields and clear the flags so
> that the kernel won't trip over the cleared inode if and when it tries
> to read the chunk.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Looks good, I'll merge this before the libxfs sync.  Thanks!

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  repair/dinode.c |   10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/repair/dinode.c b/repair/dinode.c
> index f9b2bac0..4118db7c 100644
> --- a/repair/dinode.c
> +++ b/repair/dinode.c
> @@ -194,6 +194,11 @@ clear_dinode_core(struct xfs_mount *mp, xfs_dinode_t *dinoc, xfs_ino_t ino_num)
>  		dinoc->di_anextents = 0;
>  	}
>  
> +	if (be32_to_cpu(dinoc->di_extsize) != 0)  {
> +		__dirty_no_modify_ret(dirty);
> +		dinoc->di_extsize = 0;
> +	}
> +
>  	if (dinoc->di_version > 1 &&
>  			be32_to_cpu(dinoc->di_nlink) != 0)  {
>  		__dirty_no_modify_ret(dirty);
> @@ -237,6 +242,11 @@ clear_dinode_core(struct xfs_mount *mp, xfs_dinode_t *dinoc, xfs_ino_t ino_num)
>  		dinoc->di_changecount = 0;
>  	}
>  
> +	if (be32_to_cpu(dinoc->di_cowextsize) != 0)  {
> +		__dirty_no_modify_ret(dirty);
> +		dinoc->di_cowextsize = 0;
> +	}
> +
>  	return dirty;
>  }
>  
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2018-06-28 19:24 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-27  2:47 [PATCH 00/10] xfsprogs-4.18: mostly scrub/repair stuff Darrick J. Wong
2018-06-27  2:47 ` [PATCH 01/10] libxfs: remove crc32 functions Darrick J. Wong
2018-06-27  2:47 ` [PATCH 02/10] libfrog: move crc32c code out of libxfs Darrick J. Wong
2018-06-27  2:48 ` [PATCH 03/10] xfs_scrub: destroy workqueues when erroring out Darrick J. Wong
2018-07-26  0:29   ` Eric Sandeen
2018-06-27  2:48 ` [PATCH 04/10] xfs_scrub: schedule and manage optimizations/repairs to the filesystem Darrick J. Wong
2018-07-26  1:06   ` Eric Sandeen
2018-07-26  1:17     ` Darrick J. Wong
2018-06-27  2:48 ` [PATCH 05/10] xfs_scrub: allow developers to force repairs Darrick J. Wong
2018-07-26  1:07   ` Eric Sandeen
2018-06-27  2:48 ` [PATCH 06/10] xfs_scrub: don't error out if an optimize-only repair isn't supported Darrick J. Wong
2018-07-26  1:09   ` Eric Sandeen
2018-06-27  2:48 ` [PATCH 07/10] xfs_scrub: rename NOFIX_COMPLAIN to be less confusing Darrick J. Wong
2018-07-26  1:10   ` Eric Sandeen
2018-06-27  2:48 ` [PATCH 08/10] xfs_scrub: only retry non-permanent repair failures Darrick J. Wong
2018-07-26  1:16   ` Eric Sandeen
2018-07-26  1:19     ` Darrick J. Wong
2018-06-27  2:48 ` [PATCH 09/10] xfs_io: wire up repair ioctl stuff Darrick J. Wong
2018-07-26  1:23   ` Eric Sandeen
2018-06-27  2:48 ` [PATCH 10/10] xfs_repair: use libxfs extsize/cowextsize validation helpers Darrick J. Wong
2018-06-27  3:25   ` Eric Sandeen
2018-06-28 17:28     ` Darrick J. Wong
2018-06-28 17:29 ` [PATCH 11/10] xfs_repair: clear extent size hints when clearing inode core Darrick J. Wong
2018-06-28 19:24   ` Eric Sandeen [this message]
2018-06-28 17:30 ` [PATCH 12/10] xfs_repair: use libxfs extsize/cowextsize validation helpers Darrick J. Wong
2018-07-26  1:44   ` Eric Sandeen
2018-07-26  1:48     ` Eric Sandeen
2018-07-26 20:38   ` [PATCH v2 " Darrick J. Wong
2018-07-27 22:44     ` Eric Sandeen

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=07330d87-0cd4-0d37-9c77-0e2b1f66f67d@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /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.