Re: [RFC][PATCH] bcache: ver 3
From: Kent Overstreet
Date: Fri Apr 23 2010 - 17:05:16 EST
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/