linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Andreas Dilger <aedilger@gmail.com>
Cc: Yongqiang Yang <xiaoqiangnk@gmail.com>,
	Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: backup of the last group'descriptor when it is the 1st group of a meta_bg
Date: Tue, 3 Apr 2012 11:39:51 -0700	[thread overview]
Message-ID: <20120403183951.GA24502@thunk.org> (raw)
In-Reply-To: <BD0B2BAC-D0BF-44D6-AE26-988095078D3D@dilger.ca>

On Wed, Mar 28, 2012 at 10:08:39AM -0600, Andreas Dilger wrote:
> On 2012-03-27, at 8:47 AM, Yongqiang Yang wrote:
> > Hi Ted, Andreas and List,
> > 
> > As Andreas pointed out last year, if the last group is the 1st group
> > in a meta bg, then its group desc has no backup.
> > With meta_bg resizing inode is useless,  I had a thought that we store
> > a backup group descriptor of the last group in the resizing inode?
> > What's your opinions?

It's an issue, however, when I originally thought about a number of
years ago, it wasn't something I was terribly worried about, since by
definition the percentage of the file system that we could lose is a
small percentage overall.  If we really were worried we could simply
strongly bias the inode allocator against using the inods in that last
block group.  Alternatively, now that we have metadata checksums, it
becomes even easier to find the inode table via a brute force search
if we really needed to find it.

> Actually, if the backup is always stored in the last block of the 0th
> group (which is itself the last group in the filesystem), there isn't
> even a need to store this location in the superblock.

Something that might make sense is to put a backup of the block group
descriptor at block #s_num_blocks (i.e., one block past the end of the
file system as described in the superblock).  E2fsck would just simply
try to see if there's a valid block group descriptor block at one
block past the end of the file system if the primary looks bad and
there aren't any of the normal meta_bg backups --- and that way we
wouldn't need to make any file system format changes.

	      	      	       	      	     - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2012-04-03 18:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-27 14:47 backup of the last group'descriptor when it is the 1st group of a meta_bg Yongqiang Yang
2012-03-28 16:08 ` Andreas Dilger
2012-04-02  5:04   ` Yongqiang Yang
2012-04-02  5:46     ` Andreas Dilger
2012-04-03 18:39   ` Ted Ts'o [this message]
2012-04-03 19:28     ` Andreas Dilger
2012-04-03 21:26       ` Ted Ts'o
2012-04-03 22:07         ` backup of the last group descriptor " Andreas Dilger
2012-04-04 19:28           ` Ted Ts'o

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=20120403183951.GA24502@thunk.org \
    --to=tytso@mit.edu \
    --cc=aedilger@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=xiaoqiangnk@gmail.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).