Fix extending filesystems of weird size by making sure the actual size
is always multiple of fragment size.
This commit is contained in:
parent
2818562651
commit
e2e5e93461
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user