lkml.org 
[lkml]   [2017]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH v1 29/30] fs: track whether the i_version has been queried with an i_state flag
From
Date
On Sat, 2017-03-04 at 11:03 +1100, NeilBrown wrote:
> On Wed, Dec 21 2016, Jeff Layton wrote:
>
> > @@ -2072,7 +2093,12 @@ inode_cmp_iversion(const struct inode *inode, const u64 old)
> > static inline bool
> > inode_iversion_need_inc(struct inode *inode)
> > {
> > - return true;
> > + bool ret;
> > +
> > + spin_lock(&inode->i_lock);
> > + ret = inode->i_state & I_VERS_BUMP;
> > + spin_unlock(&inode->i_lock);
> > + return ret;
> > }
> >
>
> I know this code gets removed, so this isn't really important.
> By why do you take the spinlock here? What are you racing again?
>
> Thanks,
> NeilBrown

I think I was worried about I_VERS_BUMP being set or cleared during an
increment or query. It is quite possible that that spinlock is not
necessary.
--
Jeff Layton <jlayton@redhat.com>

\
 
 \ /
  Last update: 2017-03-04 01:53    [W:0.124 / U:1.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site