On Mon, Jun 17, 2013 at 11:17:49PM +0800, Jeff Liu wrote: > Please add spaces between comments and annotation, i.e, > /* Need to ...... */ yes, please describe while we're taking the lock here (describing the race you're talking about would be fine). > > + ret = ocfs2_inode_lock(inode, NULL, 0); > > + if (ret < 0) { > > + mlog_errno(ret); > > + goto out; > > + } > > + ocfs2_inode_unlock(inode, 0); > > offset += inode->i_size; > > Why not protect the offset adjustment insides ocfs2 inode locks? If we're going through the trouble of locking we *need* to put the offset calculation inside the lock otherwise we can still get stale i_size and basically haven't fixed anything. Btw, do you feel that this could impact performance for other workloads that ocfs2 usually does? --Mark -- Mark Fasheh -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html