]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: fix d_reclen for readdir 56776/head
authorXavi Hernandez <xhernandez@gmail.com>
Tue, 9 Apr 2024 08:26:59 +0000 (10:26 +0200)
committerXavi Hernandez <xhernandez@gmail.com>
Tue, 3 Sep 2024 06:23:54 +0000 (08:23 +0200)
commit5ac01659cf8f33457c78546731d694d1e99fcc91
treec982eb818607dfb3b8e77dca46888a465ba35919
parent53cc78b2224177adf911a0a6ebe64a5dd79b528c
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>
src/client/Client.cc