mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-23 23:59:22 +00:00
Add dprintfs to report chunk lookups
This commit is contained in:
1 parent
e8980227e8
commit
ec25b87d29
1 file changed
+12
@@ -589,6 +589,8 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data,
|
|||||||
struct grub_btrfs_key key_out;
|
struct grub_btrfs_key key_out;
|
||||||
int challoc = 0;
|
int challoc = 0;
|
||||||
grub_device_t dev;
|
grub_device_t dev;
|
||||||
|
grub_dprintf ("btrfs", "searching for laddr %" PRIxGRUB_UINT64_T "\n",
|
||||||
|
addr);
|
||||||
for (ptr = data->sblock.bootstrap_mapping;
|
for (ptr = data->sblock.bootstrap_mapping;
|
||||||
ptr < data->sblock.bootstrap_mapping
|
ptr < data->sblock.bootstrap_mapping
|
||||||
+ sizeof (data->sblock.bootstrap_mapping)
|
+ sizeof (data->sblock.bootstrap_mapping)
|
||||||
@@ -647,6 +649,16 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data,
|
|||||||
unsigned redundancy = 1;
|
unsigned redundancy = 1;
|
||||||
unsigned i, j;
|
unsigned i, j;
|
||||||
|
|
||||||
|
grub_dprintf ("btrfs", "chunk 0x%" PRIxGRUB_UINT64_T
|
||||||
|
"+0x%" PRIxGRUB_UINT64_T
|
||||||
|
" (%d stripes (%d substripes) of %"
|
||||||
|
PRIxGRUB_UINT64_T ")\n",
|
||||||
|
grub_le_to_cpu64 (key->offset),
|
||||||
|
grub_le_to_cpu64 (chunk->size),
|
||||||
|
grub_le_to_cpu16 (chunk->nstripes),
|
||||||
|
grub_le_to_cpu16 (chunk->nsubstripes),
|
||||||
|
grub_le_to_cpu64 (chunk->stripe_length));
|
||||||
|
|
||||||
switch (grub_le_to_cpu64 (chunk->type)
|
switch (grub_le_to_cpu64 (chunk->type)
|
||||||
& ~GRUB_BTRFS_CHUNK_TYPE_BITS_DONTCARE)
|
& ~GRUB_BTRFS_CHUNK_TYPE_BITS_DONTCARE)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user