Re: [PATCH 005 of 9] md: Replace magic numbers in sb_dirty with welldefined bit flags

From: Bill Davidsen
Date: Tue Aug 01 2006 - 12:56:06 EST

Ingo Oeser wrote:

Hi Neil,

I think the names in this patch don't match the description at all.
May I suggest different ones?

On Monday, 31. July 2006 09:32, NeilBrown wrote:

Instead of magic numbers (0,1,2,3) in sb_dirty, we have
some flags instead:
Some device state has changed requiring superblock update
on all devices.


I think STALE is better, it is unambigous.

The array has transitions from 'clean' to 'dirty' or back,
requiring a superblock update on active devices, but possibly
not on spares

Maybe split this into MD_SB_DIRTY and MD_SB_CLEAN ?

I don't think the split is beneficial, but I don't care for the name much. Some name like SB_UPDATE_NEEDED or the like might be better.

A superblock update is underway.


I would have said UPDATE_PENDING, but either is more descriptive than the original.

Neil - the logic in this code is pretty complex, all the help you can give the occasional reader, by using very descriptive names for things, is helpful to the reader and reduces your "question due to misunderstanding" load.

bill davidsen <davidsen@xxxxxxx>
CTO TMR Associates, Inc
Doing interesting things with small computers since 1979

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at