From 331cb142e35b0b0fe7efe08dc83280ad3f394d84 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Sat, 5 Nov 2022 13:31:47 -0400 Subject: [PATCH] fs: make dedupe work again after a really unfortunate build fix In commit 14ce81c08 "fs: get rid of silly base class that causes build failures now" I neglected to set the dest_count field in the ioctl arg structure, so bees master hasn't been deduping anything for about three weeks. I'd put a THROW_CHECK in here to catch this kind of bug in the future, but it would be placed at exactly the point where this fix is. Fixes: 14ce81c08 Signed-off-by: Zygo Blaxell --- lib/fs.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/fs.cc b/lib/fs.cc index a630d50..84d70cd 100644 --- a/lib/fs.cc +++ b/lib/fs.cc @@ -143,6 +143,7 @@ namespace crucible { ByteVector ioctl_arg( (btrfs_ioctl_same_args) { .logical_offset = m_logical_offset, .length = m_length, + .dest_count = ranged_cast(m_info.size()), }, buf_size); btrfs_ioctl_same_args *const ioctl_ptr = ioctl_arg.get(); size_t count = 0;