From: Arnd Bergmann <arnd@arndb.de>
To: "Ernesto A. Fernández" <ernesto.mnd.fernandez@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
y2038 Mailman List <y2038@lists.linaro.org>,
Vyacheslav Dubeyko <slava@dubeyko.com>,
Deepa Dinamani <deepa.kernel@gmail.com>, Jan Kara <jack@suse.cz>,
Jeff Layton <jlayton@redhat.com>,
Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] hfsplus: return inode birthtime for statx
Date: Fri, 22 Jun 2018 16:32:25 +0200 [thread overview]
Message-ID: <CAK8P3a1io5zfDwZXV771cw3AzVu-gK4Vs2UAh9U2pQA=dtN_yg@mail.gmail.com> (raw)
In-Reply-To: <20180620224553.wfz6abuvvz4ul42d@eaf>
On Thu, Jun 21, 2018 at 12:45 AM, Ernesto A. Fernández
<ernesto.mnd.fernandez@gmail.com> wrote:
>> --- a/fs/hfsplus/inode.c
>> +++ b/fs/hfsplus/inode.c
>> @@ -276,6 +276,19 @@ static int hfsplus_setattr(struct dentry *dentry, struct iattr *attr)
>> return 0;
>> }
>>
>> +int hfsplus_getattr(const struct path *path, struct kstat *stat,
>> + u32 request_mask, unsigned int query_flags)
>> +{
>> + struct inode *inode = d_backing_inode(path->dentry);
>
> I think d_inode() is better. They work the same, but "normal filesystems
> should not use this", according to the d_backing_inode() documentation.
>
Right, definitely. I copied it from vfs_getattr_nosec() without thinking about
it much. I see how David Howells put that d_backing_inode() there, but
still don't understand it.
>> @@ -335,6 +348,7 @@ int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end,
>>
>> static const struct inode_operations hfsplus_file_inode_operations = {
>> .setattr = hfsplus_setattr,
>> + .getattr = hfsplus_getattr,
>> .listxattr = hfsplus_listxattr,
>> #ifdef CONFIG_HFSPLUS_FS_POSIX_ACL
>> .get_acl = hfsplus_get_posix_acl,
>> --
>> 2.9.0
>>
>
> What about symlinks and special files?
My mistake again, thanks for pointing that out. Doing the symlinks correctly
here would actually add a bit more complexity as they use the generic
page_symlink_inode_operations at the moment.
I think I'd rather just retract this patch and let someone else handle it if
they actually want this feature. I only added it because it seemed trivial
to do, but that was clearly not true. ;-)
Arnd
next prev parent reply other threads:[~2018-06-22 14:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 16:02 [PATCH 1/3] hfs: stop using timespec based interfaces Arnd Bergmann
2018-06-19 16:02 ` [PATCH 2/3] hfsplus: " Arnd Bergmann
2018-06-24 3:11 ` Ernesto A. Fernández
2018-06-19 16:02 ` [PATCH 3/3] hfsplus: return inode birthtime for statx Arnd Bergmann
2018-06-20 22:45 ` Ernesto A. Fernández
2018-06-22 14:32 ` Arnd Bergmann [this message]
2018-06-19 17:03 ` [PATCH 1/3] hfs: stop using timespec based interfaces Viacheslav Dubeyko
2018-06-19 19:42 ` Arnd Bergmann
2018-06-20 16:55 ` Viacheslav Dubeyko
2018-06-20 19:55 ` Arnd Bergmann
2018-06-22 14:19 ` Arnd Bergmann
2018-07-31 23:37 ` Ernesto A. Fernández
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAK8P3a1io5zfDwZXV771cw3AzVu-gK4Vs2UAh9U2pQA=dtN_yg@mail.gmail.com' \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=deepa.kernel@gmail.com \
--cc=ernesto.mnd.fernandez@gmail.com \
--cc=jack@suse.cz \
--cc=jlayton@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=slava@dubeyko.com \
--cc=viro@zeniv.linux.org.uk \
--cc=y2038@lists.linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).