LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andreas Dilger <adilger@clusterfs.com>
To: david@lang.hm
Cc: "Theodore Ts'o" <tytso@mit.edu>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] ext4 update
Date: Thu, 18 Oct 2007 00:29:06 -0600	[thread overview]
Message-ID: <20071018062906.GP8122@schatzie.adilger.int> (raw)
In-Reply-To: <Pine.LNX.4.64.0710162149470.1538@asgard.lang.hm>

On Oct 16, 2007  21:51 -0700, david@lang.hm wrote:
> On Wed, 17 Oct 2007, Theodore Ts'o wrote:
> >It has a number random cleanups and bug fixes, and two new features.
> >The first is uninitialized block groups, which allows fast mke2fs
> >operations plus as well as speeding up e2fsck by allowing it to skip
> >parts of the inode tables that haven't been used yet.
> 
> nice feature, is there any work on a tool to go through a well-used 
> filesystem and mark unused block groups as uninitialized? (I would guess 
> that such a tool may want to move files to make this so)

Yes, just set the feature flag via tune2fs and then run e2fsck on it.
The second e2fsck shown below is just a demonstration of the speedup.

    # tune2fs -O uninit_groups /dev/foo
    tune2fs 1.39.cfs9 (7-Apr-2007)

    Please run e2fsck on the filesystem.

    # time e2fsck -fy /dev/foo
    e2fsck 1.39.cfs9 (7-Apr-2007)
    Group descriptor 0 checksum is invalid.  Fix? yes

    {repeats for all groups}

    Pass 1: Checking inodes, blocks, and sizes
    Pass 2: Checking directory structure
    Pass 3: Checking directory connectivity
    Pass 4: Checking reference counts
    Pass 5: Checking group summary information
    lustre-OST0000: 9099/1640160 files (0.4% non-contiguous), 221996/6554520
    blocks

    real    0m17.273s
    user    0m4.930s
    sys     0m1.749s

    # time e2fsck -fy /dev/hda3
    e2fsck 1.39.cfs9 (7-Apr-2007)
    Pass 1: Checking inodes, blocks, and sizes
    Pass 2: Checking directory structure
    Pass 3: Checking directory connectivity
    Pass 4: Checking reference counts
    Pass 5: Checking group summary information
    lustre-OST0000: 9099/1640160 files (0.4% non-contiguous), 221996/6554520
    blocks

    real    0m2.412s
    user    0m0.604s
    sys     0m0.077s


The caveats are:
(a) this is a read-only feature, so you can't mount such a filesystem r/w
    on an older kernel.  You can disable it with "tune2fs -O ^uninit_groups"
    and run a full e2fsck on it again.
(b) I don't think there is an official e2fsprogs release with support for this
    feature yet (it's in the pipe, however).
(c) The actual speedup depends on how full the filesystem is, but since ext*
    usually has way too many inodes, it is generally pretty good.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.


  reply	other threads:[~2007-10-18  6:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-17  4:26 Theodore Ts'o
2007-10-17  4:51 ` david
2007-10-18  6:29   ` Andreas Dilger [this message]
2007-10-17 15:59 ` Linus Torvalds
2007-10-17 22:55   ` Theodore Tso
2007-10-25 23:31   ` Andrew Morton
2007-10-25 23:44     ` Linus Torvalds
2007-10-25 23:53       ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2008-04-30  2:45 Theodore Ts'o
2008-02-25 22:47 Theodore Ts'o
2008-02-10  6:33 Theodore Ts'o
2008-01-29  5:50 Theodore Ts'o
2008-01-29 12:53 ` Theodore Tso
2008-01-29 21:54   ` Jan Engelhardt
2008-01-30  7:11     ` Theodore Tso
2008-01-30  8:38       ` Paul Collins
2008-01-30  8:52       ` Linus Torvalds
2007-07-18 13:42 Theodore Ts'o

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=20071018062906.GP8122@schatzie.adilger.int \
    --to=adilger@clusterfs.com \
    --cc=david@lang.hm \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --subject='Re: [GIT PULL] ext4 update' \
    /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

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).