Re: [U-Boot] [PATCH] fs: btrfs: Fix wrong comparison in logical to physical mapping

2018-07-04 Thread Marek Behun
On Wed, 4 Jul 2018 17:48:30 + Joakim Tjernlund wrote: > maybe logical >= item->logical + item->length ? You're right, i did it correctly in the commit message but not in the code :) ___ U-Boot mailing list

Re: [U-Boot] [PATCH] fs: btrfs: Fix wrong comparison in logical to physical mapping

2018-07-04 Thread Joakim Tjernlund
On Wed, 2018-07-04 at 19:10 +0200, Marek BehĂșn wrote: > CAUTION: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > > The comparison > logical > item->logical + item->length > in

[U-Boot] [PATCH] fs: btrfs: Fix wrong comparison in logical to physical mapping

2018-07-04 Thread Marek BehĂșn
The comparison logical > item->logical + item->length in btrfs_map_logical_to_physical is wrong and should be instead logical >= item->logical + item->length For example, if item->logical = 4096 item->length = 4096 and we are looking for logical = 8192, it is not part of item (item is