Srinivas Eeda
2009-Feb-28 02:01 UTC
[Ocfs2-devel] [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. Signed-off-by: Srinivas Eeda <srinivas.eeda at oracle.com> --- fs/ocfs2/journal.c | 21 ++++++++------------- 1 files changed, 8 insertions(+), 13 deletions(-) diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 57d7d25..71b2ea4 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c @@ -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) -- 1.5.6.5
Joel Becker
2009-Feb-28 02:37 UTC
[Ocfs2-devel] [PATCH 1/1] Patch to recover orphans from the slot during mount
On Fri, Feb 27, 2009 at 06:01:24PM -0800, Srinivas Eeda wrote:> 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 <srinivas.eeda at oracle.com>This is always safe to do. Acked-by: Joel Becker <joel.becker at oracle.com> Joel -- "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
Possibly Parallel Threads
- [PATCH 1/1] Patch to recover orphans in offline slots during recovery and mount (revised)
- [PATCH 1/1] ocfs2: recover orphans in offline slots during recovery and mount
- [PATCH 1/1] Patch to recover orphans in offline slots during recovery and mount
- [PATCH 1/1] Patch to recover orphans in offline slots during recovery.
- Patch to recover orphans in offline slots