From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boaz Harrosh Subject: Re: [PATCH ver3] exofs: New truncate sequence Date: Tue, 01 Jun 2010 14:52:28 +0300 Message-ID: <4C04F47C.5020509@panasas.com> References: <4C03ABCA.4050602@panasas.com> <4C04EF92.6060600@panasas.com> <20100601113620.GA4647@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Nick Piggin , linux-fsdevel , open-osd To: Christoph Hellwig Return-path: Received: from daytona.panasas.com ([67.152.220.89]:9393 "EHLO daytona.int.panasas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753128Ab0FALwb (ORCPT ); Tue, 1 Jun 2010 07:52:31 -0400 In-Reply-To: <20100601113620.GA4647@lst.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 06/01/2010 02:36 PM, Christoph Hellwig wrote: > On Tue, Jun 01, 2010 at 02:31:30PM +0300, Boaz Harrosh wrote: >> +static int _do_truncate(struct inode *inode, loff_t newsize) >> { >> struct exofs_i_info *oi = exofs_i(inode); >> int ret; >> >> inode->i_mtime = inode->i_ctime = CURRENT_TIME; >> >> + ret = exofs_oi_truncate(oi, (u64)newsize); >> + EXOFS_DBGMSG("(0x%lx) size=0x%llx\n", inode->i_ino, newsize); >> return ret; > > Maybe I'm beeing picky, but I really don't see the need for this > function either, especially given that is has a single caller. > It's fine. It must stay for a very hidden reason. In the pnfs tree, this inside chunk is preformed from a callback pointer within the pnfs_recall mechanism. The pnfs export layer has a recall facility that receives a pointer to a doer. It will block all layouts, recall the layout, preform the doer let in layouts, and return. So this is split this way to minimize maintenance efforts. See an old patch here: http://git.open-osd.org/gitweb.cgi?p=linux-open-osd.git;a=commitdiff;h=ec3c599368550b0cf792738ae6448c932244df51 specifically the small hunk at inode.c Thanks Boaz