block-meta: add btrfs filesystem resize support - #54
Conversation
d76f7e9 to
bc9bbc8
Compare
dbungert
left a comment
There was a problem hiding this comment.
Thanks Dhruv. The test plan on the PR mentions that smoke test script but that's not something that exists today and it's not in this PR, so we should probably remove mention of it, or, if you think it's useful, include it in this PR and we'll discuss.
|
Let's add a unit test case as well, please. Also, let's ensure this case is handled - |
Added a unit test for btrfs in TestPartitionNeedsResize, matching the existing resize cases. |
| self.sfdisk_part_info) | ||
| self.assertEqual(expected, actual) | ||
|
|
||
| def test_partition_resize_btrfs(self): |
There was a problem hiding this comment.
this test is almost identical to the one above - if we parameterize it, we can cover the btrfs case with only a few new lines of code
There was a problem hiding this comment.
using the parameterized.expand function to combine them (ext4, btrfs), similarly done in other files like integration/test_block_meta.py
hopefully this is ok with convention
There was a problem hiding this comment.
We talked about this one live, this one should be resolved in the next update
| with tempfile.TemporaryDirectory(prefix='curtin-btrfs-') as mountpoint: | ||
| with util.mount(path, mountpoint): | ||
| util.subp(['btrfs', 'filesystem', 'resize', | ||
| '1:{}'.format(size), mountpoint]) |
There was a problem hiding this comment.
reminder - let's ensure this case is handled - # Device id 1 is the default for single-device filesystems. - please raise in the case where we're attempting a resize on a multi-device filesystem.
Does that need handling as well probert side?
db7f478 to
81f757a
Compare
Summary
btrfssupport to storage-config v2 resizers (btrfs filesystem resize 1:<size>via a temporary mount).Test plan
tox -e py3in Workshop (1552 passed)pytest tests/integration/test_block_meta.py -k btrfson LXD Ubuntu 24.04 VM