]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: fix d_reclen for readdir 61519/head
authorXavi Hernandez <xhernandez@gmail.com>
Tue, 9 Apr 2024 08:26:59 +0000 (10:26 +0200)
committerMilind Changire <mchangir@redhat.com>
Sat, 25 Jan 2025 02:24:48 +0000 (07:54 +0530)
commit15774e5d41b55d8cbbc447dc5e2056d849a07d69
tree7323c05f734ac765583f52f7516b3618b960778c
parent89751a32cbbe19c32037d4cb263060aa40fc99fc
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)
src/client/Client.cc