* [Ocfs2-devel] Question: recovery map vs replay map
@ 2010-10-08 19:03 Goldwyn Rodrigues
2010-10-08 19:50 ` Sunil Mushran
0 siblings, 1 reply; 4+ messages in thread
From: Goldwyn Rodrigues @ 2010-10-08 19:03 UTC (permalink / raw)
To: ocfs2-devel
I was reading through the recovery code and got confused with recovery
and replay maps.
What is the function of recovery maps and replay maps? Is a replay map
generated for each entry in the recovery map? Is there a situation
where a replay map is created without a recovery map entry?
Thanks,
--
Goldwyn
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] Question: recovery map vs replay map
2010-10-08 19:03 [Ocfs2-devel] Question: recovery map vs replay map Goldwyn Rodrigues
@ 2010-10-08 19:50 ` Sunil Mushran
2010-10-08 21:09 ` Joel Becker
2010-10-11 15:32 ` Goldwyn Rodrigues
0 siblings, 2 replies; 4+ messages in thread
From: Sunil Mushran @ 2010-10-08 19:50 UTC (permalink / raw)
To: ocfs2-devel
On 10/08/2010 12:03 PM, Goldwyn Rodrigues wrote:
> I was reading through the recovery code and got confused with recovery
> and replay maps.
>
> What is the function of recovery maps and replay maps? Is a replay map
> generated for each entry in the recovery map? Is there a situation
> where a replay map is created without a recovery map entry?
>
During recovery, we need to recover the slot used by the dead node
(including journal replay) and clean up the unused orphaned inodes.
The recovery map refers to the nodes whose slot needs recovery.
The replay map (confusing name, in hindsight) refers to unused slots
whose orphaned inodes need to be cleaned up.
Consider the case of a 4 node cluster having nodes 0, 1, 2, 3.
Say node 0 removes a file that is in-use on node 1. Node 0 will
move the inode to its orphan directory. Then say it umounts.
At this stage, say node 1 dies.
One of the surviving nodes will recover the node 1's slot. That
includes replaying its journal and cleaning up its orphan directory.
But what about the orphan directory that node 0 used that has that
inode that was in use on node 1. That needs to be cleaned up too.
The replay map, populated with unused slots, will contain the slot
used by node 0.
Yes, this code is now superfluous since we now have a orphan
scan timer that fires periodically to clean up the inodes for all slots.
Sunil
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] Question: recovery map vs replay map
2010-10-08 19:50 ` Sunil Mushran
@ 2010-10-08 21:09 ` Joel Becker
2010-10-11 15:32 ` Goldwyn Rodrigues
1 sibling, 0 replies; 4+ messages in thread
From: Joel Becker @ 2010-10-08 21:09 UTC (permalink / raw)
To: ocfs2-devel
On Fri, Oct 08, 2010 at 12:50:03PM -0700, Sunil Mushran wrote:
> On 10/08/2010 12:03 PM, Goldwyn Rodrigues wrote:
> > I was reading through the recovery code and got confused with recovery
> > and replay maps.
> >
> > What is the function of recovery maps and replay maps? Is a replay map
> > generated for each entry in the recovery map? Is there a situation
> > where a replay map is created without a recovery map entry?
>
>
> During recovery, we need to recover the slot used by the dead node
> (including journal replay) and clean up the unused orphaned inodes.
>
> The recovery map refers to the nodes whose slot needs recovery.
>
> The replay map (confusing name, in hindsight) refers to unused slots
> whose orphaned inodes need to be cleaned up.
The names do make sense, though. The recovery map is a map of
nodes that have died and need recovery. The replay map is a map of
slots that need replay at mount time.
> But what about the orphan directory that node 0 used that has that
> inode that was in use on node 1. That needs to be cleaned up too.
>
> The replay map, populated with unused slots, will contain the slot
> used by node 0.
>
> Yes, this code is now superfluous since we now have a orphan
> scan timer that fires periodically to clean up the inodes for all slots.
However, we eventually want to remove the orphan scan, at which
point the mount-time replay is still the correct solution.
Joel
--
Life's Little Instruction Book #99
"Think big thoughts, but relish small pleasures."
Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] Question: recovery map vs replay map
2010-10-08 19:50 ` Sunil Mushran
2010-10-08 21:09 ` Joel Becker
@ 2010-10-11 15:32 ` Goldwyn Rodrigues
1 sibling, 0 replies; 4+ messages in thread
From: Goldwyn Rodrigues @ 2010-10-11 15:32 UTC (permalink / raw)
To: ocfs2-devel
On Fri, Oct 8, 2010 at 2:50 PM, Sunil Mushran <sunil.mushran@oracle.com> wrote:
> On 10/08/2010 12:03 PM, Goldwyn Rodrigues wrote:
>>
>> I was reading through the recovery code and got confused with recovery
>> and replay maps.
>>
>> What is the function of recovery maps and replay maps? Is a replay map
>> generated for each entry in the recovery map? Is there a situation
>> where a replay map is created without a recovery map entry?
>>
>
> During recovery, we need to recover the slot used by the dead node
> (including journal replay) and clean up the unused orphaned inodes.
>
> The recovery map refers to the nodes whose slot needs recovery.
>
> The replay map (confusing name, in hindsight) refers to unused slots
> whose orphaned inodes need to be cleaned up.
>
> Consider the case of a 4 node cluster having nodes 0, 1, 2, 3.
> Say node 0 removes a file that is in-use on node 1. Node 0 will
> move the inode to its orphan directory. Then say it umounts.
> At this stage, say node 1 dies.
>
> One of the surviving nodes will recover the node 1's slot. That
> includes replaying its journal and cleaning up its orphan directory.
>
> But what about the orphan directory that node 0 used that has that
> inode that was in use on node 1. That needs to be cleaned up too.
>
> The replay map, populated with unused slots, will contain the slot
> used by node 0.
Thanks Sunil. This example clears a lot of doubts.
--
Goldwyn
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-11 15:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-08 19:03 [Ocfs2-devel] Question: recovery map vs replay map Goldwyn Rodrigues
2010-10-08 19:50 ` Sunil Mushran
2010-10-08 21:09 ` Joel Becker
2010-10-11 15:32 ` Goldwyn Rodrigues
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.