Project

General

Profile

Actions

Bug #65389

open

The ceph_readdir function in libcephfs returns incorrect d_reclen value

Added by Xavi Hernandez about 1 month ago. Updated 10 days ago.

Status:
Fix Under Review
Priority:
Normal
Category:
Correctness/Safety
Target version:
% Done:

0%

Source:
Tags:
Backport:
quincy,reef,squid
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Client, ceph-fuse, libcephfs
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When struct dirent entries are returned by ceph_readdir() function, the field d_reclen is always 1.

Based on the documentation from man pages (from readdir and getdents/64), this field should contain the used size of the dirent structure, which include the size of the fixed fields plus the space used by the name (which may be different than the actual size of a struct dirent ).

Actions

Also available in: Atom PDF