Metadata sync for create/update operations.
Hello, I noticed that ganesha does not do metadata sync after operations like create, remove, setattr etc., (with FSAL_VFS). According to NFSv3 RFC: "The following data modifying procedures are synchronous: WRITE (with stable flag set to FILE_SYNC), CREATE, MKDIR, SYMLINK, MKNOD, REMOVE, RMDIR, RENAME, LINK, and COMMIT. Kernel NFS calls commit_metadata() to sync - see create procedure below: https://elixir.bootlin.com/linux/latest/source/fs/nfsd/vfs.c#L1460 Is this to improve performance or a bug? Thanks, Pradeep
I didn't check them all, but create definitely sets the attributes before returning. What are you seeing that indicates that they're not set? Daniel On Wed, Jan 30, 2019 at 8:39 PM Pradeep <pradeep.thomas@gmail.com> wrote:
Hello,
I noticed that ganesha does not do metadata sync after operations like create, remove, setattr etc., (with FSAL_VFS). According to NFSv3 RFC:
"The following data modifying procedures are synchronous: WRITE (with stable flag set to FILE_SYNC), CREATE, MKDIR, SYMLINK, MKNOD, REMOVE, RMDIR, RENAME, LINK, and COMMIT.
Kernel NFS calls commit_metadata() to sync - see create procedure below: https://elixir.bootlin.com/linux/latest/source/fs/nfsd/vfs.c#L1460
Is this to improve performance or a bug?
Thanks, Pradeep _______________________________________________ Devel mailing list -- devel@lists.nfs-ganesha.org To unsubscribe send an email to devel-leave@lists.nfs-ganesha.org
On Thu, Jan 31, 2019 at 5:49 AM Daniel Gryniewicz <dang@redhat.com> wrote:
I didn't check them all, but create definitely sets the attributes before returning. What are you seeing that indicates that they're not set?
Ganesha sets it at create time; but the underlying filesystem might not have written that to disk yet (filesystems like ZFS caches heavily and syncs to disk periodically). So if system crashes right after the create returns success to client, there is a chance that the attributes are lost or the file itself doesn't exist on disk. Thanks, Pradeep
Daniel
On Wed, Jan 30, 2019 at 8:39 PM Pradeep <pradeep.thomas@gmail.com> wrote:
Hello,
I noticed that ganesha does not do metadata sync after operations like create, remove, setattr etc., (with FSAL_VFS). According to NFSv3 RFC:
"The following data modifying procedures are synchronous: WRITE (with stable flag set to FILE_SYNC), CREATE, MKDIR, SYMLINK, MKNOD, REMOVE, RMDIR, RENAME, LINK, and COMMIT.
Kernel NFS calls commit_metadata() to sync - see create procedure below: https://elixir.bootlin.com/linux/latest/source/fs/nfsd/vfs.c#L1460
Is this to improve performance or a bug?
Thanks, Pradeep _______________________________________________ Devel mailing list -- devel@lists.nfs-ganesha.org To unsubscribe send an email to devel-leave@lists.nfs-ganesha.org
participants (2)
-
Daniel Gryniewicz -
Pradeep