linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@redhat.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: linux-xfs@vger.kernel.org, Donald Douwsma <ddouwsma@redhat.com>
Subject: Re: [RFC PATCH] xfsrestore: fix rootdir due to xfsdump bulkstat misuse
Date: Mon, 16 Nov 2020 16:23:01 +0800	[thread overview]
Message-ID: <20201116082301.GB1486562@xiangao.remote.csb> (raw)
In-Reply-To: <20201113141553.GA981063@xiangao.remote.csb>

Hi Eric,

On Fri, Nov 13, 2020 at 10:15:53PM +0800, Gao Xiang wrote:
> On Fri, Nov 13, 2020 at 08:10:39AM -0600, Eric Sandeen wrote:
> > On 11/13/20 6:51 AM, Gao Xiang wrote:
> 
> ...
> 
> > 
> > Thank you for looking into this - I think you now understand xfsdump &
> > xfsrestore better than anyone else on the planet.  ;)
> > 
> > One question - what happens if the wrong "root inode" is not a directory?
> > I think that it is possible from the old "get the first active inode" heuristic
> > to find any type of file and save it as the root inode.
> > 
> > I think that your approach still works in this case, but wanted to double check
> > and see what you think.
> 
> Yeah, good question. I also think it works too, but just in case let me
> do fault injection on a regular inode later (Donald's image is /var
> subdir...)
> 

Sorry for the previous wrong conclusion...

From the code itself, tree_begindir() only triggers for node_t == dir but all
dirents can be trigged by tree_addent(), so I update the patch and verified
with manual fault injection code as well...

RFC v2: https://lore.kernel.org/linux-xfs/20201116080723.1486270-1-hsiangkao@redhat.com/
fault injection: https://lore.kernel.org/linux-xfs/20201116081359.GA1486562@xiangao.remote.csb/

Thanks,
Gao Xiang

> Thanks,
> Gao Xiang
> 
> > 
> > Thanks,
> > -Eric
> > 


  reply	other threads:[~2020-11-16  8:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13 12:51 [RFC PATCH] xfsrestore: fix rootdir due to xfsdump bulkstat misuse Gao Xiang
2020-11-13 14:10 ` Eric Sandeen
2020-11-13 14:15   ` Gao Xiang
2020-11-16  8:23     ` Gao Xiang [this message]
2020-11-16  8:07 ` [RFC PATCH v2] " Gao Xiang
2020-11-16  8:13   ` Gao Xiang
2021-09-27 15:00   ` Bill O'Donnell
2021-12-20 15:14   ` Masayoshi Mizuma
2022-06-10 23:05   ` Hironori Shiina
2022-06-30 19:19     ` Hironori Shiina
2022-09-28 19:10   ` [RFC PATCH V3] " Hironori Shiina
2022-09-29 18:17     ` Darrick J. Wong
2023-04-19 14:16       ` Eric Sandeen
2023-04-19 15:40         ` Darrick J. Wong
2023-04-21  9:10           ` Carlos Maiolino
2023-04-21 16:14             ` Darrick J. Wong

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=20201116082301.GB1486562@xiangao.remote.csb \
    --to=hsiangkao@redhat.com \
    --cc=ddouwsma@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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).