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

From: Riley Williams (rhw@InfraDead.Org)
Date: Sun Jul 07 2002 - 15:38:23 EST


Hi Linus.

> You can do it with direct disk access and knowledge of the FS
> internals, but it should not be all that hard to add some simple
> interface to get a "block usage byte array" kind of thing (more
> efficient than doing bmap on all files, _and_ can tell about blocks
> reserved for inodes, superblocks and other special uses), which
> together with a user-level interface to "preallocate" and your
> "relocate page" should actually make it possible to make a fairly
> FS-independent defragmenter.

Would I be right in thinking that this would be an array with three
possible values for each element...

        FIXED Block not movable.
        MOVABLE Block in use and movable.
        UNUSED Block not in use.

...with the defragmenter basically exchanging MOVABLE and UNUSED blocks
to get the files in an unfragmented state. The FIXED value would handle
things like the superblock, inode blocks and other special uses, and all
other blocks would be either MOVABLE or UNUSED as appropriate.

Another option might be to split MOVABLE into DIRECTORY and FILE values
instead, but whether that would be useful is questionable at best.

> Add a nice graphical front-end, and you can make it a useful
> screen-saver.

As long as it runs on systems without X-windows available rather than
being limited to only run under X... My preference would be for a tool
similar to `make menuconfig` for this sort of utility.

Best wishes from Riley.

-
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/



This archive was generated by hypermail 2b29 : Sun Jul 07 2002 - 22:00:18 EST