Message ID | cover.1734514696.git.wqu@suse.com (mailing list archive) |
---|---|
Headers | show |
Series | btrfs: migrate to "block size" to describe the | expand |
On Wed, Dec 18, 2024 at 08:11:16PM +1030, Qu Wenruo wrote: > [IMPEMENTATION] > To reduce the confusion, this patchset will do such a huge migration in > different steps: With some many changes everywhere this is going to make backports even more tedious. I think it would be best to do the conversion gradually or selectively to code that does not change so often. As you've split it to files we can first pick a few obvious ones (like file-item.c) or gather stats from stable.git. A quick and rough estimate for all 6.x.y releases counting file backports in the individual patches in the list below. This is period of 2 years, 104 weeks (roughly matching number of releases). So if there are 88 patches touching inode.c that's quite likely a conflict in every backport. This should be also correlated agains number of 'sectorsize' per file, so it many not be that bad, for example in ioctl.c there are only 4 occurences so that's fine. The point is we can't do the renames without some sensibility and respect to backports. 88 inode.c 62 disk-io.c 61 volumes.c 57 extent_io.c 57 block-group.c 56 ioctl.c 52 extent-tree.c 49 zoned.c 49 qgroup.c 37 send.c 36 super.c 33 ctree.c 30 transaction.c 29 file.c 28 tree-log.c 28 free-space-cache.c 26 scrub.c 24 ctree.h 22 relocation.c 19 delayed-inode.c 17 tree-checker.c 17 backref.c 15 space-info.c 14 extent_map.c 12 free-space-tree.c 12 disk-io.h 11 block-group.h 11 bio.c 10 ordered-data.c 10 block-rsv.c 9 ref-verify.c 9 file-item.c 9 btrfs_inode.h 8 include/uapi/linux/btrfs.h 8 fs.h 8 delayed-ref.c 8 delalloc-space.c 7 root-tree.c 7 print-tree.c 7 dir-item.c 7 dev-replace.c 7 block-rsv.h 6 sysfs.c 6 extent_io.h 6 defrag.c 6 compression.c 5 volumes.h 5 transaction.h 5 qgroup.h 5 export.c 4 zoned.h 4 space-info.h 4 reflink.c 4 inode-item.c 4 include/trace/events/btrfs.h 4 discard.c 4 delayed-ref.h 3 tree-log.h 3 tree-defrag.c 3 subpage.c 3 raid56.c 3 free-space-tree.h 3 extent-io-tree.c 3 extent-io-tests.c 3 backref.h 2 zlib.c 2 xattr.c 2 uuid-tree.c 2 tree-mod-log.c 2 tests/inode-tests.c 2 tests/extent-map-tests.c 2 tests/extent-buffer-tests.c 2 root-tree.h 2 relocation.h 2 rcu-string.h 2 qgroup-tests.c 2 lzo.c 2 locking.c 2 inode-item.h 2 free-space-cache.h 2 extent-tree.h 2 delayed-inode.h 1 tree-checker.h 1 tests/free-space-tree-tests.c 1 sysfs.h 1 props.c 1 ordered-data.h 1 messages.h 1 messages.c 1 include/uapi/linux/btrfs_tree.h 1 fs.c 1 file-item.h 1 extent_map.h 1 export.h 1 compression.h 1 btrfs-tests.c 1 btrfs.h 1 bio.h
在 2024/12/19 05:01, David Sterba 写道: > On Wed, Dec 18, 2024 at 08:11:16PM +1030, Qu Wenruo wrote: >> [IMPEMENTATION] >> To reduce the confusion, this patchset will do such a huge migration in >> different steps: > > With some many changes everywhere this is going to make backports even > more tedious. I think it would be best to do the conversion gradually or > selectively to code that does not change so often. As you've split it to > files we can first pick a few obvious ones (like file-item.c) or gather > stats from stable.git. For the backports, we can put the btrfs_fs_info union to older kernels and call it a day without the remaining part. So that both newer and older terminology can co-exist without any conflicts. Although backport conflicts will still happen in the context. > > A quick and rough estimate for all 6.x.y releases counting file > backports in the individual patches in the list below. This is period of > 2 years, 104 weeks (roughly matching number of releases). So if there > are 88 patches touching inode.c that's quite likely a conflict in every > backport. > > This should be also correlated agains number of 'sectorsize' per file, > so it many not be that bad, for example in ioctl.c there are only 4 > occurences so that's fine. The point is we can't do the renames without > some sensibility and respect to backports. But at least, when a backport fails, we can easily fix the conflict. It will always be sectorsize -> blocksize, either in the context or the modified lines. Thanks, Qu > > 88 inode.c > 62 disk-io.c > 61 volumes.c > 57 extent_io.c > 57 block-group.c > 56 ioctl.c > 52 extent-tree.c > 49 zoned.c > 49 qgroup.c > 37 send.c > 36 super.c > 33 ctree.c > 30 transaction.c > 29 file.c > 28 tree-log.c > 28 free-space-cache.c > 26 scrub.c > 24 ctree.h > 22 relocation.c > 19 delayed-inode.c > 17 tree-checker.c > 17 backref.c > 15 space-info.c > 14 extent_map.c > 12 free-space-tree.c > 12 disk-io.h > 11 block-group.h > 11 bio.c > 10 ordered-data.c > 10 block-rsv.c > 9 ref-verify.c > 9 file-item.c > 9 btrfs_inode.h > 8 include/uapi/linux/btrfs.h > 8 fs.h > 8 delayed-ref.c > 8 delalloc-space.c > 7 root-tree.c > 7 print-tree.c > 7 dir-item.c > 7 dev-replace.c > 7 block-rsv.h > 6 sysfs.c > 6 extent_io.h > 6 defrag.c > 6 compression.c > 5 volumes.h > 5 transaction.h > 5 qgroup.h > 5 export.c > 4 zoned.h > 4 space-info.h > 4 reflink.c > 4 inode-item.c > 4 include/trace/events/btrfs.h > 4 discard.c > 4 delayed-ref.h > 3 tree-log.h > 3 tree-defrag.c > 3 subpage.c > 3 raid56.c > 3 free-space-tree.h > 3 extent-io-tree.c > 3 extent-io-tests.c > 3 backref.h > 2 zlib.c > 2 xattr.c > 2 uuid-tree.c > 2 tree-mod-log.c > 2 tests/inode-tests.c > 2 tests/extent-map-tests.c > 2 tests/extent-buffer-tests.c > 2 root-tree.h > 2 relocation.h > 2 rcu-string.h > 2 qgroup-tests.c > 2 lzo.c > 2 locking.c > 2 inode-item.h > 2 free-space-cache.h > 2 extent-tree.h > 2 delayed-inode.h > 1 tree-checker.h > 1 tests/free-space-tree-tests.c > 1 sysfs.h > 1 props.c > 1 ordered-data.h > 1 messages.h > 1 messages.c > 1 include/uapi/linux/btrfs_tree.h > 1 fs.c > 1 file-item.h > 1 extent_map.h > 1 export.h > 1 compression.h > 1 btrfs-tests.c > 1 btrfs.h > 1 bio.h
On Thu, Dec 19, 2024 at 06:43:38AM +1030, Qu Wenruo wrote: > > > 在 2024/12/19 05:01, David Sterba 写道: > > On Wed, Dec 18, 2024 at 08:11:16PM +1030, Qu Wenruo wrote: > >> [IMPEMENTATION] > >> To reduce the confusion, this patchset will do such a huge migration in > >> different steps: > > > > With some many changes everywhere this is going to make backports even > > more tedious. I think it would be best to do the conversion gradually or > > selectively to code that does not change so often. As you've split it to > > files we can first pick a few obvious ones (like file-item.c) or gather > > stats from stable.git. > > For the backports, we can put the btrfs_fs_info union to older kernels > and call it a day without the remaining part. > > So that both newer and older terminology can co-exist without any conflicts. > > Although backport conflicts will still happen in the context. This is what I'm concerned about. If patches don't apply cleanly they're rejected from the automated stable workflow and have to be handled manually. > > A quick and rough estimate for all 6.x.y releases counting file > > backports in the individual patches in the list below. This is period of > > 2 years, 104 weeks (roughly matching number of releases). So if there > > are 88 patches touching inode.c that's quite likely a conflict in every > > backport. > > > > This should be also correlated agains number of 'sectorsize' per file, > > so it many not be that bad, for example in ioctl.c there are only 4 > > occurences so that's fine. The point is we can't do the renames without > > some sensibility and respect to backports. > > But at least, when a backport fails, we can easily fix the conflict. > It will always be sectorsize -> blocksize, either in the context or the > modified lines. Easily yes, but multiply that by number of failed patches and number of stable trees to backport. This takes time and currently the upstream backports are best-effort only, not all patches that fail to apply get manually backported. Enough that there are CVEs of everything and we have to care about them at $job so I'm not going to create more problems with backports than we already have just to fix a naming inconvenience.
在 2024/12/19 07:06, David Sterba 写道: > On Thu, Dec 19, 2024 at 06:43:38AM +1030, Qu Wenruo wrote: >> >> >> 在 2024/12/19 05:01, David Sterba 写道: >>> On Wed, Dec 18, 2024 at 08:11:16PM +1030, Qu Wenruo wrote: >>>> [IMPEMENTATION] >>>> To reduce the confusion, this patchset will do such a huge migration in >>>> different steps: >>> >>> With some many changes everywhere this is going to make backports even >>> more tedious. I think it would be best to do the conversion gradually or >>> selectively to code that does not change so often. As you've split it to >>> files we can first pick a few obvious ones (like file-item.c) or gather >>> stats from stable.git. >> >> For the backports, we can put the btrfs_fs_info union to older kernels >> and call it a day without the remaining part. >> >> So that both newer and older terminology can co-exist without any conflicts. >> >> Although backport conflicts will still happen in the context. > > This is what I'm concerned about. If patches don't apply cleanly they're > rejected from the automated stable workflow and have to be handled > manually. > >>> A quick and rough estimate for all 6.x.y releases counting file >>> backports in the individual patches in the list below. This is period of >>> 2 years, 104 weeks (roughly matching number of releases). So if there >>> are 88 patches touching inode.c that's quite likely a conflict in every >>> backport. >>> >>> This should be also correlated agains number of 'sectorsize' per file, >>> so it many not be that bad, for example in ioctl.c there are only 4 >>> occurences so that's fine. The point is we can't do the renames without >>> some sensibility and respect to backports. >> >> But at least, when a backport fails, we can easily fix the conflict. >> It will always be sectorsize -> blocksize, either in the context or the >> modified lines. > > Easily yes, but multiply that by number of failed patches and number of > stable trees to backport. This takes time and currently the upstream > backports are best-effort only, not all patches that fail to apply get > manually backported. Enough that there are CVEs of everything and we > have to care about them at $job so I'm not going to create more problems > with backports than we already have just to fix a naming inconvenience. > But I have to argue, that will only leave the problem untouched forever (even if it's just a naming scheme problem). Yes, it will cause backport problems, but as you also mentioned, the frequency should not be that high (ssunless it's scrub/raid56). With the compatible union, it should further reduce the conflict chance. We have leave the naming problem untouched for over a decade, I think it's time to finish it once for all. And I'm pretty happy to handle the backports if it's just the renaming causing the conflicts. I also thought about the more progressive solution, just put the union into all involved structures, and call it a day with future usage migrated to blocksize. But it's really no different than the current one backport wise, every time a sectorsize is changed to blocksize, future backport will be affected. It's just changing the short huge pain into a long small pain, the amount of pain is not changed. And there will be a way longer window where we have mixed terminology, causing more chaos and confusion. Thus I recommend to take this chance to solve our long existing problems. Or it will really never be fixed. Thanks, Qu