All of lore.kernel.org
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Chung-Chiang Cheng <cccheng@synology.com>
Cc: linux-fsdevel@vger.kernel.org, kernel@cccheng.net, shepjeng@gmail.com
Subject: Re: [PATCH v4 3/3] fat: report creation time in statx
Date: Thu, 28 Apr 2022 02:45:22 +0900	[thread overview]
Message-ID: <87bkwmxvwt.fsf@mail.parknet.co.jp> (raw)
In-Reply-To: <20220423032348.1475539-3-cccheng@synology.com> (Chung-Chiang Cheng's message of "Sat, 23 Apr 2022 11:23:48 +0800")

Chung-Chiang Cheng <cccheng@synology.com> writes:

> diff --git a/fs/fat/namei_vfat.c b/fs/fat/namei_vfat.c
> index 5369d82e0bfb..9187979fed5d 100644
> --- a/fs/fat/namei_vfat.c
> +++ b/fs/fat/namei_vfat.c
> @@ -781,6 +781,7 @@ static int vfat_create(struct user_namespace *mnt_userns, struct inode *dir,
>  	}
>  	inode_inc_iversion(inode);
>  	fat_truncate_time(inode, &ts, S_ATIME|S_CTIME|S_MTIME);
> +	fat_truncate_crtime(MSDOS_SB(sb), &MSDOS_I(inode)->i_crtime, &MSDOS_I(inode)->i_crtime);
>  	/* timestamp is already written, so mark_inode_dirty() is unneeded. */
>  
>  	d_instantiate(dentry, inode);

Probably, above should be the follow line?

	fat_truncate_crtime(MSDOS_SB(sb), &ts, &MSDOS_I(inode)->i_crtime);

And furthermore, this is missing to add it to mkdir(2)? And another one,
we would have to update vfat_build_slots() for crtime? I'm not checking
fully though, this seems to need isvfat test

	fat_time_unix2fat(sbi, ts, &time, &date, &time_cs);
	de->time = de->ctime = time;
	de->date = de->cdate = de->adate = date;
	de->ctime_cs = time_cs;

Thanks.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

  reply	other threads:[~2022-04-27 17:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-23  3:23 [PATCH v4 1/3] fat: split fat_truncate_time() into separate functions Chung-Chiang Cheng
2022-04-23  3:23 ` [PATCH v4 2/3] fat: ignore ctime updates, and keep ctime identical to mtime in memory Chung-Chiang Cheng
2022-04-23  3:23 ` [PATCH v4 3/3] fat: report creation time in statx Chung-Chiang Cheng
2022-04-27 17:45   ` OGAWA Hirofumi [this message]
2022-04-30  4:15     ` Chung-Chiang Cheng
2022-04-27 17:47 ` [PATCH v4 1/3] fat: split fat_truncate_time() into separate functions OGAWA Hirofumi
2022-04-30  4:12   ` Chung-Chiang Cheng

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=87bkwmxvwt.fsf@mail.parknet.co.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=cccheng@synology.com \
    --cc=kernel@cccheng.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=shepjeng@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.