Re: [PATCH] make ext4_valid_block_bitmap() more verbose

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andreas Dilger
Date: Friday, November 12, 2010 - 4:56 pm

On 2010-11-12, at 16:26, Bernd Schubert wrote:

Bernd,
thanks for sending this in.  I like the idea of making these messages more verbose, since they should rarely be hit and when they are it would be good to know why these checks failed.


The function name in the comment block does not actually match the function...


This message (while correct) is a bit confusing, since it implies there is something wrong with the inode bitmap block itself, rather than the the bit in the block bitmap.  I think it would be clearer to rewrite this as follows:

        "unset bit for inode bitmap: block %llu, bit %u"

for consistency we should then change the block bitmap error to match.

While we are changing this code, all of the ext4_test_bit() checks should be wrapped in unlikely(), since we should very rarely be seeing these errors.


Similarly, this implies that there is a bad inode table block, so I prefer:

        "unset bit for inode table block %u: block %llu, bit %u"

where the "inode table block" value is, I think, (next_zero_bit - offset)


It would probably be worthwhile to also print the block number of the bitmap itself.

Cheers, Andreas





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

Messages in current thread:
[PATCH] make ext4_valid_block_bitmap() more verbose, Bernd Schubert, (Fri Nov 12, 4:26 pm)
Re: [PATCH] make ext4_valid_block_bitmap() more verbose, Andreas Dilger, (Fri Nov 12, 4:56 pm)
Re: [PATCH] make ext4_valid_block_bitmap() more verbose, Eric Sandeen, (Mon Nov 15, 9:21 am)
Re: [PATCH] make ext4_valid_block_bitmap() more verbose, Bernd Schubert, (Mon Nov 15, 12:15 pm)
Re: [PATCH] make ext4_valid_block_bitmap() more verbose, Bernd Schubert, (Mon Nov 15, 12:22 pm)