Thread (10 messages) 10 messages, 5 authors, 2021-11-07

Re: [PATCH 0/2] btrfs: cleanup on btrfs_super_block definition

From: Josef Bacik <josef@toxicpanda.com>
Date: 2021-10-19 14:08:24

On Tue, Oct 19, 2021 at 07:29:23PM +0800, Qu Wenruo wrote:
This patch is to enhance the definition of btrfs_super_block by:

- Unify sizeof(struct btrfs_super_block) and BTRFS_SUPER_INFO_SIZE
  In kernel, it's just 3 location allocating BTRFS_SUPER_INFO_SIZE
  (one of them is for selftest), so such change is not doing much
  difference.
  But for btrfs-progs, it would remove call sites like:

        char tmp[BTRFS_SUPER_INFO_SIZE];
        struct btrfs_super_block *buf = (struct btrfs_super_block *)tmp;
 
- Move btrfs_super_block definition to uapi/linux/btrfs_tree.h.
  Due to BTRFS_IOC_TREE_SEARCH ioctl, we're almost exposing all on-disk
  formats to the user space.
  Thus it's almost a perfect location to contain all on-disk schema.

Qu Wenruo (2):
  btrfs: make sizeof(struct btrfs_super_block) to match
    BTRFS_SUPER_INFO_SIZE
  btrfs: move btrfs_super_block to uapi/linux/btrfs_tree.h
Reviewed-by: Josef Bacik <josef@toxicpanda.com>

Thanks,

Josef
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help