]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Populate ->orig_block_len during read_one_chunk
authorNikolay Borisov <nborisov@suse.com>
Mon, 25 Mar 2019 12:31:25 +0000 (14:31 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 29 Apr 2019 17:02:36 +0000 (19:02 +0200)
commit69d0a85f4d3be242ae3dd2bcd7afd941e9f1b612
treec68bb6893d4929858a1f310e4401cc48d2bf9681
parent08b7dcf67034af3270147d2eeb2697a4ff0e0af2
btrfs: Populate ->orig_block_len during read_one_chunk

Chunks read from disk currently don't get their ->orig_block_len member
set, in contrast when a new chunk is allocated, the respective
extent_map's ->orig_block_len is assigned the size of the stripe of this
chunk.

Let's apply the same strategy for chunks which are read from
disk, not only does this codify the invariant that ->orig_block_len
always contains the size of the stripe for a chunk (when the em belongs
to the mapping tree). But it's also a preparatory patch for further work
around tracking chunk allocation in an extent tree rather than
pinned/pending lists.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c