From: Tom Rini Date: Fri, 20 Jul 2018 18:34:35 -0400 Subject: [U-Boot] [U-Boot, v2] fs: btrfs: Fix wrong comparison in logical to physical mapping In-Reply-To: <20180704182301.13241-1-marek.behun@nic.cz> References: <20180704182301.13241-1-marek.behun@nic.cz> Message-ID: <20180720223435.GZ11755@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de On Wed, Jul 04, 2018 at 08:23:01PM +0200, Marek Beh=C3=BAn wrote: > The comparison > logical > item->logical + item->length > in btrfs_map_logical_to_physical is wrong and should be instead > logical >=3D item->logical + item->length > For example, if > item->logical =3D 4096 > item->length =3D 4096 > and we are looking for logical =3D 8192, it is not part of item (item is > [4096, 8191]). But the comparison is false and we think we have found > the correct item, although we should be searing in the right subtree. >=20 > This fixes some bugs I encountered. >=20 > Signed-off-by: Marek Behun Applied to u-boot/master, thanks! --=20 Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: