[Ocfs2-commits] jlbec commits r2266 - branches/alloc_inode/fs/ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue May 17 17:33:52 CDT 2005


Author: jlbec
Date: 2005-05-17 17:33:51 -0500 (Tue, 17 May 2005)
New Revision: 2266

Modified:
   branches/alloc_inode/fs/ocfs2/inode.c
   branches/alloc_inode/fs/ocfs2/journal.c
   branches/alloc_inode/fs/ocfs2/ocfs.h
Log:

o Move ip_handle_list and ip_handle to ocfs2_inode_info.



Modified: branches/alloc_inode/fs/ocfs2/inode.c
===================================================================
--- branches/alloc_inode/fs/ocfs2/inode.c	2005-05-17 22:00:36 UTC (rev 2265)
+++ branches/alloc_inode/fs/ocfs2/inode.c	2005-05-17 22:33:51 UTC (rev 2266)
@@ -217,9 +217,7 @@
 	atomic_set(&i->ip_clean_buffer_seq, 0);
 	spin_lock_init(&i->ip_lock);
 	ocfs2_extent_map_init(inode);
-	INIT_LIST_HEAD(&i->ip_handle_list);
 	INIT_LIST_HEAD(&i->ip_io_markers);
-	i->ip_handle = NULL;
 	i->ip_next_orphan = NULL;
 
 	init_rwsem(&i->ip_alloc_sem);
@@ -781,6 +779,14 @@
 		     "Clear inode of %"MLFu64" has open count %d\n",
 		     OCFS2_I(inode)->ip_blkno,
 		     OCFS2_I(inode)->ip_open_count);
+	if (!list_empty(&OCFS2_I(inode)->ip_handle_list))
+		mlog(ML_ERROR,
+		     "Clear inode of %"MLFu64" has non empty handle list\n",
+		     OCFS2_I(inode)->ip_blkno);
+	if (OCFS2_I(inode)->ip_handle)
+		mlog(ML_ERROR,
+		     "Clear inode of %"MLFu64" has non empty handle pointer\n",
+		     OCFS2_I(inode)->ip_blkno);
 	OCFS2_I(inode)->ip_flags = 0;
 	OCFS2_I(inode)->ip_blkno = 0ULL;
 

Modified: branches/alloc_inode/fs/ocfs2/journal.c
===================================================================
--- branches/alloc_inode/fs/ocfs2/journal.c	2005-05-17 22:00:36 UTC (rev 2265)
+++ branches/alloc_inode/fs/ocfs2/journal.c	2005-05-17 22:33:51 UTC (rev 2266)
@@ -214,26 +214,27 @@
 	down(&inode->i_sem);
 
 	/* sanity check */
-	OCFS_ASSERT(!OCFS_I(inode)->ip_handle);
-	OCFS_ASSERT(list_empty(&OCFS_I(inode)->ip_handle_list));
+	OCFS_ASSERT(!OCFS2_I(inode)->ip_handle);
+	OCFS_ASSERT(list_empty(&OCFS2_I(inode)->ip_handle_list));
 
-	OCFS_I(inode)->ip_handle = handle;
-	list_del(&(OCFS_I(inode)->ip_handle_list));
-	list_add_tail(&(OCFS_I(inode)->ip_handle_list), &(handle->inode_list));
+	OCFS2_I(inode)->ip_handle = handle;
+	list_del(&(OCFS2_I(inode)->ip_handle_list));
+	list_add_tail(&(OCFS2_I(inode)->ip_handle_list), &(handle->inode_list));
 }
 
 static void ocfs_handle_unlock_inodes(ocfs_journal_handle *handle) 
 {
 	struct list_head *p, *n;
 	struct inode *inode;
-	ocfs_inode_private *ip;
+	struct ocfs2_inode_info *oi;
 
 	list_for_each_safe(p, n, &handle->inode_list) {
-		ip = list_entry(p, ocfs_inode_private, ip_handle_list);
-		inode = ip->ip_inode;
+		oi = list_entry(p, struct ocfs2_inode_info,
+				ip_handle_list);
+		inode = &oi->vfs_inode;
 
-		OCFS_I(inode)->ip_handle = NULL;
-		list_del_init(&OCFS_I(inode)->ip_handle_list);
+		OCFS2_I(inode)->ip_handle = NULL;
+		list_del_init(&OCFS2_I(inode)->ip_handle_list);
 
 		up(&inode->i_sem);
 		iput(inode);

Modified: branches/alloc_inode/fs/ocfs2/ocfs.h
===================================================================
--- branches/alloc_inode/fs/ocfs2/ocfs.h	2005-05-17 22:00:36 UTC (rev 2265)
+++ branches/alloc_inode/fs/ocfs2/ocfs.h	2005-05-17 22:33:51 UTC (rev 2266)
@@ -208,13 +208,6 @@
 
 	struct semaphore  ip_io_sem;
 
-	/* Used by the journalling code to attach an inode to a
-	 * handle.  These are protected by ip_io_sem in order to lock
-	 * out other I/O to the inode until we either commit or
-	 * abort. */
-	struct list_head            ip_handle_list;
-	struct _ocfs_journal_handle *ip_handle;
-
 	atomic_t          ip_clean_buffer_seq;
 	u32             ip_flags; /* see below */
 



More information about the Ocfs2-commits mailing list