1
0
mirror of https://github.com/gluster/glusterfs.git synced 2026-02-06 18:48:16 +01:00
Files
Anoop C S bf3f79c1d5 api: Use opendir for directories in glfs_open and glfs_h_open (#3893)
In addition to files glfs_open() and glfs_h_open() are capable of
handling directory opens. But there are various other components like
DHT and probably other client xlators which are tightly coupled to work
with directory opens using just opendir. One such example is the case
where fsetxattr() is called with a file descriptor opened for the
directory using glfs_open() or glfs_h_open() resulting in EBADFD.

Therefore we make a differentiation within these APIs to correctly call
syncop_open() or syncop_opendir() for file and directory entries
respectively to avoid any possible file descriptor errors.

Credits: Xavi Hernandez <xhernandez@redhat.com>
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>

Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
2022-11-07 11:20:56 +05:30
..
2019-04-15 14:59:37 +05:30