Soumya has uploaded this change for review.
WIP: FSAL_GLUSTER: Improving fd handling during OPEN and COMMIT
a)
At present, in FSAL_GLUSTER, while opening a file the very
first time, we use two APIs
* glfs_h_creat to create (file &)handle
* glfs_h_open to fetch a file descriptor
This results in opening the file twice (once during create and
another during open) which is inefficient and also may
result in EACCESS while creating a read-only file.
To address that, have added a gluster API "glfs_h_creat_open"
which creates and returns both handle and glfd.
- https://review.gluster.org/#/c/glusterfs/+/23448
This API can be used to atomically fetch both handle
and glfd, thus improving performance.
b)
In addition, for stateless operations like COMMIT etc,
FSAL tries to open a new fd. This again may result in EACCESS
errors while operating on read-only files. More details
are captured in https://bugzilla.redhat.com/show_bug.cgi?id=1735480#c1
To address this issue, we can save the fd created during open2
as globalfd, thus improving performance and also providing
correctness as expected by POSIX.
Change-Id: I55f734875e9d803148d2a19bf090f04d537f9ebf
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
---
M src/FSAL/FSAL_GLUSTER/handle.c
1 file changed, 178 insertions(+), 25 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/06/468806/1
To view, visit change 468806. To unsubscribe, or for help writing mail filters, visit settings.