Re: [PATCH 04/28] OCFS2 is screwy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 01, 2006 at 04:52:43PM -0700, Dave Hansen wrote:
> OCFS2 plays some games with i_nlink.  It modifies it a bunch in
> its unlink function, but rolls back the changes if an error
> occurs.  So, we can't just assume that iput_final() will happen
> whenever i_nlink hits 0 in ocfs's unlink().
Huh? Did you read the code? Or is it just easier to call things "screwy" and
start hacking away?

i_nlink only gets rolled back in the case that the file system wasn't able to
actually complete the unlink / orphan operation. The idea is to keep it in
sync with what's actually on disk. So when we call iput() in the unlink
path, disk and struct inode should be accurate.

> Create a helper function to do the hard work of i_nlink hitting
> zero, and use it in ocfs2.
Anyway, it's only done that way because at the time it seemed the cleanest
approach - there's no technical reason why we must roll it back. So a helper
function doesn't seem necessary - you'd just have to look through the small
amount of code and re-order things a bit.

Unfortunately you didn't actually put the contents of
__inode_set_awaiting_final_iput() in this patch, so I'll have to dig through
the others to see what exactly you're up to. In the meantime I'd say this
patch is either unecessary or just plain wrong.
	--Mark

--
Mark Fasheh
Senior Software Developer, Oracle
[email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux