[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 16 Mar 2010 12:48:03 -0600
From: Andreas Dilger <adilger@....com>
To: "Theodore Ts'o" <tytso@....edu>
Cc: "K. V K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
ext4 development <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH 2.6.27.y 04/11] ext4: Add percpu dirty block accounting.
On 2010-03-15, at 18:25, Theodore Ts'o wrote:
> int ext4_claim_free_blocks(struct ext4_sb_info *sbi,
> ext4_fsblk_t nblocks)
> {
> + if (free_blocks - (nblocks + root_blocks + dirty_blocks) <
> + EXT4_FREEBLOCKS_WATERMARK) {
> + free_blocks = percpu_counter_sum(fbc);
> + dirty_blocks = percpu_counter_sum(dbc);
> + if (dirty_blocks < 0) {
> + printk(KERN_CRIT "Dirty block accounting "
> + "went wrong %lld\n",
> + dirty_blocks);
Just looking at this old patch, and noticed this is still the same in
newer versions.
This should probably be either an ext4_error(), since it affects data
correctness, even though it isn't an on-disk error, or at least an
ext4_msg() so that it also prints the block device and uses the
standard ext4 error format.
As it stands, this error doesn't indicate that it is an ext4 error, or
which filesystem is involved, so it isn't very useful to the
sysadmin. I don't think it is needed for the .stable release, but
would be good for the next kernel.
In the first patch (ext4-claim-err.diff) the access to the superblock
for ext4_msg() is a bit of a hack, but I think it isn't terrible.
The second patch (ext4-error-cleanup.diff, to be used instead of the
first one) is a bit more thorough cleanup that changes the callers to
pass a struct super_block, and also removes some single-use stack
variables in related code.
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
Download attachment "ext4-claim-err.diff" of type "application/octet-stream" (740 bytes)
Download attachment "ext4-error-cleanup.diff" of type "application/octet-stream" (5673 bytes)
Powered by blists - more mailing lists