Commit 0d50b24
ublk: avoid to pass
Refactor ublk_commit_and_fetch() in the following way for removing
parameter of `struct ublksrv_io_cmd *`:
- return `struct request *` from ublk_fill_io_cmd(), so that we can
use request reference reliably in this way cause both request and
io_uring_cmd reference share same storage
- move ublk_fill_io_cmd() before calling into ublk_commit_and_fetch(),
so that ublk_fill_io_cmd() could be run with per-io lock held for
supporting command batch.
- pass ->zone_append_lba to ublk_commit_and_fetch() directly
The main motivation is to reproduce ublk_commit_and_fetch() for fetching
io command batch with multishot uring_cmd.
Reviewed-by: Caleb Sander Mateos <[email protected]>
Signed-off-by: Ming Lei <[email protected]>struct ublksrv_io_cmd * to ublk_commit_and_fetch()1 parent 6d4bb66 commit 0d50b24
1 file changed
Lines changed: 28 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2003 | 2003 | | |
2004 | 2004 | | |
2005 | 2005 | | |
2006 | | - | |
2007 | | - | |
2008 | | - | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
2009 | 2010 | | |
| 2011 | + | |
| 2012 | + | |
2010 | 2013 | | |
2011 | 2014 | | |
2012 | 2015 | | |
2013 | 2016 | | |
2014 | 2017 | | |
2015 | 2018 | | |
2016 | 2019 | | |
| 2020 | + | |
| 2021 | + | |
2017 | 2022 | | |
2018 | 2023 | | |
2019 | 2024 | | |
| |||
2179 | 2184 | | |
2180 | 2185 | | |
2181 | 2186 | | |
2182 | | - | |
2183 | | - | |
2184 | | - | |
2185 | | - | |
| 2187 | + | |
| 2188 | + | |
2186 | 2189 | | |
2187 | 2190 | | |
2188 | 2191 | | |
| |||
2191 | 2194 | | |
2192 | 2195 | | |
2193 | 2196 | | |
2194 | | - | |
| 2197 | + | |
2195 | 2198 | | |
2196 | 2199 | | |
2197 | | - | |
| 2200 | + | |
2198 | 2201 | | |
2199 | 2202 | | |
2200 | 2203 | | |
2201 | 2204 | | |
2202 | 2205 | | |
2203 | 2206 | | |
2204 | 2207 | | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
2205 | 2216 | | |
2206 | 2217 | | |
2207 | 2218 | | |
| |||
2227 | 2238 | | |
2228 | 2239 | | |
2229 | 2240 | | |
2230 | | - | |
2231 | | - | |
2232 | 2241 | | |
2233 | | - | |
| 2242 | + | |
2234 | 2243 | | |
2235 | 2244 | | |
2236 | 2245 | | |
| |||
2336 | 2345 | | |
2337 | 2346 | | |
2338 | 2347 | | |
2339 | | - | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
2340 | 2354 | | |
2341 | 2355 | | |
2342 | 2356 | | |
| |||
2346 | 2360 | | |
2347 | 2361 | | |
2348 | 2362 | | |
2349 | | - | |
2350 | | - | |
| 2363 | + | |
2351 | 2364 | | |
2352 | 2365 | | |
2353 | 2366 | | |
| |||
0 commit comments