lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20190218181359.GG6477@magnolia>
Date:   Mon, 18 Feb 2019 10:13:59 -0800
From:   "Darrick J. Wong" <darrick.wong@...cle.com>
To:     Eryu Guan <guaneryu@...il.com>
Cc:     fstests <fstests@...r.kernel.org>, xfs <linux-xfs@...r.kernel.org>,
        linux-ext4 <linux-ext4@...r.kernel.org>
Subject: [PATCH] t_open_tmpfiles: flush log when shutting down filesystem

From: Darrick J. Wong <darrick.wong@...cle.com>

If the caller of t_open_tmpfiles wants to shut down the filesystem, be
sure to flush the log when we shut down so that log recovery will have
to process all the unlinked temporary files.

This is apparently needed to force ext4 to flush updated inode blocks
through the journal at all.

Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com>
---
 src/t_open_tmpfiles.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/t_open_tmpfiles.c b/src/t_open_tmpfiles.c
index 9e70fbaa..da9390fd 100644
--- a/src/t_open_tmpfiles.c
+++ b/src/t_open_tmpfiles.c
@@ -70,7 +70,11 @@ void die(void)
 		fflush(stdout);
 
 		if (shutdown_fs) {
-			int flag = XFS_FSOP_GOING_FLAGS_NOLOGFLUSH;
+			/*
+			 * Flush the log so that we have to process the
+			 * unlinked inodes the next time we mount.
+			 */
+			int flag = XFS_FSOP_GOING_FLAGS_LOGFLUSH;
 			int ret;
 
 			ret = ioctl(min_fd, XFS_IOC_GOINGDOWN, &flag);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ