Re: [PATCH v3 3/6] btrfs: add scrub code and prototypes
From: Arne Jansen <hidden>
Date: 2011-03-14 09:57:05
On 14.03.2011 00:50, Ilya Dryomov wrote:
On Sat, Mar 12, 2011 at 03:50:42PM +0100, Arne Jansen wrote:quoted
This is the main scrub code.
quoted
+ 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.
quoted
+ 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, Ilyaquoted
--