In some circumstances the LIST_VERSIONS (dmsetup targets) output is truncated because the size calculation forgets about a 'uint32_t' in each structure - but the inclusion of the whole of ALIGN_MASK frequently compensates for the omission. [This is a quick fix for a problem actually seen - it now returns an upper bound on the size provided the data doesn't grow while the output is being generated (unlikely). The code should still be fixed to supply the actual size.] Index: linux-2.6.14-rc2/drivers/md/dm-ioctl.c =================================================================== --- linux-2.6.14-rc2.orig/drivers/md/dm-ioctl.c 2005-10-26 20:22:59.000000000 +0100 +++ linux-2.6.14-rc2/drivers/md/dm-ioctl.c 2005-11-03 21:54:07.000000000 +0000 @@ -425,8 +425,8 @@ static void list_version_get_needed(stru { size_t *needed = needed_param; + *needed += sizeof(struct dm_target_versions); *needed += strlen(tt->name); - *needed += sizeof(tt->version); *needed += ALIGN_MASK; }