[Ocfs2-tools-devel] [PATCH 2/5] Fswreck: Rename code INODE_LINK_NOT_CONNECTED to INODE_NOT_CONNECTED.

Tristan Ye tristan.ye at oracle.com
Thu Mar 11 02:02:20 PST 2010


The philoshopy of fswreck is to match the fsck.ocfs2 as much as possible,
Having said that, we'd better remove code INODE_LINK_NOT_CONNECTED, and let
the unimplemented code INODE_NOT_CONNECTED prevail. since latter one is the
exact name of corruption in fsck.ocfs2.

Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
---
 fswreck/corrupt.c           |    2 +-
 fswreck/include/fsck_type.h |    3 +--
 fswreck/inode.c             |    2 +-
 fswreck/main.c              |    6 ++----
 4 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/fswreck/corrupt.c b/fswreck/corrupt.c
index a088898..a529a85 100644
--- a/fswreck/corrupt.c
+++ b/fswreck/corrupt.c
@@ -124,7 +124,7 @@ void corrupt_file(ocfs2_filesys *fs, enum fsck_type type, uint16_t slotnum)
 	case INODE_COUNT:
 		func = mess_up_inode_field;
 		break;
-	case INODE_LINK_NOT_CONNECTED:
+	case INODE_NOT_CONNECTED:
 		func = mess_up_inode_not_connected;
 		break;
 	case LINK_FAST_DATA:
diff --git a/fswreck/include/fsck_type.h b/fswreck/include/fsck_type.h
index 1d2113f..b570eb2 100644
--- a/fswreck/include/fsck_type.h
+++ b/fswreck/include/fsck_type.h
@@ -84,7 +84,6 @@ enum fsck_type
 	INODE_GEN,
 	INODE_GEN_FIX,
 	INODE_BLKNO,
-	INODE_LINK_NOT_CONNECTED,
 	ROOT_NOTDIR,
 	INODE_NZ_DTIME,
 	LINK_FAST_DATA,
@@ -188,7 +187,7 @@ enum fsck_type
 			INODE_NZ_DTIME, INODE_SIZE, INODE_SPARSE_SIZE,
 *			INODE_CLUSTERS, INODE_SPARSE_CLUSTERS, INODE_COUNT
  *
- * Inode link not connected error: INODE_LINK_NOT_CONNECTED 
+ * Inode link not connected error: INODE_NOT_CONNECTED 
  *
  * Inode orphaned error:	INODE_ORPHANED
  *
diff --git a/fswreck/inode.c b/fswreck/inode.c
index a34a03b..56d9e1b 100644
--- a/fswreck/inode.c
+++ b/fswreck/inode.c
@@ -29,7 +29,7 @@
  * Inode field error: 	INODE_SUBALLOC, INODE_GEN, INODE_GEN_FIX,INODE_BLKNO,
 			INODE_NZ_DTIME, INODE_SIZE, INODE_CLUSTERS, INODE_COUNT
  *
- * Inode link not connected error: INODE_LINK_NOT_CONNECTED
+ * Inode link not connected error: INODE_NOT_CONNECTED
  *
  * Inode orphaned error:	INODE_ORPHANED
  *
diff --git a/fswreck/main.c b/fswreck/main.c
index ae8836c..abba71e 100644
--- a/fswreck/main.c
+++ b/fswreck/main.c
@@ -97,10 +97,8 @@ static struct prompt_code prompt_codes[NUM_FSCK_TYPE] = {
 			   "Corrupt sparse inode's i_clusters field"),
 	define_prompt_code(INODE_COUNT, corrupt_file,
 			   "Corrupt inode's i_links_count field"),
-	define_prompt_code(INODE_LINK_NOT_CONNECTED, corrupt_file,
-			   "Create an inode which has no links"),
-	define_prompt_code(INODE_NOT_CONNECTED, NULL,
-			   "Unimplemented corrupt code"),
+	define_prompt_code(INODE_NOT_CONNECTED, corrupt_file,
+			   "Create an inode which has no links to dentries"),
 	define_prompt_code(LINK_FAST_DATA, corrupt_file,
 			   "Corrupt symlink's i_clusters to 0"),
 	define_prompt_code(LINK_NULLTERM, corrupt_file,
-- 
1.5.5




More information about the Ocfs2-tools-devel mailing list