path: root/volumes.h
diff options
authorQu Wenruo <>2017-10-17 13:00:41 +0800
committerDavid Sterba <>2017-11-14 15:59:00 +0100
commitea9cd9df2be56041e2d62b0e72c77695b03261f7 (patch)
treebaddacddd209a34ef9e79369a4d7f17f1b5a046f /volumes.h
parent7a060ea02662a3cbf4b2707de830c835f43658ef (diff)
btrfs-progs: Introduce function to fix unaligned device size
Recent kernel introduced alignment check for dev item, however older kernel doesn't align device size when adding new device or shrinking existing device. This makes noisy kernel warning every time when any DEV_ITEM gets updated. Introduce function to fix device size on an unmounted filesystem. Reported-by: Asif Youssuff <> Reported-by: Rich Rauenzahn <> Signed-off-by: Qu Wenruo <> Reviewed-by: Nikolay Borisov <> Signed-off-by: David Sterba <>
Diffstat (limited to 'volumes.h')
1 files changed, 2 insertions, 0 deletions
diff --git a/volumes.h b/volumes.h
index d35a4e65..89bd4aa8 100644
--- a/volumes.h
+++ b/volumes.h
@@ -245,4 +245,6 @@ int btrfs_check_chunk_valid(struct btrfs_fs_info *fs_info,
u64 btrfs_stripe_length(struct btrfs_fs_info *fs_info,
struct extent_buffer *leaf,
struct btrfs_chunk *chunk);
+int btrfs_fix_device_size(struct btrfs_fs_info *fs_info,
+ struct btrfs_device *device);