scsi: pass status when completing

A small improvement in the SCSI request API.  Pass the status
at the time the request is completed, so that we can assert that
no request is completed twice.  This would have detected the
problem fixed in the previous patch.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
4 files changed
tree: 3bb4e98871f5fe44a1a3ccb93288548fde22a53b
  1. audio/
  2. block/
  3. bsd-user/
  4. darwin-user/
  5. default-configs/
  6. docs/
  7. fpu/
  8. fsdev/
  9. gdb-xml/
  10. hw/
  11. libcacard/
  12. linux-headers/
  13. linux-user/
  14. net/
  15. pc-bios/
  16. qapi/
  17. qga/
  18. QMP/
  19. roms/
  20. scripts/
  21. slirp/
  22. sysconfigs/
  23. target-alpha/
  24. target-arm/
  25. target-cris/
  26. target-i386/
  27. target-lm32/
  28. target-m68k/
  29. target-microblaze/
  30. target-mips/
  31. target-ppc/
  32. target-s390x/
  33. target-sh4/
  34. target-sparc/
  35. target-unicore32/
  36. tcg/
  37. tests/
  38. ui/
  39. .gitignore
  40. .gitmodules
  41. a.out.h
  42. acl.c
  43. acl.h
  44. aes.c
  45. aes.h
  46. aio.c
  47. alpha-dis.c
  48. alpha.ld
  49. arch_init.c
  50. arch_init.h
  51. arm-dis.c
  52. arm-semi.c
  53. arm.ld
  54. async.c
  55. balloon.c
  56. balloon.h
  57. bitmap.c
  58. bitmap.h
  59. bitops.c
  60. bitops.h
  61. block-migration.c
  62. block-migration.h
  63. block.c
  64. block.h
  65. block_int.h
  66. blockdev.c
  67. blockdev.h
  68. bswap.h
  69. bt-host.c
  70. bt-host.h
  71. bt-vhci.c
  72. buffered_file.c
  73. buffered_file.h
  74. cache-utils.c
  75. cache-utils.h
  76. Changelog
  77. check-qdict.c
  78. check-qfloat.c
  79. check-qint.c
  80. check-qjson.c
  81. check-qlist.c
  82. check-qstring.c
  83. cmd.c
  84. cmd.h
  85. CODING_STYLE
  86. compatfd.c
  87. compatfd.h
  88. compiler.h
  89. config.h
  90. configure
  91. console.c
  92. console.h
  93. COPYING
  94. COPYING.LIB
  95. coroutine-gthread.c
  96. coroutine-ucontext.c
  97. coroutine-win32.c
  98. cpu-all.h
  99. cpu-common.h
  100. cpu-defs.h
  101. cpu-exec.c
  102. cpus.c
  103. cpus.h
  104. cris-dis.c
  105. cursor.c
  106. cursor_hidden.xpm
  107. cursor_left_ptr.xpm
  108. cutils.c
  109. def-helper.h
  110. device_tree.c
  111. device_tree.h
  112. dis-asm.h
  113. disas.c
  114. disas.h
  115. dma-helpers.c
  116. dma.h
  117. dyngen-exec.h
  118. elf.h
  119. envlist.c
  120. envlist.h
  121. error.c
  122. error.h
  123. error_int.h
  124. exec-all.h
  125. exec-memory.h
  126. exec.c
  127. gdbstub.c
  128. gdbstub.h
  129. gen-icount.h
  130. HACKING
  131. hmp-commands.hx
  132. host-utils.c
  133. host-utils.h
  134. hpet.h
  135. hppa-dis.c
  136. hppa.ld
  137. i386-dis.c
  138. i386.ld
  139. ia64-dis.c
  140. ia64.ld
  141. input.c
  142. iohandler.c
  143. ioport-user.c
  144. ioport.c
  145. ioport.h
  146. iorange.h
  147. iov.c
  148. iov.h
  149. json-lexer.c
  150. json-lexer.h
  151. json-parser.c
  152. json-parser.h
  153. json-streamer.c
  154. json-streamer.h
  155. kvm-all.c
  156. kvm-stub.c
  157. kvm.h
  158. libfdt_env.h
  159. LICENSE
  160. linux-aio.c
  161. m68k-dis.c
  162. m68k-semi.c
  163. m68k.ld
  164. MAINTAINERS
  165. Makefile
  166. Makefile.dis
  167. Makefile.hw
  168. Makefile.objs
  169. Makefile.target
  170. Makefile.user
  171. memory.c
  172. memory.h
  173. microblaze-dis.c
  174. migration-exec.c
  175. migration-fd.c
  176. migration-tcp.c
  177. migration-unix.c
  178. migration.c
  179. migration.h
  180. mips-dis.c
  181. mips.ld
  182. module.c
  183. module.h
  184. monitor.c
  185. monitor.h
  186. nbd.c
  187. nbd.h
  188. net.c
  189. net.h
  190. notify.c
  191. notify.h
  192. os-posix.c
  193. os-win32.c
  194. osdep.c
  195. osdep.h
  196. oslib-posix.c
  197. oslib-win32.c
  198. path.c
  199. pci-ids.txt
  200. pflib.c
  201. pflib.h
  202. poison.h
  203. posix-aio-compat.c
  204. ppc-dis.c
  205. ppc.ld
  206. ppc64.ld
  207. qapi-schema-guest.json
  208. qapi-schema-test.json
  209. qbool.c
  210. qbool.h
  211. qdict-test-data.txt
  212. qdict.c
  213. qdict.h
  214. qemu-aio.h
  215. qemu-barrier.h
  216. qemu-char.c
  217. qemu-char.h
  218. qemu-common.h
  219. qemu-config.c
  220. qemu-config.h
  221. qemu-coroutine-int.h
  222. qemu-coroutine-lock.c
  223. qemu-coroutine.c
  224. qemu-coroutine.h
  225. qemu-doc.texi
  226. qemu-error.c
  227. qemu-error.h
  228. qemu-ga.c
  229. qemu-img-cmds.hx
  230. qemu-img.c
  231. qemu-img.texi
  232. qemu-io.c
  233. qemu-lock.h
  234. qemu-log.h
  235. qemu-malloc.c
  236. qemu-nbd.c
  237. qemu-nbd.texi
  238. qemu-objects.h
  239. qemu-option.c
  240. qemu-option.h
  241. qemu-options.h
  242. qemu-options.hx
  243. qemu-os-posix.h
  244. qemu-os-win32.h
  245. qemu-progress.c
  246. qemu-queue.h
  247. qemu-sockets.c
  248. qemu-tech.texi
  249. qemu-thread-posix.c
  250. qemu-thread-posix.h
  251. qemu-thread-win32.c
  252. qemu-thread-win32.h
  253. qemu-thread.h
  254. qemu-timer-common.c
  255. qemu-timer.c
  256. qemu-timer.h
  257. qemu-tool.c
  258. qemu-x509.h
  259. qemu.sasl
  260. qemu_socket.h
  261. qerror.c
  262. qerror.h
  263. qfloat.c
  264. qfloat.h
  265. qint.c
  266. qint.h
  267. qjson.c
  268. qjson.h
  269. qlist.c
  270. qlist.h
  271. qmp-commands.hx
  272. qobject.h
  273. qstring.c
  274. qstring.h
  275. range.h
  276. readline.c
  277. readline.h
  278. README
  279. rules.mak
  280. rwhandler.c
  281. rwhandler.h
  282. s390-dis.c
  283. s390.ld
  284. savevm.c
  285. sh4-dis.c
  286. simpletrace.c
  287. simpletrace.h
  288. softmmu-semi.h
  289. softmmu_defs.h
  290. softmmu_exec.h
  291. softmmu_header.h
  292. softmmu_template.h
  293. sparc-dis.c
  294. sparc.ld
  295. sparc64.ld
  296. spice-qemu-char.c
  297. sysemu.h
  298. targphys.h
  299. tcg-runtime.c
  300. test-coroutine.c
  301. test-qmp-commands.c
  302. test-visitor.c
  303. thunk.c
  304. thunk.h
  305. TODO
  306. trace-events
  307. translate-all.c
  308. uboot_image.h
  309. usb-bsd.c
  310. usb-linux.c
  311. usb-redir.c
  312. usb-stub.c
  313. user-exec.c
  314. VERSION
  315. version.rc
  316. vgafont.h
  317. vl.c
  318. x86_64.ld
  319. xen-all.c
  320. xen-mapcache.c
  321. xen-mapcache.h
  322. xen-stub.c