Commit 5ac0165
committed
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 <[email protected]>1 parent 53cc78b commit 5ac0165
1 file changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
9275 | 9276 | | |
9276 | 9277 | | |
9277 | 9278 | | |
9278 | | - | |
9279 | | - | |
| 9279 | + | |
| 9280 | + | |
| 9281 | + | |
| 9282 | + | |
9280 | 9283 | | |
9281 | 9284 | | |
9282 | 9285 | | |
9283 | 9286 | | |
9284 | 9287 | | |
9285 | | - | |
| 9288 | + | |
| 9289 | + | |
| 9290 | + | |
| 9291 | + | |
9286 | 9292 | | |
9287 | 9293 | | |
9288 | 9294 | | |
| |||
0 commit comments