From: "Aneesh Kumar K. V" Subject: Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and register them Date: Sun, 27 Jun 2010 23:47:21 +0530 Lines: 100 Message-ID: <871vbscpce.fsf@linux.vnet.ibm.com> References: <20100625125306.7f9b1966@tlielax.poochiereds.net> <4C24A606.5040001@suse.de> <1277220214-3597-1-git-send-email-sjayaraman@suse.de> <9822.1277312573@redhat.com> <22697.1277470549@redhat.com> <18628.1277502398@redhat.com> <20100625182651.36800d06@tlielax.poochiereds.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: David Howells , Jeff Layton , Jeff Layton , linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, samba-technical@lists.samba.org, Suresh Jayaraman To: Mingming Cao , Steve French , "DENIEL Philippe" X-From: linux-kernel-owner@vger.kernel.org Sun Jun 27 20:18:00 2010 Return-path: Envelope-to: glk-linux-kernel-3@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OSwQZ-0003Kh-Vu for glk-linux-kernel-3@lo.gmane.org; Sun, 27 Jun 2010 20:18:00 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754631Ab0F0SRq convert rfc822-to-quoted-printable (ORCPT ); Sun, 27 Jun 2010 14:17:46 -0400 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:52430 "EHLO e23smtp07.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753837Ab0F0SRl convert rfc822-to-8bit (ORCPT ); Sun, 27 Jun 2010 14:17:41 -0400 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [202.81.31.247]) by e23smtp07.au.ibm.com (8.14.4/8.13.1) with ESMTP id o5RIHbfJ012483; Mon, 28 Jun 2010 04:17:37 +1000 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o5RIHW9f1130634; Mon, 28 Jun 2010 04:17:32 +1000 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o5RIHVcR027534; Mon, 28 Jun 2010 04:17:32 +1000 Received: from skywalker.linux.vnet.ibm.com ([9.77.196.78]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o5RIHMFl027485; Mon, 28 Jun 2010 04:17:24 +1000 In-Reply-To: User-Agent: Notmuch/ (http://notmuchmail.org) Emacs/24.0.50.1 (i686-pc-linux-gnu) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Archived-At: On Fri, 25 Jun 2010 17:52:24 -0700, Mingming Cao wrot= e: >=20 >=20 > Steve French wrote on 06/25/2010 04:05:30 PM: >=20 > > Steve French > > 06/25/2010 04:05 PM > > > > To > > > > Jeff Layton , "Aneesh Kumar K.V" > > , Mingming Cao/Beaverton/IBM@IBMUS > > > > cc > > > > David Howells , Suresh Jayaraman > > , linux-cifs@vger.kernel.org, linux- > > fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, samba- > > technical@lists.samba.org, Jeff Layton > > > > Subject > > > > Re: [RFC][PATCH 06/10] cifs: define inode-level cache object and > > register them > > > > On Fri, Jun 25, 2010 at 5:26 PM, Jeff Layton wr= ote: > > > > > > On Fri, 25 Jun 2010 22:46:38 +0100 > > > David Howells wrote: > > > > > > > Jeff Layton wrote: > > > > > > > > > Looks like it mostly uses the ctime. IMO, the mtime would be = a > better > > > > > choice since it changes less frequently, but I don't guess th= at it > > > > > matters very much. > > > > > > > > I'd've thought mtime changes more frequently since that's > > altered when data is > > > > written. =C2=A0ctime is changed when attributes are changed. > > > > > > > > > > IIUC, updating mtime for a write is also an attribute change, and= that > > > affects ctime. According to the stat(2) manpage: > > > > > > =C2=A0 =C2=A0 =C2=A0 The field st_ctime is changed by writing or = by setting > > =C2=A0inode =C2=A0informa- > > > =C2=A0 =C2=A0 =C2=A0 tion (i.e., owner, group, link count, mode, = etc.). > > > > > > > Note that Ext4 appears to have a file creation time field in it= s > inode > > > > (struct ext4_inode::i_crtime[_extra]). =C2=A0Can Samba be made = to use > that? > > > > > > > > > > Is it exposed to userspace in any (standard) way? It would be han= dy to > > > have that. While we're wishing...it might also be nice to have a > > > standard way to get at the i_generation from userspace too. > > > > > > > Yes - I have talked with MingMing and Aneesh about those (NFS may > > someday be able to use those too).=C2=A0 An obstacle in the past ha= d been > > that samba server stores its own fake creation time in an ndr encod= ed > > xattr which complicates things. > > > > MingMing/Annesh - > > Xattr or other way to get at birth time? > > > > >=20 > Not yet, > The ext4 file creation time only accesable from the kernel at the mo= ment. > There were discussion > to make this information avaliable via xattr before, but was rejected= , > since most people > agree that making this info avalibele via stat() is more standard. Ho= wever > modifying stat() would imply > big interface change. thus no action has been taken yet. NFS ganesha pNFS also had a requirement for getting i_generation and inode number in userspace. So may be we should now look at updating stat or add a variant syscall that include i_generation and create time in the return value -aneesh