• Qu Wenruo's avatar
    btrfs: reduce type width of btrfs_io_contexts · 4ced85f8
    Qu Wenruo authored
    That structure is our ultimate object for all __btrfs_map_block()
    related functions.  We have some hard to understand members, like
    tgtdev_map, but without any comments.
    
    This patch will improve the situation:
    
    - Add extra comments for num_stripes, mirror_num, num_tgtdevs and
      tgtdev_map[]
      Especially for the last two members, add a dedicated (thus very long)
      comments for them, with example to explain it.
    
    - Shrink those int members to u16.
      In fact our on-disk format is only using u16 for num_stripes, thus
      no need to use int at all.
    Signed-off-by: default avatarQu Wenruo <wqu@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    4ced85f8
volumes.c 219 KB