fs/dlm/recoverd.c
Source file repositories/reference/linux-study-clean/fs/dlm/recoverd.c
File Facts
- System
- Linux kernel
- Corpus path
fs/dlm/recoverd.c- Extension
.c- Size
- 11772 bytes
- Lines
- 469
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
dlm_internal.hlockspace.hmember.hdir.hast.hrecover.hlowcomms.hlock.hrequestqueue.hrecoverd.h
Detected Declarations
function Copyrightfunction dlm_release_masters_listfunction dlm_create_root_listfunction dlm_release_root_listfunction list_for_each_entry_safefunction stopfunction ls_recoverfunction do_ls_recoveryfunction dlm_recoverdfunction dlm_recoverd_startfunction dlm_recoverd_stopfunction dlm_recoverd_suspendfunction dlm_recoverd_resume
Annotated Snippet
if (error) {
log_rinfo(ls, "dlm_recover_masters error %d", error);
goto fail_root_list;
}
/*
* Send our locks on remastered rsb's to the new masters.
*/
error = dlm_recover_locks(ls, rv->seq, &root_list);
if (error) {
log_rinfo(ls, "dlm_recover_locks error %d", error);
goto fail_root_list;
}
dlm_set_recover_status(ls, DLM_RS_LOCKS);
error = dlm_recover_locks_wait(ls, rv->seq);
if (error) {
log_rinfo(ls, "dlm_recover_locks_wait error %d", error);
goto fail_root_list;
}
log_rinfo(ls, "dlm_recover_locks %u in",
ls->ls_recover_locks_in);
/*
* Finalize state in master rsb's now that all locks can be
* checked. This includes conversion resolution and lvb
* settings.
*/
dlm_recover_rsbs(ls, &root_list);
} else {
/*
* Other lockspace members may be going through the "neg" steps
* while also adding us to the lockspace, in which case they'll
* be doing the recover_locks (RS_LOCKS) barrier.
*/
dlm_set_recover_status(ls, DLM_RS_LOCKS);
error = dlm_recover_locks_wait(ls, rv->seq);
if (error) {
log_rinfo(ls, "dlm_recover_locks_wait error %d", error);
goto fail_root_list;
}
}
dlm_release_root_list(&root_list);
/*
* Purge directory-related requests that are saved in requestqueue.
* All dir requests from before recovery are invalid now due to the dir
* rebuild and will be resent by the requesting nodes.
*/
dlm_purge_requestqueue(ls);
dlm_set_recover_status(ls, DLM_RS_DONE);
error = dlm_recover_done_wait(ls, rv->seq);
if (error) {
log_rinfo(ls, "dlm_recover_done_wait error %d", error);
goto fail;
}
dlm_clear_members_gone(ls);
dlm_callback_resume(ls);
error = enable_locking(ls, rv->seq);
if (error) {
log_rinfo(ls, "enable_locking error %d", error);
goto fail;
}
error = dlm_process_requestqueue(ls);
if (error) {
log_rinfo(ls, "dlm_process_requestqueue error %d", error);
goto fail;
}
error = dlm_recover_waiters_post(ls);
if (error) {
log_rinfo(ls, "dlm_recover_waiters_post error %d", error);
goto fail;
}
dlm_recover_grant(ls);
Annotation
- Immediate include surface: `dlm_internal.h`, `lockspace.h`, `member.h`, `dir.h`, `ast.h`, `recover.h`, `lowcomms.h`, `lock.h`.
- Detected declarations: `function Copyright`, `function dlm_release_masters_list`, `function dlm_create_root_list`, `function dlm_release_root_list`, `function list_for_each_entry_safe`, `function stop`, `function ls_recover`, `function do_ls_recovery`, `function dlm_recoverd`, `function dlm_recoverd_start`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.