Re: [patch 12/16] fix race between writeback and unlink

Andrew Morton (akpm@zip.com.au)
Tue, 04 Jun 2002 13:40:02 -0700


Linus Torvalds wrote:
>
> ...
> I'd still love to see a "fast and slightly stupid" allocator for both
> blocks and inodes, and have some infrastructure to do run-time defragging
> in the background.
>

I think runtime defrag could yield really good benefits. In
particular it would allow us to find_group_dir(), and always
put directories in the same blockgroup as their parent (big
speedups for the `untar-a-kernel-tree' workload).

There's a patch at
http://www.zip.com.au/~akpm/linux/patches/2.4/2.4.19-pre10/ext3-reloc-page.patch
which provides a simple `relocate page' ioctl for ext3 files. It
relocates a page's blocks. The operation is fully journalled and
pagecache-coherent. So you can turn off the power in the middle
of a defrag operation and the fs will come back just fine. It doesn't
make any attempt to relocate inodes. If the page relocation attempt fails
then it just returns -EAGAIN and userspace gets to worry about what
to do.

I simply have not had the time to do anything about the userspace
program which drives that ioctl. So if there's anyone out there
who has a little time on their hands...

-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/