From: <saranyag@cdac.in>
To: <linux-btrfs@vger.kernel.org>
Subject: Logical to Physical Address Mapping/Translation in Btrfs
Date: Tue, 19 Dec 2023 16:59:54 +0530 [thread overview]
Message-ID: <000b01da326e$b054cdb0$10fe6910$@cdac.in> (raw)
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.
------------------------------------------------------------------------------------------------------------
next reply other threads:[~2023-12-19 11:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 11:29 saranyag [this message]
2023-12-19 22:20 ` Logical to Physical Address Mapping/Translation in Btrfs Qu Wenruo
2023-12-20 7:24 ` Andrei Borzenkov
2023-12-20 8:51 ` Qu Wenruo
-- strict thread matches above, loose matches on Subject: below --
2023-12-19 18:55 saranyag
2023-12-19 8:00 ` Andrei Borzenkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000b01da326e$b054cdb0$10fe6910$@cdac.in' \
--to=saranyag@cdac.in \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox