[Ocfs2-tools-devel] [PATCH 9/9] fsck.ocfs2: Implement Pass 1D resolution of multiply-claimed clusters.
Tao Ma
tao.ma at oracle.com
Fri Jul 31 02:01:29 PDT 2009
Joel Becker wrote:
> On Fri, Jul 31, 2009 at 03:13:56PM +0800, Tao Ma wrote:
>> I just have one qs.
>> It seems that you cp/paste the whole content of a file regardless
>> the number of multiply-claimed clusters. So why not just CoW the
>> multiply-claimed ones? If we can do this, it is also helpful for
>> libocfs2 support for reflink and I think it is worthwhile.
>
> Because it's trivially correct. It involves no complex tree
> manipulations and doesn't actually modify the original until we're sure
> we have the space for it. fsck's goal is correctness more than anything
> else.
> Imagine I have 1GB of multiply claimed clusters in one extent.
> But I have a fragmented filesystem, and I can't allocate a new 1GB
> extent. I now have to do a lot of tree work to insert multiple extents
> in a CoW fashion, and I don't have CoW code yet.
> Also there is the problem of intermediate state. I have to
> remove that 1GB extent while I modify the tree, but then fsck can crash
> and lose file data. Here we can't have that happen.
> I will, of course, be adding CoW code for ocfs2_file_write()
> when I get back to refcount trees in the tools. But in my first pass, I
> won't be teaching fsck how to fix refcount trees. In the first, cut,
> fsck will validate refcount trees, but invalid ones will be removed and
> will drop the inodes into multiple claim resolution. It's not
> efficient, but it gives a correct result. It's going to be hard enough
> making sure I track all the refcounts of valid refcount trees!
> Later work may optimize this, but the first thing to do is have
> a correctly working solution.
OK, fair enough.
So sob for all the 9 patches.
Regards,
Tao
More information about the Ocfs2-tools-devel
mailing list