[Ocfs2-devel] [PATCH 5/5] ocfs2: Disable orphan scanning for local and hard-ro mounts
Joel Becker
Joel.Becker at oracle.com
Fri Jun 19 21:41:30 PDT 2009
On Fri, Jun 19, 2009 at 04:53:19PM -0700, Sunil Mushran wrote:
> @@ -2392,11 +2398,13 @@ void ocfs2_orphan_scan_unlock(struct ocfs2_super *osb, u32 seqno, int ex)
> struct ocfs2_orphan_scan_lvb *lvb;
> int level = ex ? DLM_LOCK_EX : DLM_LOCK_PR;
>
> - lockres = &osb->osb_orphan_scan.os_lockres;
> - lvb = ocfs2_dlm_lvb(&lockres->l_lksb);
> - lvb->lvb_version = OCFS2_ORPHAN_LVB_VERSION;
> - lvb->lvb_os_seqno = cpu_to_be32(seqno);
> - ocfs2_cluster_unlock(osb, lockres, level);
> + if (!ocfs2_is_hard_readonly(osb) && !ocfs2_mount_local(osb)) {
> + lockres = &osb->osb_orphan_scan.os_lockres;
> + lvb = ocfs2_dlm_lvb(&lockres->l_lksb);
> + lvb->lvb_version = OCFS2_ORPHAN_LVB_VERSION;
> + lvb->lvb_os_seqno = cpu_to_be32(seqno);
> + ocfs2_cluster_unlock(osb, lockres, level);
This should only be setting the LVB if the level was EX.
Joel
--
"Up and down that road in our worn out shoes,
Talking bout good things and singing the blues."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-devel
mailing list