Fix extending filesystems of weird size by making sure the actual size

is always multiple of fragment size.
This commit is contained in:
trasz 2012-12-15 08:53:58 +00:00
parent 2818562651
commit e2e5e93461

View File

@ -1487,6 +1487,12 @@ main(int argc, char **argv)
}
}
/*
* Make sure the new size is a multiple of fs_fsize; /dev/ufssuspend
* only supports fragment-aligned IO requests.
*/
size -= size % osblock.fs_fsize;
if (size <= (uint64_t)(osblock.fs_size * osblock.fs_fsize)) {
humanize_number(oldsizebuf, sizeof(oldsizebuf),
osblock.fs_size * osblock.fs_fsize,