login
Header Space

 
 

Re: i_version changes

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Peter Staubach <staubach@...>
Cc: J. Bruce Fields <bfields@...>, Christoph Hellwig <hch@...>, <jean-noel.cordenner@...>, <linux-fsdevel@...>
Date: Wednesday, February 13, 2008 - 6:06 pm

On Thu, February 14, 2008 8:32 am, Peter Staubach wrote:

As I said, the "NFS has seen this i_version" flag needs to be on
stable storage, e.g. the lsb of the i_version.  This will ensure that
any change after NFSD saw the i_version will cause the i_version to
be updated.
So I think it can provide correct semantics.
Precise details:
  NFSD: when reading i_version
      take lock
      tmp = i_version
      i_version |= 1
      drop lock
      return tmp & ~1;

  VFS when making any change:
      take lock
      if (i_version & 1) {
           i_version++;
           changed=1
      }
      drop lock
      if changed, sync inode



Correct NFS semantics require that the i_version be written to disk
before (or when) the change is committed.  That means lots more inodes
in the journal.
If you are already doing data=journal, it the hit probably isn't too
high.(?)

You are right:  measuring the cost is important.  However as we are
designing a generic filesystem interface, we need to understand the
cost on multiple filesystems in a variety of configuration .... or
give the filesystem complete information and let it decide the optimal
implementation.

Giving the filesystem full information means having an inode_operation
"nfsd_reads_version" which returns the number to be used as change_id.


NeilBrown

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
i_version changes, Christoph Hellwig, (Sun Feb 10, 3:30 am)
Re: i_version changes, J. Bruce Fields, (Tue Feb 12, 4:06 pm)
Re: i_version changes, Christoph Hellwig, (Wed Feb 13, 8:52 am)
Re: i_version changes, J. Bruce Fields, (Wed Feb 13, 4:26 pm)
Re: i_version changes, NeilBrown, (Wed Feb 13, 5:19 pm)
Re: i_version changes, J. Bruce Fields, (Wed Feb 13, 5:36 pm)
Re: i_version changes, Peter Staubach, (Wed Feb 13, 5:32 pm)
Re: i_version changes, Jean noel Cordenner, (Thu Feb 14, 4:40 am)
Re: i_version changes, Peter Staubach, (Thu Feb 14, 10:38 am)
Re: i_version changes, Jean noel Cordenner, (Fri Feb 15, 6:31 am)
Re: i_version changes, NeilBrown, (Wed Feb 13, 6:06 pm)
Re: i_version changes, Peter Staubach, (Thu Feb 14, 10:34 am)
Re: i_version changes, Trond Myklebust, (Wed Feb 13, 10:07 am)
Re: i_version changes, Andreas Dilger, (Wed Feb 13, 11:12 am)
Re: i_version changes, Andreas Dilger, (Wed Feb 13, 5:25 am)
speck-geostationary