From: "Jörn Engel" <joern@lazybastard.org>
To: Matt Mackall <mpm@selenic.com>
Cc: Valerie Henson <val_henson@linux.intel.com>,
Theodore Tso <tytso@mit.edu>,
linux-fsdevel@vger.kernel.org
Subject: Re: [RFC] TileFS - a proposal for scalable integrity checking
Date: Thu, 10 May 2007 02:03:29 +0200 [thread overview]
Message-ID: <20070510000328.GA1257@lazybastard.org> (raw)
In-Reply-To: <20070509195141.GG11115@waste.org>
On Wed, 9 May 2007 14:51:41 -0500, Matt Mackall wrote:
> On Wed, May 09, 2007 at 11:59:23AM -0700, Valerie Henson wrote:
> >
> > 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.
i_size is indeed simple, but that got me thinking. i_blocks is a much
harder problem. Luckily it is almost the same problem as the free/used
block count for the filesystem. And again the solution would be to have
a tree structure and have a sub-total for each node in the tree.
Now, inodes already have a tree structure, the indirect blocks. So
indirect blocks would need to get an extra field somewhere to store how
many used blocks are below them somewhere. Only problem is: indirect
blocks have a nice power-of-two size and no spare space around.
> 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.
Yup. Checking i_size costs O(log(n)), i_count with above method is
O(log(n)) as well. The hardlink ring is O(number of links). For most
people that don't have a forest of hard-linked kernel trees around, that
should be fairly small as well.
I believe for large files it is important not to check the complete
file. We can divide&conquer the physical device, so we can do the same
with files. Although I wonder if that would require a dirty bit for
inodes as well.
> 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.
There is. As long as directories are in htree or similar format, that
is. Problem is the same as fast lookup.
Jörn
--
tglx1 thinks that joern should get a (TM) for "Thinking Is Hard"
-- Thomas Gleixner
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2007-05-10 0:07 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
2007-05-10 0:03 ` Jörn Engel [this message]
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=20070510000328.GA1257@lazybastard.org \
--to=joern@lazybastard.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mpm@selenic.com \
--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).