[Ocfs2-tools-commits] zab commits r883 - in trunk: fsck.ocfs2 libo2cb

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Mon May 9 13:58:49 CDT 2005


Author: zab
Signed-off-by: jlbec
Date: 2005-05-09 13:58:46 -0500 (Mon, 09 May 2005)
New Revision: 883

Modified:
   trunk/fsck.ocfs2/fsck.c
   trunk/fsck.ocfs2/pass1.c
   trunk/libo2cb/o2cb_abi.c
Log:
o don't try and walk i_list for fast symlinks 
o add some bad error messages where there were none
o avoid EFBIG with open64(), though the tools don't work with loopback files

Signed-off-by: jlbec



Modified: trunk/fsck.ocfs2/fsck.c
===================================================================
--- trunk/fsck.ocfs2/fsck.c	2005-05-06 22:05:31 UTC (rev 882)
+++ trunk/fsck.ocfs2/fsck.c	2005-05-09 18:58:46 UTC (rev 883)
@@ -530,13 +530,13 @@
 	if (open_flags & OCFS2_FLAG_RW) {
 		ret = ocfs2_initialize_dlm(ost->ost_fs);
 		if (ret) {
-			com_err(whoami, ret, " ");
+			com_err(whoami, ret, "while initializing the DLM");
 			goto close;
 		}
 
 		ret = ocfs2_lock_down_cluster(ost->ost_fs);
 		if (ret) {
-			com_err(whoami, ret, " ");
+			com_err(whoami, ret, "while locking down the cluster");
 			goto close;
 		}
 	}

Modified: trunk/fsck.ocfs2/pass1.c
===================================================================
--- trunk/fsck.ocfs2/pass1.c	2005-05-06 22:05:31 UTC (rev 882)
+++ trunk/fsck.ocfs2/pass1.c	2005-05-09 18:58:46 UTC (rev 883)
@@ -622,10 +622,18 @@
 		.vb_di = di,
 	};
 
+	/*
+	 * ISLNK && clusters == 0 is the only sign of an inode that doesn't
+	 * have an extent list when i_flags would have us believe it did.  
+	 * We might be able to be very clever about discovering the 
+	 * difference between i_symlink and i_list, but we don't try yet.
+	 */
 	if (di->i_flags & OCFS2_LOCAL_ALLOC_FL)
 		ret = 0;
 	else if (di->i_flags & OCFS2_CHAIN_FL)
 		ret = ocfs2_chain_iterate(fs, blkno, check_gd_block, &vb);
+	else if (S_ISLNK(di->i_mode) && di->i_clusters == 0) 
+		ret = 0;
 	else {
 		ret = o2fsck_check_extents(ost, di);
 		if (ret == 0)

Modified: trunk/libo2cb/o2cb_abi.c
===================================================================
--- trunk/libo2cb/o2cb_abi.c	2005-05-06 22:05:31 UTC (rev 882)
+++ trunk/libo2cb/o2cb_abi.c	2005-05-09 18:58:46 UTC (rev 883)
@@ -616,7 +616,7 @@
 	if (err)
 		goto out_rmdir;
 
-	fd = open(device_name, O_RDWR);
+	fd = open64(device_name, O_RDWR);
 	if (fd < 0) {
 		switch (errno) {
 			default:



More information about the Ocfs2-tools-commits mailing list