From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve French Subject: Re: ext4 - getting at birth time (file create time) and getting/setting nanosecond time stamps and utime Date: Mon, 19 Oct 2009 22:31:19 -0500 Message-ID: <524f69650910192031n70514556k404f67adeb51374a@mail.gmail.com> References: <524f69650910191017j7883ed7bvdb0329d1a73f34e4@mail.gmail.com> <524f69650910191245t2eb7ffb2r770a7373ec2ba1e3@mail.gmail.com> <5715838A-4568-4273-B1C1-983B348580B6@sun.com> <524f69650910191524k5c9d766fu430c4f7b17d86952@mail.gmail.com> <890110E9-FA69-4356-9BEB-925F98487C52@sun.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel , samba-technical To: Andreas Dilger Return-path: Received: from mail-px0-f171.google.com ([209.85.216.171]:43288 "EHLO mail-px0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751205AbZJTDbO convert rfc822-to-8bit (ORCPT ); Mon, 19 Oct 2009 23:31:14 -0400 Received: by pxi1 with SMTP id 1so949748pxi.33 for ; Mon, 19 Oct 2009 20:31:19 -0700 (PDT) In-Reply-To: <890110E9-FA69-4356-9BEB-925F98487C52@sun.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Oct 19, 2009 at 6:12 PM, Andreas Dilger wrote= : > On 19-Oct-09, at 16:24, Steve French wrote: >> some of the performance benefit - path based could be slightly >> slower (due to path revalidation, and access checks) than >> handle based calls. >> =A0 =A0 =A0 int (*setxattr) (struct dentry *, const char *,const voi= d >> *,size_t,int); >> =A0 =A0 =A0 ssize_t (*getxattr) (struct dentry *, const char *, void= *, size_t); >> =A0 =A0 =A0 ssize_t (*listxattr) (struct dentry *, char *, size_t); >> =A0 =A0 =A0 int (*removexattr) (struct dentry *, const char *); > > I'm not sure I understand your point. =A0sys_fgetxattr() maps directl= y to > vfs_getxattr(), and while it still does permission checks, that doesn= 't > have anything to do with pathname revalidation AFAICS. > > There are an equal number of permission checks in sys_fstat->vfs_geta= ttr() > as in sys_fgetxattr->vfs_getxattr(). Good point. Looking more carefully I think you are right - the path revalidation is skipped in fgetxattr so it probably isn't much slower if at all (tha= n a handle based ioctl call would be). >>> As for being able to write to the "create time" attribute, I would = prefer >>> that this be a filesystem mount option. =A0For some users (myself i= ncluded) >>> I don't care whether Windows is unhappy that it can't update this >>> creation >>> time - I'd prefer to know when a file is actually created. > If this is a flag that a user can configure/select themselves, then i= t > is completely useless to me. =A0If it is a mount option and/or possib= ly an > additional process capability that would be more useful. Yes ... there is a precedent for a process capability for something sim= ilar (e.g. a Windows user must have both the "backup privilege" in his process capability and specify a flag indicating he wants to use "backup intent" for certain operations). There are already 33 capabilities in include/linux/capability.h, some as narrow as this. --=20 Thanks, Steve -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html