Message ID | cover.1681939107.git.josef@toxicpanda.com (mailing list archive) |
---|---|
Headers | show |
Series | btrfs-progs: prep work for syncing ctree.c | expand |
On Wed, Apr 19, 2023 at 05:20:40PM -0400, Josef Bacik wrote: > Hello, > > These patches update a lot of the different ctree.c related helpers that have > diverged from the kernel in order to make ite easier syncing ctree.c directly. > This also syncs locking.[ch], but this is to just stub out the locking. This > will make it easier to sync ctree.c as well since there's locking in the kernel > that didn't exist when we had this in btrfs-progs. > > This series depends on > > btrfs-progs: prep work for syncing files into kernel-shared > btrfs-progs: sync basic code from the kernel > > Thanks, > > Josef > > Josef Bacik (10): > btrfs-progs: const-ify the extent buffer helpers > btrfs-progs: bring root->state into btrfs-progs > btrfs-progs: rename btrfs_alloc_free_block to btrfs_alloc_tree_block > btrfs-progs: sync locking.h and stub out all the helpers > btrfs-progs: add btrfs_locking_nest to btrfs_alloc_tree_block > btrfs-progs: add some missing extent buffer helpers > btrfs-progs: rename btrfs_set_block_flags -> > btrfs_set_disk_extent_flags > btrfs-progs: cleanup args for btrfs_set_disk_extent_flags > btrfs-progs: rename clear_extent_buffer_dirty => > btrfs_clear_buffer_dirty > btrfs-progs: make __btrfs_cow_block static Added to devel. However, this fails build on Centos7 image with warnings like [CC] kernel-shared/backref.o In file included from ./kernel-shared/ctree.h:30:0, from kernel-shared/volumes.h:23, from btrfs.c:24: ./kernel-shared/accessors.h: In function 'btrfs_device_total_bytes': ./kernel-shared/accessors.h:118:58: error: expected ',' before ')' token sizeof(((struct btrfs_dev_item *)0))->total_bytes); ^ ./kernel-shared/accessors.h: In function 'btrfs_set_device_total_bytes': ./kernel-shared/accessors.h:132:58: error: expected ',' before ')' token sizeof(((struct btrfs_dev_item *)0))->total_bytes); ^ The code is same as in kernel e.g. 114 static inline u64 btrfs_device_total_bytes(const struct extent_buffer *eb, 115 struct btrfs_dev_item *s) 116 { 117 static_assert(sizeof(u64) == 118 sizeof(((struct btrfs_dev_item *)0))->total_bytes); 119 return btrfs_get_64(eb, s, offsetof(struct btrfs_dev_item, 120 total_bytes)); 121 }