Re: [PATCH u-boot] fs: btrfs: do not fail when offset of a ROOT_ITEM is not -1

2021-03-01 Thread Tom Rini
On Tue, Feb 09, 2021 at 06:33:37PM +0100, Marek Behún wrote: > When the btrfs_read_fs_root() function is searching a ROOT_ITEM with > location key offset other than -1, it currently fails via BUG_ON. > > The offset can have other value than -1, though. This can happen for > example if a subvolume

Re: [PATCH u-boot] fs: btrfs: do not fail when offset of a ROOT_ITEM is not -1

2021-02-10 Thread Qu Wenruo
On 2021/2/11 上午12:21, Marek Behun wrote: On Wed, 10 Feb 2021 09:20:11 +0800 Qu Wenruo wrote: You're correct, the kernel is using new schema, btrfs_get_fs_root(), which only requires root objectid and completely get rid of the offset/type, which is far less possible to call with wrong parame

Re: [PATCH u-boot] fs: btrfs: do not fail when offset of a ROOT_ITEM is not -1

2021-02-10 Thread Marek Behun
On Wed, 10 Feb 2021 09:20:11 +0800 Qu Wenruo wrote: > You're correct, the kernel is using new schema, btrfs_get_fs_root(), > which only requires root objectid and completely get rid of the > offset/type, which is far less possible to call with wrong parameters. > > It would be a good timing to

Re: [PATCH u-boot] fs: btrfs: do not fail when offset of a ROOT_ITEM is not -1

2021-02-09 Thread Qu Wenruo
On 2021/2/10 上午9:05, Marek Behun wrote: On Wed, 10 Feb 2021 08:09:14 +0800 Qu Wenruo wrote: On 2021/2/10 上午1:33, Marek Behún wrote: When the btrfs_read_fs_root() function is searching a ROOT_ITEM with location key offset other than -1, it currently fails via BUG_ON. The offset can have ot

Re: [PATCH u-boot] fs: btrfs: do not fail when offset of a ROOT_ITEM is not -1

2021-02-09 Thread Marek Behun
On Wed, 10 Feb 2021 08:09:14 +0800 Qu Wenruo wrote: > On 2021/2/10 上午1:33, Marek Behún wrote: > > When the btrfs_read_fs_root() function is searching a ROOT_ITEM with > > location key offset other than -1, it currently fails via BUG_ON. > > > > The offset can have other value than -1, though. Thi

Re: [PATCH u-boot] fs: btrfs: do not fail when offset of a ROOT_ITEM is not -1

2021-02-09 Thread Qu Wenruo
On 2021/2/10 上午1:33, Marek Behún wrote: When the btrfs_read_fs_root() function is searching a ROOT_ITEM with location key offset other than -1, it currently fails via BUG_ON. The offset can have other value than -1, though. This can happen for example if a subvolume is renamed: $ btrfs su

[PATCH u-boot] fs: btrfs: do not fail when offset of a ROOT_ITEM is not -1

2021-02-09 Thread Marek Behún
When the btrfs_read_fs_root() function is searching a ROOT_ITEM with location key offset other than -1, it currently fails via BUG_ON. The offset can have other value than -1, though. This can happen for example if a subvolume is renamed: $ btrfs subvolume create X && sync Create subvolume '.