linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: Valerie Henson <val_henson@linux.intel.com>
Cc: Theodore Tso <tytso@mit.edu>, linux-fsdevel@vger.kernel.org
Subject: Re: [RFC] TileFS - a proposal for scalable integrity checking
Date: Wed, 9 May 2007 14:51:41 -0500	[thread overview]
Message-ID: <20070509195141.GG11115@waste.org> (raw)
In-Reply-To: <20070509185921.GB18778@nifty>

On Wed, May 09, 2007 at 11:59:23AM -0700, Valerie Henson wrote:
> On Wed, May 09, 2007 at 12:06:52PM -0500, Matt Mackall wrote:
> > On Wed, May 09, 2007 at 12:56:39AM -0700, Valerie Henson wrote:
> > > On Sun, Apr 29, 2007 at 08:40:42PM -0500, Matt Mackall wrote:
> > > > 
> > > > This does mean that our time to make progress on a check is bounded at
> > > > the top by the size of our largest file. If we have a degenerate
> > > > filesystem filled with a single file, this will in fact take as long
> > > > as a conventional fsck. If your filesystem has, say, 100 roughly
> > > > equally-sized files, you're back in Chunkfs territory.
> > > 
> > > Hm, I'm not sure that everyone understands, a particular subtlety of
> > > how the fsck algorithm works in chunkfs.  A lot of people seem to
> > > think that you need to check *all* cross-chunk links, every time an
> > > individual chunk is checked.  That's not the case; you only need to
> > > check the links that go into and out of the dirty chunk.  You also
> > > don't need to check the other parts of the file outside the chunk,
> > > except for perhaps reading the byte range info for each continuation
> > > node and making sure no two continuation inodes think they both have
> > > the same range, but you don't check the indirect blocks, block
> > > bitmaps, etc.
> > 
> > My reference to chunkfs here is simply that the worst-case is checking ~1
> > chunk, which is about 1/100th of a volume.
> 
> I understand that being the case if each file is only in one tile.
> Does the fpos make this irrelevant as well?

Fpos does make it irrelevant.
 
> > > > So we should have no trouble checking an exabyte-sized filesystem on a
> > > > 4MB box. Even if it has one exabyte-sized file! We check the first
> > > > tile, see that it points to our file, then iterate through that file,
> > > > checking that the forward and reverse pointers for each block match
> > > > and all CRCs match, etc. We cache the file's inode as clean, finish
> > > > checking anything else in the first tile, then mark it clean. When we get
> > > > to the next tile (and the next billion after that!), we notice that
> > > > each block points back to our cached inode and skip rechecking it.
> > > 
> > > If I understand correctly then, if you do have a one exabyte sized
> > > file, and any part of it is in a dirty tile, you will need to check
> > > the whole file?  Or will Joern's fpos proposal fix this?
> > 
> > Yes, the original idea is you have to check every file that "covers" a
> > tile in its entirety. With Joern's fpos piece, I think we can restrict
> > our checks to just the section of the file that covers the tile.
> 
> Hrm.  Can you help me understand how you would check i_size then?

That's pretty straightforward, I think. When we check an inode, we
have to check whether it has a block that corresponds with i_size, and
none beyond that.

That begs the question of when we check various pieces of data. It
seems the best time to check the various elements of an inode is when
we're checking the tile it lives on. This is when we'd check i_size,
that link counts made sense and that the ring of hardlinks was
correct, etc. 

We would also check that direct and indirect pointers were sensible
(ie pointing to data blocks on the disk). If so, we know we'll
eventually verify those pointers when we check the corresponding back
pointers from those blocks.

Directory checks are a bit more problematic. But I think we can
trigger a directory check each time we hit a tile data block that's
part of a directory. Keeping a small cache of checked directories will
keep this from being expensive.

We will, unfortunately, need to be able to check an entire directory
at once. There's no other efficient way to assure that there are no
duplicate names in a directory, for instance.

In summary, checking a tile requires trivial checks on all the inodes
and directories that point into a tile. Inodes, directories, and data
that are inside a tile get checked more thoroughly but still don't
need to do much pointer chasing.

-- 
Mathematics is the supreme nostalgia of our time.

  reply	other threads:[~2007-05-09 19:51 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-28 22:05 [RFC] TileFS - a proposal for scalable integrity checking Matt Mackall
2007-04-29 12:21 ` Jörn Engel
2007-04-29 12:57   ` Matt Mackall
2007-04-29 15:47     ` Jörn Engel
2007-05-09  5:56   ` Valerie Henson
2007-05-09 10:12     ` Jörn Engel
2007-04-29 15:58 ` Jörn Engel
2007-04-29 16:24   ` Matt Mackall
2007-04-29 16:34 ` Andi Kleen
2007-04-29 16:05   ` Jörn Engel
2007-04-29 16:09   ` Matt Mackall
2007-04-29 23:23 ` Theodore Tso
2007-04-30  1:40   ` Matt Mackall
2007-04-30 17:26     ` Theodore Tso
2007-04-30 17:59       ` Matt Mackall
2007-05-02 13:18         ` Jörn Engel
2007-05-02 13:32     ` Jörn Engel
2007-05-02 15:37       ` Matt Mackall
2007-05-02 16:35         ` Jörn Engel
2007-05-09  7:56     ` Valerie Henson
2007-05-09 11:16       ` Nikita Danilov
2007-05-09 18:56         ` Valerie Henson
2007-05-09 19:19           ` Nikita Danilov
2007-05-09 17:06       ` Matt Mackall
2007-05-09 18:59         ` Valerie Henson
2007-05-09 19:51           ` Matt Mackall [this message]
2007-05-10  0:03             ` Jörn Engel
2007-05-11  9:46             ` Valerie Henson
2007-05-11 15:55               ` Matt Mackall
2007-05-09 19:01     ` Valerie Henson
2007-05-09 20:05       ` Matt Mackall

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=20070509195141.GG11115@waste.org \
    --to=mpm@selenic.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=val_henson@linux.intel.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).