From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751202Ab2GIRYB (ORCPT ); Mon, 9 Jul 2012 13:24:01 -0400 Received: from mail.digidescorp.com ([50.73.98.161]:36627 "EHLO mail.digidescorp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750915Ab2GIRX7 (ORCPT ); Mon, 9 Jul 2012 13:23:59 -0400 DomainKey-Signature: a=rsa-sha1; s=MDaemon; d=digidescorp.com; c=simple; q=dns; h=message-id:from; b=xWRLPYf8ZdoQAwxrzz/vBIokaoaUEIiJxxRuUiZqWl2jb1hW+Hz7bI/SJbAU ZSVWtE56+3T0qF+FWwSCoegyk5JYJnEYT3PIhr/J2AqtXXsupcj6eUX9s UNXDz2uHLrVoGIkCDuTq7X8TG1ofMgYKuPUjisZuiRr+571oU2rb8E=; X-Spam-Processed: mail.digidescorp.com, Mon, 09 Jul 2012 12:23:57 -0500 (not processed: message from trusted or authenticated source) X-Authenticated-Sender: steve@digidescorp.com X-Return-Path: prvs=1537d3712a=steve@digidescorp.com X-Envelope-From: steve@digidescorp.com X-MDaemon-Deliver-To: linux-kernel@vger.kernel.org Message-ID: <1341854638.2215.37.camel@iscandar.digidescorp.com> Subject: Re: [PATCH 2/2] fat (exportfs): reconnect file handles to evicted inodes/dentries From: "Steven J. Magnani" To: OGAWA Hirofumi Cc: linux-kernel@vger.kernel.org Date: Mon, 09 Jul 2012 12:23:58 -0500 In-Reply-To: <1341853758.2215.34.camel@iscandar.digidescorp.com> References: <1341342576-15394-1-git-send-email-steve@digidescorp.com> <1341342576-15394-3-git-send-email-steve@digidescorp.com> <87pq8bokcp.fsf@devron.myhome.or.jp> <1341606824.2214.14.camel@iscandar.digidescorp.com> <871ukobntl.fsf@devron.myhome.or.jp> <1341623782.2021.9.camel@iscandar> <87wr2g9kh3.fsf@devron.myhome.or.jp> <1341679286.2435.12.camel@iscandar> <87zk7bo6aq.fsf@devron.myhome.or.jp> <1341835422.2215.6.camel@iscandar.digidescorp.com> <87sjd1nj7s.fsf@devron.myhome.or.jp> <1341845277.2215.10.camel@iscandar.digidescorp.com> <87obnooqz7.fsf@devron.myhome.or.jp> <1341851223.2215.22.camel@iscandar.digidescorp.com> <1341853758.2215.34.camel@iscandar.digidescorp.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.3 (3.4.3-1.fc17) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2012-07-09 at 12:09 -0500, Steven J. Magnani wrote: > On Mon, 2012-07-09 at 11:27 -0500, Steven J. Magnani wrote: > > On Tue, 2012-07-10 at 01:10 +0900, OGAWA Hirofumi wrote: > > > If the inode is not on cache anymore, is there the possibility that > > > selects the wrong parent? IIRC, NFS Server can be rebooted at any time > > > while the client using the same file handle. > > > > True, but it's looking like we can just use the default handle > > constructed by export_encode_fh(), namely (i_ino, i_generation, > > parent->i_ino, parent->i_generation). None of those components should > > change in a server reboot. > > I think I misunderstood you when I wrote this. I assumed we were talking > about a restart of nfsd, not the entire machine it was running on. If > there is a danger of mismapping on a reboot isn't that present in the > existing mainline code, i.e. fat_fh_to_dentry()? Ideally, the (i_ino, > i_generation) signature would be different on a reboot, although with > only 2-second granularity in i_generation I suppose that's less likely > than we would prefer. Also I would think that many inodes simply > wouldn't exist in the cache, in which case we would fail the operation > with ESTALE. On further investigation I don't think there is an issue here. i_generation is set to the value returned by get_seconds(), which is wall-clock time, not relative time since boot. ------------------------------------------------------------------------ Steven J. Magnani "I claim this network for MARS! www.digidescorp.com Earthling, return my space modulator!" #include