public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: "Zak, Semion" <SZak@nds.com>, "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: Superblock restore takes too long
Date: Fri, 20 Jul 2012 10:21:43 +1000	[thread overview]
Message-ID: <20120720002143.GG23387@dastard> (raw)
In-Reply-To: <50082F28.8090905@sandeen.net>

On Thu, Jul 19, 2012 at 11:00:40AM -0500, Eric Sandeen wrote:
> On 7/19/12 4:30 AM, Zak, Semion wrote:
> > Hi,
> > 
> > Corrupted Superblock restore takes too long because xfs_restore searches the disc for reserved Superblock.
> > 
> > Is it possible accelerate the search, for example by giving to xfs_restore some hint (reserved Superblock LBA)?
> > 
> 
> Often when I've seen this it's because the block device wasn't really even an xfs filesystem, and the search went on forever.

Right, it has to read the entire disk to find it. it's slow to do
this. It could be sped up by using readahead rather than the current
"read 1MB, process buffer 512 bytes at a time, read 1MB, ...." so
that it runs at disk speed rather than processing latency speed, but
that's still pretty slow. i.e. it is slow because it is stupid.

Ideally, searching for a secondary superblock should check a
few places before resorting to a full disk search. e.g.:

	- at 1TB offset for large filesystems
	- for small devices at (size / 4) and (size / 16) to catch
	  the two common default mkfs settings

and then if that fails search at the places where the first AG would
be located for a filesystem with 2, 3, 5, 6, 7..... AGs. That woul
dcut down on the search time immensely, and only if that fails would
it be necessary to do a full disk search.

Any takers?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2012-07-20  0:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19  9:30 Superblock restore takes too long Zak, Semion
2012-07-19 13:58 ` Carlos Maiolino
2012-07-19 16:00 ` Eric Sandeen
2012-07-20  0:21   ` Dave Chinner [this message]

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=20120720002143.GG23387@dastard \
    --to=david@fromorbit.com \
    --cc=SZak@nds.com \
    --cc=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.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