From 7f231f0f3f1ee698d4115f3b83255a36587431b2 Mon Sep 17 00:00:00 2001 From: Marcel Huber Date: Wed, 11 May 2016 21:23:42 +0200 Subject: [PATCH 1/2] fixes subtle bug introduced in commit #c35b1882 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hinted by gcc: ../../module/zfs/zio_inject.c: In function ‘zio_handle_io_delay’: ../../module/zfs/zio_inject.c:382:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (handler->zi_record.zi_freq != 0 && ^~ ../../module/zfs/zio_inject.c:384:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ continue; ^~~~~~~~ --- module/zfs/zio_inject.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/zfs/zio_inject.c b/module/zfs/zio_inject.c index a6eca871501c..1458be477280 100644 --- a/module/zfs/zio_inject.c +++ b/module/zfs/zio_inject.c @@ -380,8 +380,9 @@ zio_handle_io_delay(zio_t *zio) continue; if (handler->zi_record.zi_freq != 0 && - spa_get_random(100) >= handler->zi_record.zi_freq); + spa_get_random(100) >= handler->zi_record.zi_freq) { continue; + } if (vd->vdev_guid == handler->zi_record.zi_guid) { seconds = handler->zi_record.zi_timer; From 6028dcdcda77e5faebd012840bdce0be3398f391 Mon Sep 17 00:00:00 2001 From: Marcel Huber Date: Wed, 11 May 2016 21:28:33 +0200 Subject: [PATCH 2/2] fixes bug introduced in commit #7d90f569 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hinted by gcc: libzfs_import.c: In function ‘fix_paths’: libzfs_import.c:602:28: warning: self-comparison always evaluates to true [-Wtautological-compare] if (best->ne_num_labels == best->ne_num_labels && ^~ --- lib/libzfs/libzfs_import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libzfs/libzfs_import.c b/lib/libzfs/libzfs_import.c index 25f369db9622..99c3d9998f23 100644 --- a/lib/libzfs/libzfs_import.c +++ b/lib/libzfs/libzfs_import.c @@ -599,7 +599,7 @@ fix_paths(nvlist_t *nv, name_entry_t *names) } /* Prefer paths earlier in the search order. */ - if (best->ne_num_labels == best->ne_num_labels && + if (ne->ne_num_labels == best->ne_num_labels && ne->ne_order < best->ne_order) { best = ne; continue;