[Ocfs2-devel] [PATCH 5/5] ocfs2: Disable orphan scanning for local and hard-ro mounts

Joel Becker Joel.Becker at oracle.com
Mon Jun 22 09:17:08 PDT 2009


On Fri, Jun 19, 2009 at 09:41:30PM -0700, Joel Becker wrote:
> 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.

	Actually, this lock is only ever taken as EX.  Why is there even
an ex argument to the function?

Joel

-- 

Life's Little Instruction Book #30

	"Never buy a house without a fireplace."

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