[Ocfs2-commits] mfasheh commits r1386 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu Aug 26 13:03:38 CDT 2004
Author: mfasheh
Date: 2004-08-26 13:03:36 -0500 (Thu, 26 Aug 2004)
New Revision: 1386
Modified:
trunk/src/inode.c
trunk/src/super.c
trunk/src/super.h
Log:
* Move the unmount code over to put_super where it belongs. This fixes
a number of issues with busy inodes where the stuff in clear_inode
wasn't being called because the root inode was on the lock list.
* I also moved the shutdown of local alloc farther up the stack in
dismount_volume to facilitate fixing one of the TODO list items later on.
Modified: trunk/src/inode.c
===================================================================
--- trunk/src/inode.c 2004-08-25 21:48:53 UTC (rev 1385)
+++ trunk/src/inode.c 2004-08-26 18:03:36 UTC (rev 1386)
@@ -757,15 +757,6 @@
ocfs_extent_map_destroy (&OCFS_I(inode)->ip_ext_map);
ocfs_extent_map_init (&OCFS_I(inode)->ip_ext_map);
- if (inode == osb->root_inode) {
- LOG_TRACE_STR("this is the root inode, doing cleanup now!");
- ocfs_sync_blockdev(inode->i_sb);
- LOG_TRACE_STR ("syncing past root inode");
- LOG_TRACE_STR ("calling dismount");
- ocfs_dismount_volume (inode->i_sb);
- goto bail;
- }
-
down(&recovery_list_sem);
list_del(&OCFS_I(inode)->ip_recovery_list);
up(&recovery_list_sem);
Modified: trunk/src/super.c
===================================================================
--- trunk/src/super.c 2004-08-25 21:48:53 UTC (rev 1385)
+++ trunk/src/super.c 2004-08-26 18:03:36 UTC (rev 1386)
@@ -165,6 +165,7 @@
static void __exit ocfs_driver_exit (void);
static void ocfs_put_super (struct super_block *sb);
static int ocfs_mount_volume (struct super_block *sb, int reclaim_id, struct inode *root);
+static int ocfs_dismount_volume (struct super_block *sb);
static int ocfs_read_params(void);
static int ocfs_initialize_mem_lists (void);
static void ocfs_free_mem_lists (void);
@@ -712,7 +713,8 @@
LOG_ENTRY_ARGS ("(0x%p)\n", sb);
ocfs_sync_blockdev(sb);
- LOG_TRACE_STR ("put super... do nothing! DONE!!!!");
+ ocfs_dismount_volume (sb);
+
LOG_EXIT ();
LOG_CLEAR_CONTEXT();
@@ -1081,7 +1083,7 @@
* ocfs_dismount_volume()
*
*/
-int ocfs_dismount_volume (struct super_block *sb)
+static int ocfs_dismount_volume (struct super_block *sb)
{
int status;
int AcquiredOSB = 0;
@@ -1102,6 +1104,8 @@
goto leave;
}
+ ocfs_shutdown_local_alloc(osb, 1);
+
/* disable any new recovery threads and wait for any currently
* running ones to exit. Do this before setting the vol_state. */
down(&osb->recovery_lock);
@@ -1127,8 +1131,6 @@
}
#endif
- /* Shutdown the journal and sync up and clear the local alloc. */
- ocfs_shutdown_local_alloc(osb, 1);
ocfs_journal_shutdown(osb);
/* unset the mounted flag -- we're done with the journal and
Modified: trunk/src/super.h
===================================================================
--- trunk/src/super.h 2004-08-25 21:48:53 UTC (rev 1385)
+++ trunk/src/super.h 2004-08-26 18:03:36 UTC (rev 1386)
@@ -29,7 +29,6 @@
#ifndef OCFS2_SUPER_H
#define OCFS2_SUPER_H
-int ocfs_dismount_volume(struct super_block *sb);
int ocfs_publish_get_mount_state(ocfs_super *osb, int node_num);
#endif /* OCFS2_SUPER_H */
More information about the Ocfs2-commits
mailing list