All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] zbd: fix zonemode=zbd with NDEBUG
@ 2020-04-10 19:06 Alexey Dobriyan
  2020-04-13  5:37 ` Damien Le Moal
  2020-04-13 14:20 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Alexey Dobriyan @ 2020-04-10 19:06 UTC (permalink / raw)
  To: axboe; +Cc: damien.lemoal, fio

assert() with NDEBUG doesn't evaluate argument.

Signed-off-by: Alexey Dobriyan (SK hynix) <adobriyan@gmail.com>
---

 zbd.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/zbd.c
+++ b/zbd.c
@@ -1220,6 +1220,7 @@ static void zbd_put_io(const struct io_u *io_u)
 	struct zoned_block_device_info *zbd_info = f->zbd_info;
 	struct fio_zone_info *z;
 	uint32_t zone_idx;
+	int ret;
 
 	if (!zbd_info)
 		return;
@@ -1235,7 +1236,8 @@ static void zbd_put_io(const struct io_u *io_u)
 	       "%s: terminate I/O (%lld, %llu) for zone %u\n",
 	       f->file_name, io_u->offset, io_u->buflen, zone_idx);
 
-	assert(pthread_mutex_unlock(&z->mutex) == 0);
+	ret = pthread_mutex_unlock(&z->mutex);
+	assert(ret == 0);
 	zbd_check_swd(f);
 }
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-13 14:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-10 19:06 [PATCH] zbd: fix zonemode=zbd with NDEBUG Alexey Dobriyan
2020-04-13  5:37 ` Damien Le Moal
2020-04-13 14:20 ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.