public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* Logical to Physical Address Mapping/Translation in Btrfs
@ 2023-12-19 18:55 saranyag
  2023-12-19  8:00 ` Andrei Borzenkov
  0 siblings, 1 reply; 6+ messages in thread
From: saranyag @ 2023-12-19 18:55 UTC (permalink / raw)
  To: linux-btrfs

Hi,

May I know how the logical address is translated to the physical address in
Btrfs?

I have read the official documentation of Btrfs available here
(https://btrfs.readthedocs.io/en/latest/Introduction.html). It is not
covering the address translation part in detail.

I have also gone through the Btrfs source code
(https://github.com/torvalds/linux/tree/master/fs/btrfs). I could not figure
out the address translation from the code also.

After referring to the following functions, what I could understand is that
after getting the logical address of Chunk tree root from the superblock, we
need to convert it into the corresponding physical address for parsing into
the next level. 

int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices
*fs_devices, char *options)

int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info)

static int read_one_chunk(struct btrfs_key *key, struct extent_buffer
*leaf,  struct btrfs_chunk *chunk)

Any hints or pointers to the documentation on this is greatly appreciated.


Thanks in advance
Saranya G
CDAC



------------------------------------------------------------------------------------------------------------
[ C-DAC is on Social-Media too. Kindly follow us at:
Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]

This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
------------------------------------------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Logical to Physical Address Mapping/Translation in Btrfs
@ 2023-12-19 11:29 saranyag
  2023-12-19 22:20 ` Qu Wenruo
  0 siblings, 1 reply; 6+ messages in thread
From: saranyag @ 2023-12-19 11:29 UTC (permalink / raw)
  To: linux-btrfs

Hi,

May I know how the logical address is translated to the physical address in
Btrfs?

I have read the official documentation of Btrfs available here
(https://btrfs.readthedocs.io/en/latest/Introduction.html). It is not
covering the address translation part in detail.

I have also gone through the Btrfs source code
(https://github.com/torvalds/linux/tree/master/fs/btrfs). I could not figure
out the address translation from the code also.

After referring to the following functions, what I could understand is that
after getting the logical address of Chunk tree root from the superblock, we
need to convert it into the corresponding physical address for parsing into
the next level. 

int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices
*fs_devices, char *options)

int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info)

static int read_one_chunk(struct btrfs_key *key, struct extent_buffer
*leaf,  struct btrfs_chunk *chunk)

Any hints or pointers to the documentation on this is greatly appreciated.
I want to know the implementation part in btrfs-progs/source code.

Thanks in advance
Saranya G
CDAC



------------------------------------------------------------------------------------------------------------
[ C-DAC is on Social-Media too. Kindly follow us at:
Facebook: https://www.facebook.com/CDACINDIA & Twitter: @cdacindia ]

This e-mail is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies and the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
is strictly prohibited and appropriate legal action will be taken.
------------------------------------------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-12-20  8:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-19 18:55 Logical to Physical Address Mapping/Translation in Btrfs saranyag
2023-12-19  8:00 ` Andrei Borzenkov
  -- strict thread matches above, loose matches on Subject: below --
2023-12-19 11:29 saranyag
2023-12-19 22:20 ` Qu Wenruo
2023-12-20  7:24   ` Andrei Borzenkov
2023-12-20  8:51     ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox