On Jul 05, 2007  11:11 -0700, Badari Pulavarty wrote:
> @@ -1131,17 +1134,22 @@ static int ext2_statfs (struct dentry * 
>       buf->f_bfree = ext2_count_free_blocks(sb);
> +     es->s_free_blocks_count = cpu_to_le32(buf->f_bfree);
>       buf->f_ffree = ext2_count_free_inodes(sb);
> +     es->s_free_inodes_count = cpu_to_le32(buf->f_ffree);

Hmm, this is still sub-optimal.  For ext3 and ext4 it just uses
percpu_counter_sum() instead of the slow ext*_count_free_blocks(), which
walks all of the groups.  Not that this is a reason to hold this patch,
because at least we are removing 1/2 of the overhead for ext2.

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

-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to