mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: liubaolin <liubaolin12138@163.com>
To: Xuewen Wang <wangxuewen@kylinos.cn>,
	linkinjeon@kernel.org, hyc.lee@gmail.com
Cc: ntfs@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] ntfs: report birth time for symbolic links
Date: Wed, 14 Oct 2026 09:35:16 +0800	[thread overview]
Message-ID: <95d849be-0e81-41dd-a508-ef46fad08c3d@163.com> (raw)
In-Reply-To: <20261014011824.493241-1-wangxuewen@kylinos.cn>



在 2026/10/14 09:18, Xuewen Wang 写道:
> NTFS already loads the creation time into i_crtime and reports it through
> ntfs_getattr(). However, the symbolic-link inode operations omit getattr,
> so statx() with AT_SYMLINK_NOFOLLOW falls back to generic_fillattr() and
> does not return STATX_BTIME for the link itself.
> 
> Use ntfs_getattr() for symbolic links to expose their stored creation time.
> 
> Signed-off-by: Xuewen Wang <wangxuewen@kylinos.cn>
> ---
> Tested in QEMU with WSL and native symlinks, including dangling links and
> links to directories. Birth times survive inode cache eviction, remounts
> and a fresh boot. Queries that follow a link still report the target's
> creation time.
> 
>   fs/ntfs/file.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
> index 58afd310d57b..58aad7f5c6c5 100644
> --- a/fs/ntfs/file.c
> +++ b/fs/ntfs/file.c
> @@ -1556,6 +1556,7 @@ const struct inode_operations ntfs_file_inode_ops = {
>   const struct inode_operations ntfs_symlink_inode_operations = {
>   	.get_link	= ntfs_get_link,
>   	.setattr	= ntfs_setattr,
> +	.getattr	= ntfs_getattr,
>   	.listxattr	= ntfs_listxattr,
>   	.fileattr_get	= ntfs_fileattr_get,
>   	.fileattr_set	= ntfs_fileattr_set,

Looks good to me.

Reviewed-by: Baolin Liu <liubaolin@kylinos.cn>


  reply	other threads:[~2026-10-14  1:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14  1:18 Xuewen Wang
2026-10-14  1:35 ` liubaolin [this message]
2026-10-14 12:44 ` Namjae Jeon

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=95d849be-0e81-41dd-a508-ef46fad08c3d@163.com \
    --to=liubaolin12138@163.com \
    --cc=hyc.lee@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntfs@lists.linux.dev \
    --cc=wangxuewen@kylinos.cn \
    /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

all inboxes | Powered by JetHome®