From: Mikulas Patocka <mikulas@twibright.com>
To: Taesoo Kim <tsgatesv@gmail.com>
Cc: linux-kernel@vger.kernel.org, taesoo@gatech.edu,
changwoo@gatech.edu, sanidhya@gatech.edu, blee@gatech.edu,
csong84@gatech.edu
Subject: Re: [PATCH 1/1] hpfs: update ctime/mtime of old/new_dir
Date: Tue, 11 Aug 2015 21:40:40 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.00.1508112138210.2144@leontynka> (raw)
In-Reply-To: <1427232308-22550-1-git-send-email-tsgatesv@gmail.com>
On Tue, 24 Mar 2015, Taesoo Kim wrote:
> Upon successful rename(), update ctime and mtime of
> old/new_dir, as posix specifies.
>
> Signed-off-by: Taesoo Kim <tsgatesv@gmail.com>
> ---
> fs/hpfs/namei.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c
> index bdbc2c3..8d8669c 100644
> --- a/fs/hpfs/namei.c
> +++ b/fs/hpfs/namei.c
> @@ -600,6 +600,12 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry,
> if (S_ISDIR(i->i_mode)) {
> inc_nlink(new_dir);
> drop_nlink(old_dir);
> +
> + old_dir->i_ctime.tv_sec = old_dir->i_mtime.tv_sec = local_to_gmt(old_dir->i_sb, get_seconds());
> + old_dir->i_ctime.tv_nsec = old_dir->i_mtime.tv_nsec = 0;
> +
> + new_dir->i_ctime.tv_sec = new_dir->i_mtime.tv_sec = local_to_gmt(new_dir->i_sb, get_seconds());
> + new_dir->i_ctime.tv_nsec = new_dir->i_mtime.tv_nsec = 0;
> }
> if ((fnode = hpfs_map_fnode(i->i_sb, i->i_ino, &bh))) {
> fnode->up = cpu_to_le32(new_dir->i_ino);
> --
> 2.3.3
Hi
The patch is buggy - it only changes time in memory and never saves it to
the disk, it doesn't change time when we rename non-directory entry. It
also doesn't change time on other directory modifications - creating or
deleting files.
I will send a correct patch at the beginning of the next merge window.
Mikuklas
prev parent reply other threads:[~2015-08-11 19:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-24 21:25 Taesoo Kim
2015-08-11 19:40 ` Mikulas Patocka [this message]
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=alpine.DEB.2.00.1508112138210.2144@leontynka \
--to=mikulas@twibright.com \
--cc=blee@gatech.edu \
--cc=changwoo@gatech.edu \
--cc=csong84@gatech.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=sanidhya@gatech.edu \
--cc=taesoo@gatech.edu \
--cc=tsgatesv@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 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®