From: Jeff Layton <jlayton@kernel.org>
To: Luis Henriques <lhenriques@suse.com>, Sage Weil <sage@redhat.com>,
Ilya Dryomov <idryomov@gmail.com>
Cc: Marc Roos <M.Roos@f1-outsourcing.eu>,
ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ceph: fix snapshot directory timestamps
Date: Mon, 16 Mar 2020 13:34:53 -0400 [thread overview]
Message-ID: <414d5d568ed3aad086e56bfc2e27c17d9865b504.camel@kernel.org> (raw)
In-Reply-To: <20200311110538.GB58729@suse.com>
On Wed, 2020-03-11 at 11:05 +0000, Luis Henriques wrote:
> The .snap directory timestamps are kept at 0 (1970-01-01 00:00), which
> isn't consistent with what the fuse client does. This patch makes the
> behaviour consistent, by setting these timestamps (atime, btime, ctime,
> mtime) to those of the parent directory.
>
> Cc: Marc Roos <M.Roos@f1-outsourcing.eu>
> Signed-off-by: Luis Henriques <lhenriques@suse.com>
> ---
> fs/ceph/inode.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
> index d01710a16a4a..968d55ca898d 100644
> --- a/fs/ceph/inode.c
> +++ b/fs/ceph/inode.c
> @@ -82,10 +82,14 @@ struct inode *ceph_get_snapdir(struct inode *parent)
> inode->i_mode = parent->i_mode;
> inode->i_uid = parent->i_uid;
> inode->i_gid = parent->i_gid;
> + inode->i_mtime = parent->i_mtime;
> + inode->i_ctime = parent->i_ctime;
> + inode->i_atime = parent->i_atime;
> inode->i_op = &ceph_snapdir_iops;
> inode->i_fop = &ceph_snapdir_fops;
> ci->i_snap_caps = CEPH_CAP_PIN; /* so we can open */
> ci->i_rbytes = 0;
> + ci->i_btime = ceph_inode(parent)->i_btime;
>
> if (inode->i_state & I_NEW)
> unlock_new_inode(inode);
Merged into testing branch -- thanks for the patch!
--
Jeff Layton <jlayton@kernel.org>
prev parent reply other threads:[~2020-03-16 17:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-11 11:05 [PATCH v2] ceph: fix snapshot directory timestamps Luis Henriques
2020-03-16 17:34 ` Jeff Layton [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=414d5d568ed3aad086e56bfc2e27c17d9865b504.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=M.Roos@f1-outsourcing.eu \
--cc=ceph-devel@vger.kernel.org \
--cc=idryomov@gmail.com \
--cc=lhenriques@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sage@redhat.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;
as well as URLs for NNTP newsgroup(s).