From <fatih@gandi.net>: fatih@gandi.net has uploaded this change for review. ( https://review.gerrithub.io/419391 Change subject: FSAL_VFS: fix read_dirents on FreeBSD ...................................................................... FSAL_VFS: fix read_dirents on FreeBSD the dirent structure on FreeBSD does not implement the d_off field there's some computation done in to_vfs_dirent for FreeBSD but it's not valid for upstream filesystems we could try to compute offsets manually but this is painful, especially with ZFS a workaround to retrieve offsets is to rewind and re-read the directory entry by entry and fetch each offset this is very inefficient as it will do a syscall for each entry we also have to reduce the buffer size for batched reads in order to narrow races due to the rewind process FreeBSD 12 introduced the d_off field but is currently unused, we can use it once it is fully available Change-Id: I75416c6981b921b63f9d493854ece41260fca157 Signed-off-by: Fatih Acar <fatih.acar@gandi.net> --- M src/FSAL/FSAL_VFS/handle.c 1 file changed, 38 insertions(+), 0 deletions(-) git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/91/419391/1 -- To view, visit https://review.gerrithub.io/419391 To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings Gerrit-Project: ffilz/nfs-ganesha Gerrit-Branch: next Gerrit-MessageType: newchange Gerrit-Change-Id: I75416c6981b921b63f9d493854ece41260fca157 Gerrit-Change-Number: 419391 Gerrit-PatchSet: 1 Gerrit-Owner: fatih@gandi.net