[Ocfs2-devel] [PATCH] ocfs2: flush dentry lock drop when sync ocfs2 volume.

Joel Becker Joel.Becker at oracle.com
Mon Jul 20 13:25:24 PDT 2009


On Mon, Jul 20, 2009 at 12:08:46PM -0700, Joel Becker wrote:
> On Mon, Jul 20, 2009 at 02:34:01PM +0200, Jan Kara wrote:
> > +void ocfs2_drop_dl_inodes(struct work_struct *work)
> > +{
> > +	struct ocfs2_super *osb = container_of(work, struct ocfs2_super,
> > +					       dentry_lock_work);
> > +
> > +	__ocfs2_drop_dl_inodes(osb, DL_INODE_DROP_COUNT);
> > +	/*
> > +	 * Don't queue dropping if umount is in progress. We flush the
> > +	 * list in ocfs2_dismount_volume
> > +	 */
> > +	spin_lock(&dentry_list_lock);
> > +	if (osb->dentry_lock_list &&
> > +	    !ocfs2_test_osb_flag(osb, OCFS2_OSB_UMOUNT))
> >  		queue_work(ocfs2_wq, &osb->dentry_lock_work);
> >  	spin_unlock(&dentry_list_lock);
> >  }
> 
> 	The approach is good, but boy, I wish we could use vol_state
> instead of a flag.  We are now tracking the mount/umount state in how
> many places?

	A quick #ocfs2 discussion ensued.  Let's rename OCFS2_OSB_UMOUNT
to OCFS2_OSB_DROP_DENTRY_LOCK_IMMED.  That flag doesn't mean anything
other than the dentry lock behavior, so we'll name it specific to its
purpose.
	I think the rest of the patch looked good, so please resend with
the renamed flag and a clean patch header and I'll verify and apply.

Joel

-- 

Life's Little Instruction Book #20

	"Be forgiving of yourself and others."

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