[Ocfs2-commits] mfasheh commits r1770 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Thu Jan 13 19:12:22 CST 2005


Author: mfasheh
Date: 2005-01-13 19:12:20 -0600 (Thu, 13 Jan 2005)
New Revision: 1770

Modified:
   trunk/src/super.c
Log:
* clean up ocfs_statfs a bit, do proper cluster locking so we get real
  updates on fullness, etc.



Modified: trunk/src/super.c
===================================================================
--- trunk/src/super.c	2005-01-14 01:02:20 UTC (rev 1769)
+++ trunk/src/super.c	2005-01-14 01:12:20 UTC (rev 1770)
@@ -663,7 +663,7 @@
 {
 	ocfs_super *osb;
 	u32 numbits, freebits;
-	int status, ret = 0;
+	int status;
 	ocfs2_dinode *bm_lock;
 	struct buffer_head *bh = NULL;
 	struct inode *inode = NULL;
@@ -679,15 +679,14 @@
 					   -1);
 	if (!inode) {
 		LOG_ERROR_STR("failed to get bitmap inode");
-		ret = -EIO;
+		status = -EIO;
 		goto bail;
 	}
 
-	status = ocfs_read_block(osb, OCFS_I(inode)->ip_blkno, &bh, 
-				 OCFS_BH_CACHED, inode);
+	status = ocfs2_meta_lock(inode, NULL, &bh, 0);
 	if (status < 0) {
-		LOG_ERROR_STR("failed to read bitmap data");
-		ret = -EIO;
+		if (status != -EINTR)
+			LOG_ERROR_STATUS(status);
 		goto bail;
 	}
 
@@ -711,15 +710,16 @@
 
 	brelse(bh);
 
-
+	ocfs2_meta_unlock(inode, 0);
+	status = 0;
 bail:
 	if (inode)
 		iput (inode);
 
-	LOG_EXIT_INT (ret);
+	LOG_EXIT_INT (status);
 
 	LOG_CLEAR_CONTEXT();
-	return ret;
+	return status;
 }                               /* ocfs_statfs */
 
 



More information about the Ocfs2-commits mailing list