Patch to recover orphans from the slot during mount
PATCH 1/1 Patch to recover orphans from the slot during mount
Currently we only queue recovery during mount if the journal is dirty.
If the last node holding orphans in other node's orphan directory dies and is the first one to mount then it only recovers its orphan directory which leaves the orphans in other nodes slots. Since the other nodes journals are clean they will not queue to recover their orphan directory.
This patch queues to recover orphans when the slot is next used.
--- fs/ocfs2/journal.c | 21 ++++++++------------- 1 files changed, 8 insertions(+), 13 deletions(-)
fs/ocfs2/journal.c +8 -13
@@ -1181,19 +1181,14 @@ void ocfs2_complete_mount_recovery(struct ocfs2_super *osb) {struct ocfs2_journal *journal = osb->journal; -if (osb->dirty) { -/* No need to queue up our truncate_log as regular -* cleanup will catch that. */ -ocfs2_queue_recovery_completion (journal, - osb->slot_num, - osb->local_alloc_copy, -NULL , -NULL ); -ocfs2_schedule_truncate_log_flush (osb,0 ); - - osb->local_alloc_copy =NULL ; - osb->dirty =0 ; - } +/* No need to queue up our truncate_log as regular cleanup will +* catch that. */ +ocfs2_queue_recovery_completion (journal, osb->slot_num, + osb->local_alloc_copy,NULL ,NULL ); +ocfs2_schedule_truncate_log_flush (osb,0 ); + + osb->local_alloc_copy =NULL ; + osb->dirty =0 ; }void ocfs2_complete_quota_recovery (struct ocfs2_super *osb)
Signature · 1 line
1.5.6.5
PATCH 1/1 Patch to recover orphans from the slot during mount
Quoted 10 lines · Srinivas Eeda
Currently we only queue recovery during mount if the journal is dirty.
If the last node holding orphans in other node's orphan directory dies and is the first one to mount then it only recovers its orphan directory which leaves the orphans in other nodes slots. Since the other nodes journals are clean they will not queue to recover their orphan directory.
This patch queues to recover orphans when the slot is next used.
Signed-off-by Srinivas Eeda <[email protected]>
This is always safe to do.
Joel
Signature · 8 lines
"In the long run...we'll all be dead."
-Unknown
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127