Commit 817d6df
committed
passthroughfs: avoid extra lookup after readdirplus
The Sys_getdents64 in kernel will pad the name with '\0' bytes up to 8-byte
alignment, so @name of LinuxDirent64 may contain a few null terminators.
This causes an extra lookup from fuse kernel when called by readdirplus,
because kernel path walking only takes name without null terminators, the
dentry with more than 1 null terminators added by readdirplus doesn't
satisfy the path walking so that kernel has to issue another lookup to get
a valid dentry.
Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>1 parent bb93d85 commit 817d6df
2 files changed
+25
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1394 | 1394 | | |
1395 | 1395 | | |
1396 | 1396 | | |
1397 | | - | |
| 1397 | + | |
| 1398 | + | |
1398 | 1399 | | |
1399 | 1400 | | |
1400 | 1401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
584 | 585 | | |
585 | 586 | | |
586 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
587 | 602 | | |
588 | 603 | | |
589 | 604 | | |
| |||
908 | 923 | | |
909 | 924 | | |
910 | 925 | | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
918 | 934 | | |
919 | 935 | | |
920 | 936 | | |
| |||
0 commit comments