On Wed, May 16, 2018 at 2:43 PM, Nikolay Borisov <nborisov@xxxxxxxx> wrote:
>
>
> On 15.05.2018 20:52, Liu Bo wrote:
>> In read_block_for_search(), it's straightforward to use
>> extent_buffer_uptodate() instead since 0 is passed as parent transid to
>
> "instead of the more heavyweight btrfs_buffer_update"
>
I don't think it's about heavyweight, they're actually equivalent in this case.
I just want to reduce the burden of reading these code as
verify_parent_transid() really has some corner cases to think about.
>> btrfs_buffer_uptodate(), which means the check for parent transid is not
>> needed.
>>
>> Signed-off-by: Liu Bo <bo.liu@xxxxxxxxxxxxxxxxx>
>
> Codewise LGTM:
>
> Reviewed-by: Nikolay Borisov <nborisov@xxxxxxxx>
Thanks for taking a look at this.
thanks,
liubo
>> ---
>> fs/btrfs/ctree.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
>> index 9fa3d77c98d4..a96d308c51b8 100644
>> --- a/fs/btrfs/ctree.c
>> +++ b/fs/btrfs/ctree.c
>> @@ -2445,7 +2445,7 @@ noinline void btrfs_unlock_up_safe(struct btrfs_path *path, int level)
>> * and give up so that our caller doesn't loop forever
>> * on our EAGAINs.
>> */
>> - if (!btrfs_buffer_uptodate(tmp, 0, 0))
>> + if (!extent_buffer_uptodate(tmp))
>> ret = -EIO;
>> free_extent_buffer(tmp);
>> } else {
>>
> --
> 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
--
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