Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751854Ab0HRXYV (ORCPT ); Wed, 18 Aug 2010 19:24:21 -0400 Received: from mail-in-16.arcor-online.net ([151.189.21.56]:54260 "EHLO mail-in-16.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751424Ab0HRXYR (ORCPT ); Wed, 18 Aug 2010 19:24:17 -0400 X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-04.arcor-online.net 49A88A9DD1 Message-Id: From: Bodo Eggert <7eggert@web.de> Subject: Re: [PATCH 14/38] fallthru: ext2 fallthru support To: Miklos Szeredi , miklos@szeredi.hu, jack@suse.cz, agruen@suse.de, viro@zeniv.linux.org.uk, jblunck@suse.de, hch@infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, tytso@mit.edu, linux-ext4@vger.kernel.org, Valerie Aurora Reply-To: 7eggert@gmx.de Date: Thu, 19 Aug 2010 01:24:07 +0200 References: User-Agent: KNode/0.10.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1746 Lines: 36 Miklos Szeredi wrote: > On Tue, 17 Aug 2010, Valerie Aurora wrote: >> > - hard links to make sure a separate inode is not necessary for each >> > whiteout/fallthrough entry >> >> The problem with hard links is that you run into hard link limits. I >> don't think we can do hard links for whiteouts and fallthrus. Each >> whiteout or fallthru will cost an inode if we implement them as >> extended attributes. This cost has to be balanced against the cost of >> implementing them as dentries, which is mainly code complexity in >> individual file systems. Not knowing the details, I'd suggest to implement a generic function to create an attributed inode and let the fs override it to create an unlinked-file-dentry instead. Benefit: All fs supporting extended attributes will be able to support whiteout. If the fs has other means of supporting whiteout, they may fake the attribute. Possible problems: - Having two ways of reporting a whiteout? Or can it be reported using a (static) fake inode? - How do you un-whiteout while (not) having an overlaying fs? > get_unlinked_inode() is a great idea. But I feel that individual > inodes for each fallthrough is excessive. It'll make the first > readdir() really really expensive and wastes a lot of disk and memory > for no good reason. > > Not sure how to fix the hard link limits problem though... Do a hardlink if you can create a hard link, otherwise use a fresh inode and use that for the next hardlink(s). -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/