forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit871fe49
committed
Provide vectored variants of FileRead() and FileWrite().
FileReadV() and FileWriteV() adapt pg_preadv() and pg_pwritev() forfd.c's virtual file descriptors. The simple FileRead() and FileWrite()functions are now implemented in terms of the vectored functions, toavoid code duplication, and they are converted back to the correspondingsimple system calls further down (commit15c9ac3). Later work willmake more interesting multi-iovec calls.The traditional behavior of reporting a "fake" ENOSPC error issimplified. It's now always set for non-failing writes, for the benefitof callers that expect to log a meaningful "%m" if they determine thatthe write was short. (Perhaps we should consider getting rid of thatexpectation one day.)Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>Discussion:https://postgr.es/m/CA+hUKGJkOiOCa+mag4BF+zHo7qo=o9CFheB8=g6uT5TUm2gkvA@mail.gmail.com1 parent0c6be59 commit871fe49
2 files changed
+54
-21
lines changedLines changed: 25 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2110 | 2110 |
| |
2111 | 2111 |
| |
2112 | 2112 |
| |
2113 |
| - | |
2114 |
| - | |
| 2113 | + | |
| 2114 | + | |
2115 | 2115 |
| |
2116 | 2116 |
| |
2117 | 2117 |
| |
2118 | 2118 |
| |
2119 | 2119 |
| |
2120 | 2120 |
| |
2121 |
| - | |
| 2121 | + | |
2122 | 2122 |
| |
2123 | 2123 |
| |
2124 |
| - | |
| 2124 | + | |
2125 | 2125 |
| |
2126 | 2126 |
| |
2127 | 2127 |
| |
| |||
2131 | 2131 |
| |
2132 | 2132 |
| |
2133 | 2133 |
| |
2134 |
| - | |
| 2134 | + | |
2135 | 2135 |
| |
2136 | 2136 |
| |
2137 | 2137 |
| |
| |||
2166 | 2166 |
| |
2167 | 2167 |
| |
2168 | 2168 |
| |
2169 |
| - | |
2170 |
| - | |
| 2169 | + | |
| 2170 | + | |
2171 | 2171 |
| |
2172 | 2172 |
| |
2173 | 2173 |
| |
2174 | 2174 |
| |
2175 | 2175 |
| |
2176 | 2176 |
| |
2177 |
| - | |
| 2177 | + | |
2178 | 2178 |
| |
2179 | 2179 |
| |
2180 |
| - | |
| 2180 | + | |
2181 | 2181 |
| |
2182 | 2182 |
| |
2183 | 2183 |
| |
| |||
2195 | 2195 |
| |
2196 | 2196 |
| |
2197 | 2197 |
| |
2198 |
| - | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
2199 | 2202 |
| |
2200 | 2203 |
| |
2201 | 2204 |
| |
| |||
2211 | 2214 |
| |
2212 | 2215 |
| |
2213 | 2216 |
| |
2214 |
| - | |
2215 | 2217 |
| |
2216 |
| - | |
| 2218 | + | |
2217 | 2219 |
| |
2218 | 2220 |
| |
2219 |
| - | |
2220 |
| - | |
2221 |
| - | |
2222 |
| - | |
2223 | 2221 |
| |
2224 | 2222 |
| |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
2225 | 2232 |
| |
2226 | 2233 |
| |
2227 | 2234 |
| |
2228 | 2235 |
| |
2229 | 2236 |
| |
2230 |
| - | |
| 2237 | + | |
2231 | 2238 |
| |
2232 | 2239 |
| |
2233 | 2240 |
| |
| |||
2239 | 2246 |
| |
2240 | 2247 |
| |
2241 | 2248 |
| |
2242 |
| - | |
| 2249 | + | |
2243 | 2250 |
| |
2244 | 2251 |
| |
2245 | 2252 |
| |
|
Lines changed: 29 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
| 18 | + | |
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
| 46 | + | |
| 47 | + | |
46 | 48 |
| |
47 | 49 |
| |
48 | 50 |
| |
| |||
105 | 107 |
| |
106 | 108 |
| |
107 | 109 |
| |
108 |
| - | |
109 |
| - | |
| 110 | + | |
| 111 | + | |
110 | 112 |
| |
111 | 113 |
| |
112 | 114 |
| |
| |||
189 | 191 |
| |
190 | 192 |
| |
191 | 193 |
| |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
192 | 218 |
|
0 commit comments
Comments
(0)