]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit - resize/main.c
resize2fs: use Direct I/O when reading the superblock for online resizes
authorTheodore Ts'o <tytso@mit.edu>
Thu, 15 Jun 2023 04:17:01 +0000 (00:17 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 15 Jun 2023 04:17:01 +0000 (00:17 -0400)
commit43a498e938887956f393b5e45ea6ac79cc5f4b84
tree7f3451c7d780457c5324b6591beb1e2d55f2c4ff
parent541ce8f2bb6f91834b5d5b7c98bd4de8998dccc5
resize2fs: use Direct I/O when reading the superblock for online resizes

If the file system is mounted, the superblock can be changing while
resize2fs is trying to read the superblock, resulting in checksum
failures.  One way of avoiding this problem is read the superblock
using Direct I/O, since the kernel makes sure that what gets written
to disk is self-consistent.

Suggested-by: Krister Johansen <kjlx@templeofstupid.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
resize/main.c