mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
src/t_open_tmpfiles: flush log when shutting down filesystem
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@oracle.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
committed by
Eryu Guan
parent
e7046479b4
commit
5fd70db390
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user