On Mon, Mar 16, 2015 at 03:34:12PM -0600, Andreas Dilger wrote: > I wonder if something more lightweight could be added to avoid this > problem? For example, we only care about this case if it has been > going on for more than the lazytime interval (about a day), so the > inode could store a 16-bit i_dirtied_time_when that is approximately > (jiffies >> bits_in_a_half_a_day) and only check time_after() that. > The __u16 could fit into some existing hole (e.g. after i_bytes on my > kernel) and avoid expanding the size of the inode at all. > > The remaining high bits of i_dirtied_time_when would be irrelevant, since > a __u16 of half-days is about 80 years, so it would be enough to compare: > > > time_after(i_dirtied_time_when, (__u16)(jiffies >> bits_in_half_a_day)) That won't work correctly; we'd have to do something like this #define u16_after(a,b) (typecheck(__u16, a) && typecheck(__u16, b) && \ ((__s16)((b) - (a)) < 0)) > Minor issue, is there a good reason why dirtied_time_when doesn't have an > "i_" prefix? It's because dirtied_when also doesn't have an i_ prefix, but arguably it should. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html