On Oct 18, 2019, at 7:28 AM, Theodore Y. Ts'o wrote: > > On Fri, Oct 18, 2019 at 01:51:56PM +0900, Andreas Dilger wrote: >> What about rename or hard link? > > Neither is currently handled by the fast commit patches, but each > operation can fit inside a single block, so it could be handled as a > update to a single inode. In the case of rename, we will need to add > some tags to indicate the desintation directory and directory enrty > name, and whether or not there is a destination inode which needs to > have its refcount dropped and possibly deleted. > > Harshad, we probably should handle them, since in order to support > NFS, the nfs server will send the rename or hard link request, > followed by a commit metadata request, and that commit metadata > request needs to persist the rename or link. So for the purposes of > accelerating NFS, we should handle these commands. > > If we don't handle these commands, we will need to declare the inode > as fast commit ineligible, so that we force a full journal commit when > the commit metadata request is received. As a simplifying assumption, you could limit the case of rename/link within a single directory? That handles the common case of "create temp file, write contents there, sync, rename over original file" used by most editors, rsync, etc. The case of cross-directory rename is much less common in my experience, so it is less important to optimize that case (if this makes it easier to add to fast commits). Cheers, Andreas