在 2008-08-20三的 17:55 -0400,Theodore Tso写道: > On Wed, Aug 20, 2008 at 01:56:48PM -0700, Mingming Cao wrote: > > > BTW, I was looking at the percpu_counter interface, and I'm confused > > > why we have percpu_counter_sum_and_set() and percpu_counter_sum(). If > > > we're taking the fbc->lock to calculate the precise value of the > > > counter, why not simply set fbc->count? > > > > I added the percpu_count_sum_and _set() interface, when addingdelalloc > > block reservation. I agree it make sense to clean up current all the > > user of percpu_counter_sum() and replace with > > percpu_counter_sum_and_set(), just hasn't get chance to clean up yet. > > Why not make percpu_counter_sum() always do sum_and_set, and change > the ext4 calls to use percpu_counter_sum()? In fact, I'm wondering I will clean this up. > why you didn't do that in the first place? Was that your trying to be > as conservative as possible with respect to not changing things? Yeah, I think I am being over cautious, try not to impact to other user of percpu_counter_sum()... no more excuse:) Mingming > > - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html