Messages in this thread | | | Date | Fri, 23 Apr 2010 13:05:02 -0800 | From | Kent Overstreet <> | Subject | Re: [RFC][PATCH] bcache: ver 3 |
| |
On 04/23/2010 12:39 PM, Randy Dunlap wrote:
>> +#define label(l, foo) if (0) { l: foo; } > > I'd prefer that macro to go away.
I kind of like it, the way I use it it's shorthand for "return with x status"; it just makes return codes and exiting cleaner. But if you still hate it after you've read the functions where it's used, I can take it out.
>> + return d[i / keys_per_page] + (i % keys_per_page); > > That builds OK on i386? or does it need udivdi3() and/or umoddi3()?
If my understanding is correct, those are only needed for 64 bits, i indexes into a single node so 32 bits is plenty.
> >> +} > >> +static int lookup_dev(struct cache_device *c, struct bio *bio) >> +{ >> + int dev; >> + for (dev = 0; dev< 256; dev++) > > Use a macro for 256.. in lots of places.
Yes, definitely.
> bcache: cannot allocate memory > "kmalloc error" sounds like kmalloc() had an internal error.
Agreed.
> Need to document the sysfs interfaces:
Ok, I'll start on that.
>> + err = "vmalloc error"; > > "cannot vmalloc memory";
Done.
| |