client: fix d_reclen for readdir
Based on the man page of readdir(3), the d_reclen field should contain
the total size of the record, which varies depending on the length of
the returned name. However, the previous implementation was returning a
hardcoded '1' in all cases.
This patch computes the right size of the record and returns it.
Fixes: https://tracker.ceph.com/issues/65389
Signed-off-by: Xavi Hernandez <xhernandez@gmail.com>
(cherry picked from commit
5ac01659cf8f33457c78546731d694d1e99fcc91)