Commit d80fc29
xfs: pass lv chain length into xlog_write()
The caller of xlog_write() usually has a close accounting of the
aggregated vector length contained in the log vector chain passed to
xlog_write(). There is no need to iterate the chain to calculate he
length of the data in xlog_write_calculate_len() if the caller is
already iterating that chain to build it.
Passing in the vector length avoids doing an extra chain iteration,
which can be a significant amount of work given that large CIL
commits can have hundreds of thousands of vectors attached to the
chain.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>1 parent c514132 commit d80fc29
3 files changed
Lines changed: 23 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
958 | 958 | | |
959 | 959 | | |
960 | 960 | | |
961 | | - | |
| 961 | + | |
| 962 | + | |
962 | 963 | | |
963 | 964 | | |
964 | 965 | | |
| |||
2209 | 2210 | | |
2210 | 2211 | | |
2211 | 2212 | | |
2212 | | - | |
2213 | | - | |
2214 | | - | |
2215 | | - | |
2216 | | - | |
2217 | | - | |
2218 | | - | |
2219 | | - | |
2220 | | - | |
2221 | | - | |
2222 | | - | |
2223 | | - | |
2224 | | - | |
2225 | | - | |
2226 | | - | |
2227 | | - | |
2228 | | - | |
2229 | | - | |
2230 | | - | |
2231 | | - | |
2232 | | - | |
2233 | | - | |
2234 | | - | |
2235 | | - | |
2236 | | - | |
2237 | | - | |
2238 | 2213 | | |
2239 | 2214 | | |
2240 | 2215 | | |
| |||
2388 | 2363 | | |
2389 | 2364 | | |
2390 | 2365 | | |
2391 | | - | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
2392 | 2369 | | |
2393 | 2370 | | |
2394 | 2371 | | |
2395 | 2372 | | |
2396 | 2373 | | |
2397 | | - | |
2398 | 2374 | | |
2399 | 2375 | | |
2400 | 2376 | | |
| |||
2409 | 2385 | | |
2410 | 2386 | | |
2411 | 2387 | | |
2412 | | - | |
2413 | 2388 | | |
2414 | 2389 | | |
2415 | 2390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
825 | 825 | | |
826 | 826 | | |
827 | 827 | | |
828 | | - | |
| 828 | + | |
| 829 | + | |
829 | 830 | | |
830 | 831 | | |
831 | 832 | | |
832 | 833 | | |
833 | 834 | | |
834 | 835 | | |
835 | 836 | | |
836 | | - | |
| 837 | + | |
| 838 | + | |
837 | 839 | | |
838 | 840 | | |
839 | 841 | | |
| |||
872 | 874 | | |
873 | 875 | | |
874 | 876 | | |
875 | | - | |
| 877 | + | |
| 878 | + | |
876 | 879 | | |
877 | 880 | | |
878 | 881 | | |
| |||
935 | 938 | | |
936 | 939 | | |
937 | 940 | | |
938 | | - | |
939 | | - | |
940 | 941 | | |
941 | 942 | | |
| 943 | + | |
942 | 944 | | |
| 945 | + | |
| 946 | + | |
943 | 947 | | |
944 | 948 | | |
945 | 949 | | |
| |||
966 | 970 | | |
967 | 971 | | |
968 | 972 | | |
969 | | - | |
| 973 | + | |
| 974 | + | |
970 | 975 | | |
971 | 976 | | |
972 | 977 | | |
| |||
1047 | 1052 | | |
1048 | 1053 | | |
1049 | 1054 | | |
1050 | | - | |
1051 | 1055 | | |
1052 | 1056 | | |
1053 | 1057 | | |
| |||
1061 | 1065 | | |
1062 | 1066 | | |
1063 | 1067 | | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1064 | 1072 | | |
1065 | 1073 | | |
1066 | 1074 | | |
| |||
1099 | 1107 | | |
1100 | 1108 | | |
1101 | 1109 | | |
| 1110 | + | |
1102 | 1111 | | |
1103 | | - | |
| 1112 | + | |
1104 | 1113 | | |
1105 | 1114 | | |
1106 | 1115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
506 | | - | |
| 506 | + | |
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
| |||
0 commit comments