diff options
author | Jason King <jason.king@joyent.com> | 2020-03-31 04:11:24 +0000 |
---|---|---|
committer | Jason King <jason.king@joyent.com> | 2020-04-09 18:44:26 +0000 |
commit | b7ce222709d1de90478d1467e264eef0ec53e875 (patch) | |
tree | 18d2898dbc0be42d58e28aaf1822e47ddda04a65 | |
parent | 8baf158a3c25f21a3edc8a86662b32eb4e4095b6 (diff) | |
download | illumos-joyent-b7ce222709d1de90478d1467e264eef0ec53e875.tar.gz |
Fix alignment parameter for dfl_iter + fix improper cleanup
-rw-r--r-- | usr/src/uts/common/io/vioblk/vioblk.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr/src/uts/common/io/vioblk/vioblk.c b/usr/src/uts/common/io/vioblk/vioblk.c index d241a9cd3b..5f295d8a8e 100644 --- a/usr/src/uts/common/io/vioblk/vioblk.c +++ b/usr/src/uts/common/io/vioblk/vioblk.c @@ -741,7 +741,7 @@ vioblk_bd_free_space(void *arg, bd_xfer_t *xfer) .dfa_bsize = DEV_BSIZE, .dfa_max_ext = vib->vib_max_discard_seg, .dfa_max_blocks = vib->vib_max_discard_sectors, - .dfa_align = vib->vib_discard_sector_align + .dfa_align = vib->vib_discard_sector_align * DEV_BSIZE }; struct vioblk_freesp_arg sp_arg = { .vfpa_vioblk = vib, @@ -752,12 +752,10 @@ vioblk_bd_free_space(void *arg, bd_xfer_t *xfer) /* * If we didn't include xfer as part of the final request, we - * need to clean it up now. + * should return failure so that bd_sched() will free xfer. */ - if (sp_arg.vfpa_xfer != NULL) { + if (sp_arg.vfpa_xfer != NULL) VERIFY3S(r, !=, 0); - bd_xfer_done(sp_arg.vfpa_xfer, r); - } return (r); } |