From: Andreas Dilger <adilger@clusterfs.com>
To: Alexandre Ratchov <alexandre.ratchov@bull.net>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
linux-ext4@vger.kernel.org, nfsv4@linux-nfs.org
Subject: Re: rfc: [patch] change attribute for ext3
Date: Thu, 14 Sep 2006 03:23:18 -0600 [thread overview]
Message-ID: <20060914092318.GA18911@schatzie.adilger.int> (raw)
In-Reply-To: <20060913183001.GA1702@moule.localdomain>
On Sep 13, 2006 20:30 +0200, Alexandre Ratchov wrote:
> On Wed, Sep 13, 2006 at 02:11:11PM -0400, Trond Myklebust wrote:
> > On Wed, 2006-09-13 at 18:42 +0200, Alexandre Ratchov wrote:
> > > the change attribute is a simple counter that is reset to zero on
> > > inode creation and that is incremented every time the inode data is
> > > modified (similarly to the "ctime" time-stamp).
> >
> > I would really have preferred a full-blown 64-bit counter as per
> > RFC3530, but I suppose we could always combine this change attribute
> > with the high word from ctime in order to make up the NFSv4 change
> > attribute. That should keep us safe until someone develops a ramdisk
> > with < 1 nsecond access time.
>
> do you mean something like "(ctime.tv_sec << 32) | change_attribute"? this
> would allow 2^32 inode changes per second.
It might be preferrable, since we are depending on the ctime here anyways,
is to combine this with the nsec-resolution ctime, and kill two birds with
one field in the inode.
The implementation would be to update the ctime+nsec field as normal, but
in the unlikely case that both the second+nsec ctime is the same as before
the nsec value would be incremented by 1. This could happen in case of
low-resolution kernel timers, and would also handle the future case where
the inode is modified more than once in the same nanosecond.
The other benefit is that it allows comparisons between two different
inodes to be more meaningful, instead of just using the seconds + random
version number.
It would be possible/desirable to make the nsec ctime field be part of the
small inode (using the proposed reserved field) instead of the large inode,
since that is a requirement for working with existing ext3 filesystems. The
previous nsec timestamp patch would only need trivial modifications to make
this work, just #define i_ctime_extra to be l_i_reserved1 I believe.
Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.
next prev parent reply other threads:[~2006-09-14 9:23 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-13 16:42 rfc: [patch] change attribute for ext3 Alexandre Ratchov
2006-09-13 18:11 ` Trond Myklebust
2006-09-13 18:30 ` Alexandre Ratchov
2006-09-13 19:06 ` Trond Myklebust
2006-09-13 20:31 ` Randy.Dunlap
2006-09-14 9:23 ` Andreas Dilger [this message]
2006-09-14 13:48 ` Alexandre Ratchov
2006-11-14 22:17 ` Andreas Dilger
2006-11-24 0:23 ` Andreas Dilger
2006-11-28 19:00 ` J. Bruce Fields
2006-11-28 22:06 ` Andreas Dilger
2006-09-14 13:46 ` Peter Staubach
2006-09-14 13:56 ` Trond Myklebust
2006-09-14 14:06 ` Alexandre Ratchov
2006-12-14 1:24 ` Andreas Dilger
2006-12-14 1:52 ` J. Bruce Fields
2006-12-14 16:48 ` Trond Myklebust
2006-12-14 23:04 ` Andreas Dilger
2006-09-13 19:31 ` Andreas Dilger
2006-09-14 1:24 ` J. Bruce Fields
2006-09-14 13:21 ` Alexandre Ratchov
2006-09-14 21:01 ` Andreas Dilger
2006-09-15 10:19 ` Alexandre Ratchov
2006-09-15 16:18 ` Andreas Dilger
2006-11-29 18:54 ` [RFC] [patch 0/3] change attribute for ext4 Jean-Noel Cordenner
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=20060914092318.GA18911@schatzie.adilger.int \
--to=adilger@clusterfs.com \
--cc=alexandre.ratchov@bull.net \
--cc=linux-ext4@vger.kernel.org \
--cc=nfsv4@linux-nfs.org \
--cc=trond.myklebust@fys.uio.no \
/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).