On 14.03.2011 00:50, Ilya Dryomov wrote:
On Sat, Mar 12, 2011 at 03:50:42PM +0100, Arne Jansen wrote:
This is the main scrub code.
+ int nstripes;
It should be u64 nstripes. A few lines below you assign the stripe
length, it is a 64 bit quantity, also do_div() expects a 64 bit
dividend. This fixes a serious breakage on x86-32.
Thanks.
Overall, this function could use a good cleanup. I can send you a patch
later unless you want to do it yourself.
Which parts do you have in mind? I see only potential for minor cleanup,
but as I wrote it, I might as well be blind to it ;) So when you
send the patch I'll probably see what you mean.
The part I'm not content with is the prefetching, as it is still too
slow.
+ int start_stripe;
+ struct extent_buffer *l;
+ struct btrfs_key key;
+ u64 physical;
+ u64 logical;
+ u64 generation;
+ u64 mirror_num;
And a minor thing on the whole series: u64 should be printed with %llu
and explicit casting to unsigned long long.
fixed.
Thanks,
Ilya
--
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html