On Wed, Jul 4, 2012 at 8:27 PM, Alex Lyakas
<alex.bolshoy.bt...@gmail.com> wrote:
> Hi Alex,
>
>> + spin_lock(&left_root->root_times_lock);
>> + ctransid =
>> btrfs_root_ctransid(&left_root->root_item);
>> + spin_unlock(&left_root->root_times_lock);
>> + if (ctransid != left_start_ctransid)
>> + left_start_ctransid = 0;
>> +
>> + spin_lock(&right_root->root_times_lock);
>> + ctransid =
>> btrfs_root_ctransid(&right_root->root_item);
>> + spin_unlock(&right_root->root_times_lock);
>> + if (ctransid != right_start_ctransid)
>> + left_start_ctransid = 0;
> Shouldn't it be here right_start_ctransid=0? Otherwise,
> right_start_ctransid is pretty useless in this function.
>
Hmm you're right, it should be right_start_ctransid. However...the
code was working by accident because the next if does check for left
and right :)
Fixed that in my git repo.
>> +
>> + if (!left_start_ctransid || !right_start_ctransid) {
>> + WARN(1, KERN_WARNING
>> + "btrfs: btrfs_compare_tree detected "
>> + "a change in one of the trees while "
>> + "iterating. This is probably a "
>> + "bug.\n");
>> + ret = -EIO;
>> + goto out;
>> + }
>
> I am reading the code have more questions (and comments), but will
> send them all later.
>
> Alex.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html