[PATCH v2] staging: zcache: support multiple clients, prep for KVM and RAMster

Dan Magenheimer dan.magenheimer at oracle.com
Thu Jun 30 23:28:14 UTC 2011


> > +	for (i = 0; i <= NCHUNKS - 1; i++) {
> 
> It's more common to write the condition as:  i < NCHUNKS.
> 
> > +		n = zv_curr_dist_counts[i];
> 
> zv_curr_dist_counts has NCHUNKS + 1 elements so we never print
> display the final element.  I don't know this coe, so I could be
> wrong but I think that we could make zv_curr_dist_counts only hold
> NCHUNKS elements.
> 
> > +	for (i = 0; i <= NCHUNKS - 1; i++) {
> 
> Same situation.

Hi Dan --

Thanks for the careful review.  You're right... some
of this was leftover from debugging an off-by-one error,
though the code as is still works.

OTOH, there's a good chance that much of this sysfs
code will disappear before zcache would get promoted
out of staging, since it is to help those experimenting
with zcache to get more insight into what the underlying
compression/accept-reject algorithms are doing.

So I hope you (and GregKH) are OK that another version is
not necessary at this time to fix these.

Thanks,
Dan



More information about the devel mailing list