Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 7 Jul 2002 16:36:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 7 Jul 2002 16:36:16 -0400 Received: from imailg1.svr.pol.co.uk ([195.92.195.179]:18752 "EHLO imailg1.svr.pol.co.uk") by vger.kernel.org with ESMTP id ; Sun, 7 Jul 2002 16:36:15 -0400 Posted-Date: Sun, 7 Jul 2002 20:38:23 GMT Date: Sun, 7 Jul 2002 21:38:23 +0100 (BST) From: Riley Williams Reply-To: Riley Williams To: Linus Torvalds cc: Linux Kernel Subject: Re: [patch 12/16] fix race between writeback and unlink In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1672 Lines: 40 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/