Re: [opensuse] nfs_update_inode: inode X mode changed, Y to Z

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: NeilBrown <neilb@...>
Cc: J. Bruce Fields <bfields@...>, <xfs@...>, Adam Schrotenboer <adam@...>, Jesper Juhl <jesper.juhl@...>, Trond Myklebust <trond.myklebust@...>, <linux-kernel@...>, <linux-nfs@...>, Thomas Daniel <tdaniel@...>, Frederic Revenu <frevenu@...>, Jeff Doan <jdoan@...>
Date: Tuesday, March 25, 2008 - 6:13 pm

On Wed, Mar 26, 2008 at 08:38:22AM +1100, NeilBrown wrote:
...
 
Right.


Makes sense.


I looked at the code (xfs_ialloc.c:xfs_ialloc_ag_alloc)

 290                 /*
 291                  * Set initial values for the inodes in this buffer.
 292                  */
 293                 xfs_biozero(fbuf, 0, ninodes << args.mp->m_sb.sb_inodelog);
 294                 for (i = 0; i < ninodes; i++) {
 295                         free = XFS_MAKE_IPTR(args.mp, fbuf, i);
 296                         free->di_core.di_magic = cpu_to_be16(XFS_DINODE_MAGIC);
 297                         free->di_core.di_version = version;
 298                         free->di_next_unlinked = cpu_to_be32(NULLAGINO);
 299                         xfs_ialloc_log_di(tp, fbuf, i,
 300                                 XFS_DI_CORE_BITS | XFS_DI_NEXT_UNLINKED);
 301                 }

xfs_biozero(...) turns into a memset(buf, 0, len), and since the loop that
follows doesn't change the generation number, it'll stay 0.


I'm not familiar enough with NFS, do you want something that's monotonically
increasing or do you just test for inequality?  If it is inequality, why not
just use something like the jiffies - that should be unique enough.

 
Something tells me that the SGI folks might not be all too happy with the
in-sb number...XFS tries to be as parallel as possible, and this would cause
the counter variable to bounce around their NUMA systems.  Perhaps a per-ag
variable would be better, but I remember reading that parallelizing updates
to some inode count variable (I forget which) in the superblock
\cite{dchinner-ols2006} led to a rather big improvement.  It's almost
morning down under, so I guess we'll get their comments on this soon.

Josef 'Jeff' Sipek.

-- 
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
		- Brian W. Kernighan 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [opensuse] nfs_update_inode: inode X mode changed, Y to Z, Josef 'Jeff' Sipek, (Tue Mar 25, 6:13 pm)
Re: [opensuse] nfs_update_inode: inode X mode changed, Y to Z, Adam Schrotenboer, (Thu Apr 17, 3:37 pm)