[Ocfs2-devel] What's the need of OCFS2_INODE_MAYBE_ORPHANED?

Joel Becker jlbec at evilplan.org
Mon Jan 13 07:39:56 PST 2014


On Thu, Jan 09, 2014 at 07:35:05AM -0600, Goldwyn Rodrigues wrote:
> On 01/09/2014 04:23 AM, Joel Becker wrote:
> >Unlink can happen from anywhere, but only the last closing node can
> >actually remove the file.  MAYBE_ORPHANED tells the node to try for
> >removal at close time.  It is absolutely necessary.
> >
> 
> The reason I asked the query is that OCFS2_INODE_MAYBE_ORPHANED is
> being set at every dentry downconvert. Is this really necessary
> because every dentry downconvert does not turn into unlink? (I know
> it says maybe :/ )
> 
> Is it okay to set it when the open_lock fails or is it too late in
> the process? If another node has performed an unlink, it would need
> to get the open lock before it performs the inode wipe. So we should
> be safe that way? Is there anything incorrect in this design?

It's not safe.  Srini has already answered this on the other part of the
thread.  I'll address your other comments there.

Joel

> 
> 
> -- 
> Goldwyn

-- 

"You look in her eyes, the music begins to play.
 Hopeless romantics, here we go again."

			http://www.jlbec.org/
			jlbec at evilplan.org



More information about the Ocfs2-devel mailing list