[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/9] btrfs: add support for reading a filesystem with a RAID
Re: [PATCH 1/9] btrfs: add support for reading a filesystem with a RAID 5 or RAID 6 profile.
Fri, 1 Jun 2018 20:50:32 +0200
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0
my comments below
On 05/30/2018 12:07 PM, Daniel Kiper wrote:
> On Wed, May 16, 2018 at 08:48:11PM +0200, Goffredo Baroncelli wrote:
>> Signed-off-by: Goffredo Baroncelli <address@hidden>
>> + * off -> logical address to read (from the beginning of the
>> + * chunk space)
> What do you mean by "chunk"? Is it e.g. A1 + B1 region? Please make it
> clear what do you mean by "chunk".
Chunk is a very pervasive concept in BTRFS. A reader who looks to a BTRFS
raid code, must know very well this concepts. I am not sure that GRUB code
is the right place to contain a full BTRFS chunk description.
Basically, the BTRFS logical space is mapped to the physical one via the
chunks (aka block group). Each chunk maps a range of the logical address to a
range in the disk(s). If more disks are involved, different profile
might be used (linear, raid0... raid5/6). E.g.: a chunk maps a logical
address (say 0.1GB) to a physical address (say 1GB..2GB of disk1, 3GB..to
4GB of disk2, in raid1 mode).
The chunks are a low layer. All the BTRFS metadata are in term of the
logical address (upper layer).
>> + /*
>> + * In the line below stripen is evaluated without considering
> s/In the line below //
>> + * the parities (0 for A1, A2, A3... 1 for B1, B2...);
>> + */
>> + high = grub_divmod64 (stripe_nr, nstripes - nparities, &stripen);
>> + /*
>> + * In the line below stripen, now consider also the parities (0
> s/In the line below stripen, now/Now/
I think that "stripen" must be re-added
>> + * for A1, 1 for A2, 2 for A3....); the math is done "modulo"
> s/; the/. The/
>> + * number of disks
> Full stop at the end of sentence please.
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5
|[Prev in Thread]
||[Next in Thread]|
- Re: [PATCH 1/9] btrfs: add support for reading a filesystem with a RAID 5 or RAID 6 profile.,
Goffredo Baroncelli <=