On Tue, Jan 26, 2010 at 5:01 AM, Josef Bacik <jo...@redhat.com> wrote: > Because orphan cleanup now happens well after the fs is all initialized and > such, we can run into this problem where we find orphan entries that were just > added to the fs, not ones that were added previously during a crash. This > does > not bode well for the system, and results in a couple of odd things happening, > like truncate being run on non-regular files. In order to fix this we just > check and see if the inode has been added to the in-memory orphan list, and if > it has, set the key to it's inode number - 1 so we don't find this orphan > entry > again, and continue searching. > > This problem kept popping up while running xfs tests, and was 100% > reproduceable. With this patch the problem no longer happens. Thanks, >
Hi Josef, I think this problem was introduced by your previous orphan cleanup fix. Before I introduced the orphan cleanup regression, orphan cleanup on a subvol was triggered by the first access. Your previous orphan clean fix broke this rule, orphan clean is triggered when the first time btrfs_lookup finds a valid inode. I think it's better to keep the old rule. revert your previous changes and add code to open_ctree() to do orphan cleanup for the default subvol. Regards Yan, Zheng -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html