All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valerie Clement <valerie.clement@bull.net>
To: Alex Tomas <alex@clusterfs.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [RFC] ext4-locality-groups patch
Date: Wed, 13 Dec 2006 15:08:37 +0100	[thread overview]
Message-ID: <45800965.2080005@bull.net> (raw)
In-Reply-To: <m3vekwtqnp.fsf@bzzz.home.net>

Alex Tomas wrote:

> +/*
> + * entry function for inode syncing
> + * it's responsbility is to sort all inode out in their locality groups
> + */
> +void ext4_lg_sync_inodes(struct super_block *sb, struct writeback_control *wbc)
> +{
> +	struct ext4_sb_info *sbi = EXT4_SB(sb);
> +	struct ext4_locality_group *lg;
> +
> +	/* refill pending groups from s_dirty */
> +	spin_lock(&inode_lock);
> +	while (!list_empty(&sb->s_dirty)) {
> +		struct inode *inode = list_entry(sb->s_dirty.prev,
> +						struct inode, i_list);
> +		struct ext4_inode_info *ei = EXT4_I(inode);
> +
> +		lg = ei->i_locality_group;
> +		if (lg == NULL) {
> +			if (S_ISDIR(inode->i_mode) || i_size_read(inode) == 0) {
> +				if (atomic_read(&inode->i_count)) {
> +					/*
> +					 * The inode is clean, inuse
> +					 */
> +					list_move(&inode->i_list, &inode_in_use);
> +				} else {
> +					/*
> +					 * The inode is clean, unused
> +					 */
> +					list_move(&inode->i_list, &inode_unused);
> +				}
> +				continue;
> +			}
> +			/* XXX: atime changed ? */
> +			list_move(&inode->i_list, &inode_in_use);
> +			continue;
> +		}
> +
> +		/* move inode in proper locality group's dirty list */
> +		spin_lock(&lg->lg_lock);
> +		list_move_tail(&inode->i_list, &lg->lg_dirty);
> +		spin_unlock(&lg->lg_lock);
> +
> +		if (!test_and_set_bit(EXT4_LG_DIRTY, &lg->lg_flags))
> +			list_move(&lg->lg_list, &sbi->s_locality_dirty);
> +	}
> +	spin_unlock(&inode_lock);
> +
> +	ext4_lg_sync_groups(sb, wbc);
> +}
Hi Alex,
I did the following test:
# mkfs /dev/sdc1
# mount -t ext4dev -o extents,mballoc,delalloc /dev/sdc1 /test
# dumpe2fs -h /dev/sdc1
# cp linux.tar /test
# tar xf /test/linux.tar
# dumpe2fs -h /dev/sdc1

The "Free blocks" and "Free inodes" counters in the dumpe2fs output did 
not change after running the cp and tar commands.

I think it misses a call to ext4_commit_super() at the end of the 
ext4_lg_sync_inodes function.
Am I right ?

    Valérie

  parent reply	other threads:[~2006-12-13 14:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-30 23:56 [RFC] ext4-locality-groups patch Alex Tomas
2006-12-12 16:48 ` Valerie Clement
2006-12-12 16:58   ` Alex Tomas
2006-12-13 14:08 ` Valerie Clement [this message]
2006-12-13 14:21   ` Alex Tomas
2006-12-13 14:37     ` Valerie Clement
2006-12-13 14:51       ` Alex Tomas
2006-12-13 14:54       ` Alex Tomas
2006-12-13 15:02         ` Valerie Clement
2006-12-13 21:32           ` Andreas Dilger
2006-12-13 14:40     ` Eric Sandeen
2006-12-13 21:33       ` Andreas Dilger
2006-12-13 22:26         ` Eric Sandeen

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=45800965.2080005@bull.net \
    --to=valerie.clement@bull.net \
    --cc=alex@clusterfs.com \
    --cc=linux-ext4@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.