On Wed, Aug 25, 2010 at 01:20:12AM +0900, Ryusuke Konishi wrote: > On Tue, 24 Aug 2010 11:32:14 -0400, Christoph Hellwig wrote: > > On Tue, Aug 24, 2010 at 09:58:23PM +0900, Ryusuke Konishi wrote: > > > Actually, I recently wrote a patchset to unify all super block > > > instances on one device into one sb, which makes the inodes outlive > > > superblock eliminable. > > > > Yes, that's how we handle things everywhere, including btrfs with > > it's subvolumes and snapshots. > > > > > But the patchset has a problem that it cannot shrink a number of > > > versions of namespace when unmounting all snapshots and a current time > > > instance. > > > > Can you explain the issue in more detail? > > Ok, I'll try. > > The current nilfs attaches each snapshot on a mountpoint, instead of > making a sub directory like ".snap/xxx/" in a namespace. > > In the patchset, I binded > > a) The root directory of the current filesystem onto sb->s_root and > mnt->mnt_root. > > b) The root directory of each snapshot onto its mnt->mnt_root. > > Then, > > When I unmounted all snapshots and current filesystem, > nilfs_put_super() was called, but > > generic_shutdown_super() only shrunk the dentry tree of sb->s_root and > didn't shrink dentry trees of snapshots. > > Thus their inodes and dentries were left in memory despite my > intention. > > So, my implementation issue here is how to free dentries and inodes of > snapshots like shrink_dcache_for_umount(sb) does for a single > namespace. Use d_obtain_alias() to allocate roots of unattached subtrees. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html