Skip to contentSkip to conversation

ocfs2: Fix writeout in ocfs2_data_convert_worker()

PATCH New Mark Fasheh 3 participants 3 messages Feb 28, 2008 – Feb 29, 2008 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ocfs2: Fix writeout in ocfs2_data_convert_worker()

Commit f1f540688eae66c274ff1c1133b5d9c687b28f58 "optimized" ocfs2_data_convert_worker() to "only do work for regular files". Unfortunately, I left out a '!', which casued it to *skip* regular files. This was hidden from testing until recently because the default data journaling mode (data=ordered) doesn't exercise this code.

---
 fs/ocfs2/dlmglue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ocfs2/dlmglue.c +1 -1
index 351130c..f4b3dab 100644
@@ -3042,7 +3042,7 @@ static int ocfs2_data_convert_worker(struct ocfs2_lock_res *lockres,
        	inode = ocfs2_lock_res_inode(lockres);
 	mapping = inode->i_mapping;
 
-	if (S_ISREG(inode->i_mode))
+	if (!S_ISREG(inode->i_mode))
 		goto out;
 
 	/*
Signature · 1 line
1.5.3.6
#1 lore raw

PATCH 1/1 ocfs2: Fix writeout in ocfs2_data_convert_worker()

Quoted 7 lines · Mark Fasheh

Commit f1f540688eae66c274ff1c1133b5d9c687b28f58 "optimized" ocfs2_data_convert_worker() to "only do work for regular files". Unfortunately, I left out a '!', which casued it to *skip* regular files. This was hidden from testing until recently because the default data journaling mode (data=ordered) doesn't exercise this code.

Quoted 25 lines
---
 fs/ocfs2/dlmglue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ocfs2/dlmglue.c +1 -1
index 351130c..f4b3dab 100644
@@ -3042,7 +3042,7 @@ static int ocfs2_data_convert_worker(struct ocfs2_lock_res *lockres,
        	inode = ocfs2_lock_res_inode(lockres);
 	mapping = inode->i_mapping;
 
-	if (S_ISREG(inode->i_mode))
+	if (!S_ISREG(inode->i_mode))
 		goto out;
 
 	/*
Signature · 7 lines
1.5.3.6


_______________________________________________
Ocfs2-devel mailing list
[email protected]
http://oss.oracle.com/mailman/listinfo/ocfs2-devel
Signature · 12 lines
"But then she looks me in the eye
 And says, 'We're going to last forever,'
 And man you know I can't begin to doubt it.
 Cause it just feels so good and so free and so right,
 I know we ain't never going to change our minds about it, Hey!
 Here comes my girl."

Joel Becker
Principal Software Developer
Oracle
E-mail: [email protected]
Phone: (650) 506-8127
#2 lore raw

PATCH 1/1 ocfs2: Fix writeout in ocfs2_data_convert_worker()

In reply to Mark Fasheh
Quoted 8 lines · Mark Fasheh

Commit f1f540688eae66c274ff1c1133b5d9c687b28f58 "optimized" ocfs2_data_convert_worker() to "only do work for regular files". Unfortunately, I left out a '!', which casued it to *skip* regular files. This was hidden from testing until recently because the default data journaling mode (data=ordered) doesn't exercise this code.

Quoted 18 lines
---
 fs/ocfs2/dlmglue.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ocfs2/dlmglue.c +1 -1
index 351130c..f4b3dab 100644
@@ -3042,7 +3042,7 @@ static int ocfs2_data_convert_worker(struct ocfs2_lock_res *lockres,
        	inode = ocfs2_lock_res_inode(lockres);
 	mapping = inode->i_mapping;
 
-	if (S_ISREG(inode->i_mode))
+	if (!S_ISREG(inode->i_mode))
 		goto out;
 
 	/*