Thread (87 messages) 87 messages, 8 authors, 2017-10-30

Re: [RFC PATCH v1 29/30] fs: track whether the i_version has been queried with an i_state flag

From: NeilBrown <neil@brown.name>
Date: 2017-03-04 00:23:19
Also in: linux-btrfs, linux-fsdevel, linux-nfs, linux-xfs, lkml

On Wed, Dec 21 2016, Jeff Layton wrote:
quoted hunk ↗ jump to hunk
@@ -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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help