1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-14 14:55:41 +00:00

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

is always multiple of fragment size.
This commit is contained in:
Edward Tomasz Napierala 2012-12-15 08:53:58 +00:00
parent 14df601e47
commit cd379aaff1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=244243

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,