Repository navigation
Commit 09adc80
committed
ceph: preserve I_COMPLETE across rename
d_move puts the renamed dentry at the end of d_subdirs, screwing with our
cached dentry directory offsets. We were just clearing I_COMPLETE to avoid
any possibility of trouble. However, assigning the renamed dentry an
offset at the end of the directory (to match it's new d_subdirs position)
is sufficient to maintain correct behavior and hold onto I_COMPLETE.
This is especially important for workloads like rsync, which renames files
into place. Before, we would lose I_COMPLETE and do MDS lookups for each
file. With this patch we only talk to the MDS on create and rename.
Signed-off-by: Sage Weil <sage@newdream.net>1 parent b09734b commit 09adc80
1 file changed
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1030 | 1030 | | |
1031 | 1031 | | |
1032 | 1032 | | |
1033 | | - | |
1034 | | - | |
1035 | | - | |
1036 | 1033 | | |
1037 | 1034 | | |
1038 | 1035 | | |
| |||
1044 | 1041 | | |
1045 | 1042 | | |
1046 | 1043 | | |
1047 | | - | |
1048 | | - | |
1049 | | - | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
1050 | 1052 | | |
1051 | | - | |
1052 | | - | |
1053 | 1053 | | |
1054 | 1054 | | |
1055 | 1055 | | |
| |||
0 commit comments