linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: y2038@lists.linaro.org
Cc: Trond Myklebust <trond.myklebust@primarydata.com>,
	Deepa Dinamani <deepa.kernel@gmail.com>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	Linux Network Devel Mailing List <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
	Jeff Layton <jlayton@poochiereds.net>,
	Anna Schumaker <anna.schumaker@netapp.com>
Subject: Re: [Y2038] [PATCH 8/8] net: sunrpc: Replace CURRENT_TIME by current_fs_time()
Date: Wed, 24 Feb 2016 16:08:23 +0100	[thread overview]
Message-ID: <3612929.btSLWR6eWu@wuerfel> (raw)
In-Reply-To: <CAHQdGtR26gqy7GzWui-bnb+W5W1PnUL_=okBZwz+XFmj_Q4A3A@mail.gmail.com>

On Monday 22 February 2016 10:34:31 Trond Myklebust wrote:
> > diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
> > index 31789ef..bab3187 100644
> > --- a/net/sunrpc/rpc_pipe.c
> > +++ b/net/sunrpc/rpc_pipe.c
> > @@ -477,7 +477,9 @@ rpc_get_inode(struct super_block *sb, umode_t mode)
> >                 return NULL;
> >         inode->i_ino = get_next_ino();
> >         inode->i_mode = mode;
> > -       inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
> > +       inode->i_atime = current_fs_time(sb);
> > +       inode->i_mtime = inode->i_atime;
> > +       inode->i_ctime = inode->i_atime;
> >         switch (mode & S_IFMT) {
> >         case S_IFDIR:
> >                 inode->i_fop = &simple_dir_operations;
> 
> Why would we care? This is a pseudo-fs. There is no expectation w.r.t.
> timestamp accuracy or resolution.

As Deepa said, the primary goal is to unify the interface, so we have only
one place function that handles setting the time in an inode, and we want
to avoid CURRENT_TIME, as that is currently used in a couple of places
for things other than inode timestamps that we don't want to convert to
64-bit times at the same time.

current_fs_time() has a very small overhead compared to CURRENT_TIME,
if you think it's worth avoiding that, we could introduce a
current_pseudo_fs_time() function that does not take a superblock
argument but is more tied to inode timestamps than CURRENT_TIME is.

	Arnd

      parent reply	other threads:[~2016-02-24 15:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 15:17 [PATCH 0/8] Remove CURRENT_TIME and CURRENT_TIME_SEC - PART 2 Deepa Dinamani
2016-02-22 15:17 ` [PATCH 1/8] fs: debugfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani
2016-02-22 15:17 ` [PATCH 2/8] fs: logfs: " Deepa Dinamani
2016-02-22 15:17 ` [PATCH 3/8] fs: devpts: " Deepa Dinamani
2016-02-22 15:17 ` [PATCH 4/8] fs: configfs: " Deepa Dinamani
2016-02-24  9:02   ` Joel Becker
2016-02-26  9:45   ` stoph Hellwig
2016-02-22 15:17 ` [PATCH 5/8] fs: proc: " Deepa Dinamani
2016-02-22 15:17 ` [PATCH 6/8] fs: ramfs: " Deepa Dinamani
2016-02-22 15:17 ` [PATCH 7/8] fs: kernfs: " Deepa Dinamani
2016-02-22 15:17 ` [PATCH 8/8] net: sunrpc: " Deepa Dinamani
2016-02-22 15:34   ` Trond Myklebust
2016-02-22 15:47     ` Deepa Dinamani
2016-02-24 15:08     ` Arnd Bergmann [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=3612929.btSLWR6eWu@wuerfel \
    --to=arnd@arndb.de \
    --cc=anna.schumaker@netapp.com \
    --cc=bfields@fieldses.org \
    --cc=davem@davemloft.net \
    --cc=deepa.kernel@gmail.com \
    --cc=jlayton@poochiereds.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=trond.myklebust@primarydata.com \
    --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).