From: Bill O'Donnell <billodo@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: sandeen@redhat.com, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 6/8] xfs_repair: reinitialize the root directory nlink correctly
Date: Wed, 19 Dec 2018 14:24:47 -0600 [thread overview]
Message-ID: <20181219202447.GA22276@redhat.com> (raw)
In-Reply-To: <154524781113.28646.8112653175487549499.stgit@magnolia>
On Wed, Dec 19, 2018 at 11:30:11AM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> In mk_root_dir, we reinitialize the root directory inode with a link
> count of 1. This differs from mkfs parseproto, which initializes the
> root to have a link count of 2. The nlink discrepancy in repair is
> caught and corrected during phase 7, but this is unnecessary since we
> should set it properly in the first place.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
Looks fine.
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
> repair/phase6.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> diff --git a/repair/phase6.c b/repair/phase6.c
> index 9477bc25..8a50b350 100644
> --- a/repair/phase6.c
> +++ b/repair/phase6.c
> @@ -891,7 +891,7 @@ mk_root_dir(xfs_mount_t *mp)
> ip->i_d.di_format = XFS_DINODE_FMT_EXTENTS;
> ip->i_d.di_aformat = XFS_DINODE_FMT_EXTENTS;
>
> - set_nlink(VFS_I(ip), 1); /* account for . */
> + set_nlink(VFS_I(ip), 2); /* account for . and .. */
>
> times = XFS_ICHGTIME_CHG | XFS_ICHGTIME_MOD;
> if (ip->i_d.di_version == 3) {
>
next prev parent reply other threads:[~2018-12-19 20:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-19 19:29 [PATCH 0/8] xfsprogs: various fixes Darrick J. Wong
2018-12-19 19:29 ` [PATCH 1/8] xfs_scrub_all: walk the lsblk device/fs hierarchy correctly Darrick J. Wong
2019-02-04 18:08 ` Eric Sandeen
2019-02-04 18:16 ` Darrick J. Wong
2019-02-04 18:27 ` Eric Sandeen
2018-12-19 19:29 ` [PATCH 2/8] xfs_scrub_all.timer: activate after most of the system is up Darrick J. Wong
2019-02-04 18:12 ` Eric Sandeen
2018-12-19 19:29 ` [PATCH 3/8] xfs_scrub: rename the global nr_threads Darrick J. Wong
2019-02-04 18:20 ` Eric Sandeen
2018-12-19 19:29 ` [PATCH 4/8] xfs_scrub: use datadev parallelization estimates for thread count Darrick J. Wong
2019-02-04 18:31 ` Eric Sandeen
2019-02-04 18:34 ` Darrick J. Wong
2018-12-19 19:30 ` [PATCH 5/8] xfs_scrub: use data/rtdev parallelization estimates for the read-verify pool Darrick J. Wong
2019-02-04 18:35 ` Eric Sandeen
2019-02-04 18:38 ` Darrick J. Wong
2019-02-05 2:23 ` Darrick J. Wong
2018-12-19 19:30 ` [PATCH 6/8] xfs_repair: reinitialize the root directory nlink correctly Darrick J. Wong
2018-12-19 20:24 ` Bill O'Donnell [this message]
2019-02-04 19:19 ` Eric Sandeen
2018-12-19 19:30 ` [PATCH 7/8] xfs_repair: bump the irec on-disk nlink when adding lost+found Darrick J. Wong
2018-12-19 20:30 ` Bill O'Donnell
2018-12-19 19:30 ` [PATCH 8/8] xfs_repair: fix uninitialized variable warnings Darrick J. Wong
2018-12-19 20:25 ` Bill O'Donnell
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=20181219202447.GA22276@redhat.com \
--to=billodo@redhat.com \
--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 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).