[PATCH 4/8] xfsprogs: mkfs.xfs: let libxfs_umount() do its thing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Kevan Rehm <kfr@xxxxxxx>

In the mkfs.xfs main() routine (which is gargantuan, by the way),
there are a few function calls intended to do some clean up before
unmounting the filesystem.

The first function drops references that will be dropped again in
the unmnount call.  The others assume all references will go away as
a result of the purge, but the filesystem's root inode reference
will remain.

Let the unmount function take care of destroying the real-time
structures.  And instead of purging the inode and block caches, just
flush them (at least the block cache) and let the unmount code take
care of the final purge.

Signed-off-by: Alex Elder <aelder@xxxxxxx>
---
 mkfs/xfs_mkfs.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index f527f3d..213cc74 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -2674,9 +2674,7 @@ an AG size that is one stripe unit smaller, for example %llu.\n"),
 	 * Dump all inodes and buffers before marking us all done.
 	 * Need to drop references to inodes we still hold, first.
 	 */
-	libxfs_rtmount_destroy(mp);
-	libxfs_icache_purge();
-	libxfs_bcache_purge();
+	libxfs_bcache_flush();
 
 	/*
 	 * Mark the filesystem ok.
-- 
1.7.6.4

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux