Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932996Ab1FAAjo (ORCPT ); Tue, 31 May 2011 20:39:44 -0400 Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:36206 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758469Ab1FAAjn (ORCPT ); Tue, 31 May 2011 20:39:43 -0400 Date: Tue, 31 May 2011 20:39:42 -0400 From: Christoph Hellwig To: Hugh Dickins Cc: Andrew Morton , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 3/14] tmpfs: take control of its truncate_range Message-ID: <20110601003942.GB4433@infradead.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1164 Lines: 23 > Note that drivers/gpu/drm/i915/i915_gem.c i915_gem_object_truncate() > calls the tmpfs ->truncate_range directly: update that in a separate > patch later, for now just let it duplicate the truncate_inode_pages(). > Because i915 handles unmap_mapping_range() itself at a different stage, > we have chosen not to bundle that into ->truncate_range. In your next series that makes it call the readpae replacement directly it might be nice to also call directly into shmem for hole punching. > I notice that ext4 is now joining ocfs2 and xfs in supporting fallocate > FALLOC_FL_PUNCH_HOLE: perhaps they should support truncate_range, and > tmpfs should support fallocate? But worry about that another time... No, truncate_range and the madvice interface are pretty sad hacks that should never have been added in the first place. Adding FALLOC_FL_PUNCH_HOLE support for shmem on the other hand might make some sense. -- 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/