]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: set NEEDSREPAIR the first time we write to a filesystem
authorDarrick J. Wong <djwong@kernel.org>
Wed, 24 Feb 2021 00:10:00 +0000 (19:10 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 24 Feb 2021 00:10:00 +0000 (19:10 -0500)
commit3b7667cba299f11918460d4a9476588ee23b213d
tree3acc47c99163adffc2d46e89401cc57da96ff18d
parenta7348c580de9d71811e73f5771e34bd4534daceb
xfs_repair: set NEEDSREPAIR the first time we write to a filesystem

Add a hook to the buffer cache so that xfs_repair can intercept the
first write to a V5 filesystem to set the NEEDSREPAIR flag.  In the
event that xfs_repair dirties the filesystem and goes down, this ensures
that the sysadmin will have to re-start repair before mounting.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/xfs_mount.h
libxfs/rdwr.c
repair/xfs_repair.c