Skip to contentSkip to conversation

ocfs2: Reset status if we want to restart file extension.

PATCH New Tao Ma 2 participants 2 messages Apr 16, 2010 OCFS2

lore
Share & tools
lore

Tao Ma

author
#0 lore raw

PATCH 1/1 ocfs2: Reset status if we want to restart file extension.

In __ocfs2_extend_allocation, we will restart our file extension if ((!status) && restart_func). But there is a bug that the status is still left as -EGAIN. This is really an old bug, but it is masked by the return value of ocfs2_journal_dirty. So it show up when we make ocfs2_journal_dirty void.

---
 fs/ocfs2/file.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/ocfs2/file.c +1 -0
index 19d16f2..6342f42 100644
@@ -678,6 +678,7 @@ restarted_transaction:
 		if (why == RESTART_META) {
 			mlog(0, "restarting function.\n");
 			restart_func = 1;
+			status = 0;
 		} else {
 			BUG_ON(why != RESTART_TRANS);
 
Signature · 1 line
1.5.5
#1 lore raw

PATCH 1/1 ocfs2: Reset status if we want to restart file extension.

Quoted 7 lines · Tao Ma

In __ocfs2_extend_allocation, we will restart our file extension if ((!status) && restart_func). But there is a bug that the status is still left as -EGAIN. This is really an old bug, but it is masked by the return value of ocfs2_journal_dirty. So it show up when we make ocfs2_journal_dirty void.

good catch. This patch is now in the 'fixes' branch of
ocfs2.git.

Joel

Signature · 9 lines
"The nearest approach to immortality on Earth is a government
 bureau."
	- James F. Byrnes

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127