All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFCv2 01/10] dm-dedup: main data structures
@ 2014-08-28 21:56 Vasily Tarasov
  2014-09-26 15:24 ` Mike Snitzer
  0 siblings, 1 reply; 10+ messages in thread
From: Vasily Tarasov @ 2014-08-28 21:56 UTC (permalink / raw)
  To: dm-devel
  Cc: Joe Thornber, Mike Snitzer, Christoph Hellwig, Philip Shilane,
	Sonam Mandal, Erez Zadok

We maintain one dedup_config structure for every dm-dedup target
instance. Every target instance has a metadata backend associated with
it. Metadata backends should implement operations defined in the
metadata_ops structure. Every backend should support two key-value
stores: (1) sparse store, where the hash-to-pbn mapping (the hash index)
is stored; and (2) linear store, where the lbn-to-pbn mapping is stored.

Signed-off-by: Vasily Tarasov <tarasov@vasily.name>
---
 drivers/md/dm-dedup-backend.h |  114 +++++++++++++++++++++++++++++++++++++++++
 drivers/md/dm-dedup-kvstore.h |   51 ++++++++++++++++++
 drivers/md/dm-dedup-target.h  |  100 ++++++++++++++++++++++++++++++++++++
 3 files changed, 265 insertions(+), 0 deletions(-)
 create mode 100644 drivers/md/dm-dedup-backend.h
 create mode 100644 drivers/md/dm-dedup-kvstore.h
 create mode 100644 drivers/md/dm-dedup-target.h

diff --git a/drivers/md/dm-dedup-backend.h b/drivers/md/dm-dedup-backend.h
new file mode 100644
index 0000000..63223a1
--- /dev/null
+++ b/drivers/md/dm-dedup-backend.h
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2012-2014 Vasily Tarasov
+ * Copyright (C) 2012-2014 Geoff Kuenning
+ * Copyright (C) 2012-2014 Sonam Mandal
+ * Copyright (C) 2012-2014 Karthikeyani Palanisami
+ * Copyright (C) 2012-2014 Philip Shilane
+ * Copyright (C) 2012-2014 Sagar Trehan
+ * Copyright (C) 2012-2014 Erez Zadok
+ *
+ * This file is released under the GPL.
+ */
+
+#ifndef BACKEND_H
+#define BACKEND_H
+
+struct metadata;		/* metadata store identifier */
+struct kvstore;			/* key-value store identifier */
+
+#define BF_NEGATIVE -1
+#define BF_POSITIVE 0
+
+struct metadata_ops {
+	/*
+	 * Returns ERR_PTR(*) on error.
+	 * Valid pointer on success.
+	 */
+	struct metadata * (*init_meta)(void *init_param, bool *unformatted);
+
+	void (*exit_meta)(struct metadata *md);
+
+	/*
+	 * Creates linear key-value store. Ksize and vsize in bytes.
+	 * If ksize or vsize are equal to zero, it means that keys
+	 * and values will be of a variable size. kmax is the
+	 * maximum _value_ of the key. If kmax is equal to zero,
+	 * then maximum is not known by the caller.
+	 *
+	 * Returns -ERR_PTR(*) on error.
+	 * Valid pointer on success.
+	 */
+	struct kvstore * (*kvs_create_linear)(struct metadata *md,
+			uint32_t ksize, uint32_t vsize, uint32_t kmax,
+			bool unformatted);
+	/*
+	 * Creates sparse key-value store. Ksize and vsize in bytes.
+	 * If ksize or vsize are equal to zero, it means that keys
+	 * and values will be of a variable size. knummax is the
+	 * maximum _number_ of the keys. If keymax is equal to zero,
+	 * then maximum is not known by the caller.
+	 *
+	 * Returns -ERR_PTR(*) on error.
+	 * Valid pointer on success.
+	 */
+	struct kvstore * (*kvs_create_sparse)(struct metadata *md,
+			uint32_t ksize, uint32_t vsize, uint32_t knummax,
+			bool unformatted);
+
+	/*
+	 * Returns -ERR* on error.
+	 * Returns 0 on success. In this case, "blockn" contains a newly
+	 * allocated block number.
+	 */
+	int (*alloc_data_block)(struct metadata *md, uint64_t *blockn);
+
+	/*
+	 * Returns -ERR* on error.
+	 * Returns 0 on success.
+	 */
+	int (*inc_refcount)(struct metadata *md, uint64_t blockn);
+
+	/*
+	 * Returns -ERR* on error.
+	 * Returns 0 on success.
+	 */
+	int (*dec_refcount)(struct metadata *md, uint64_t blockn);
+
+	/*
+	 * Returns -ERR* on error.
+	 * Returns 0 on success.
+	 */
+	int (*get_refcount)(struct metadata *md, uint64_t blockn);
+
+	/*
+	 * Returns -ERR on error.
+	 * Return 0 on success.
+	 */
+	int (*flush_meta)(struct metadata *md);
+
+	/*
+	 * Returns the private data stored in the metadata.
+	 *
+	 * Returns -ERR* on error.
+	 * Returns 0 on success.
+	 */
+	int (*get_private_data)(struct metadata *md, void **data,
+			uint32_t size);
+
+	/*
+	 * Fills in private data stored in the metadata.
+	 *
+	 * Returns -ERR* on error.
+	 * Returns 0 on success.
+	 */
+	int (*set_private_data)(struct metadata *md, void *data, uint32_t size);
+
+	/*
+	 * This is a hack to drop cache. In future we want to implement
+	 * proper message passing interface, to accomplish this and other
+	 * tasks.
+	 */
+	void (*flush_bufio_cache)(struct metadata *md);
+};
+
+#endif /* BACKEND_H */
diff --git a/drivers/md/dm-dedup-kvstore.h b/drivers/md/dm-dedup-kvstore.h
new file mode 100644
index 0000000..365a7f6
--- /dev/null
+++ b/drivers/md/dm-dedup-kvstore.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2012-2014 Vasily Tarasov
+ * Copyright (C) 2012-2014 Geoff Kuenning
+ * Copyright (C) 2012-2014 Sonam Mandal
+ * Copyright (C) 2012-2014 Karthikeyani Palanisami
+ * Copyright (C) 2012-2014 Philip Shilane
+ * Copyright (C) 2012-2014 Sagar Trehan
+ * Copyright (C) 2012-2014 Erez Zadok
+ *
+ * This file is released under the GPL.
+ */
+
+#ifndef KVSTORE_H
+#define KVSTORE_H
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/device-mapper.h>
+#include <linux/dm-io.h>
+#include <linux/dm-kcopyd.h>
+#include <linux/list.h>
+#include <linux/err.h>
+#include <asm/current.h>
+#include <linux/string.h>
+#include <linux/gfp.h>
+
+#include <linux/scatterlist.h>
+#include <asm/page.h>
+#include <asm/unaligned.h>
+#include <crypto/hash.h>
+#include <crypto/md5.h>
+#include <crypto/algapi.h>
+
+#include "dm-dedup-target.h"
+
+struct kvstore {
+	uint32_t vsize;
+	uint32_t ksize;
+
+	int (*kvs_delete)(struct kvstore *kvs, void *key, int32_t ksize);
+	int (*kvs_lookup)(struct kvstore *kvs, void *key, int32_t ksize,
+				void *value, int32_t *vsize);
+	int (*kvs_insert)(struct kvstore *kvs, void *key, int32_t ksize,
+				void *value, int32_t vsize);
+	int (*kvs_iterate)(struct kvstore *kvs, int (*itr_action)
+				(void *key, int32_t ksize, void *value,
+				 int32_t vsize, void *data), void *data);
+};
+
+#endif /* KVSTORE_H */
diff --git a/drivers/md/dm-dedup-target.h b/drivers/md/dm-dedup-target.h
new file mode 100644
index 0000000..703ad04
--- /dev/null
+++ b/drivers/md/dm-dedup-target.h
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2012-2014 Vasily Tarasov
+ * Copyright (C) 2012-2014 Geoff Kuenning
+ * Copyright (C) 2012-2014 Sonam Mandal
+ * Copyright (C) 2012-2014 Karthikeyani Palanisami
+ * Copyright (C) 2012-2014 Philip Shilane
+ * Copyright (C) 2012-2014 Sagar Trehan
+ * Copyright (C) 2012-2014 Erez Zadok
+ *
+ * This file is released under the GPL.
+ */
+
+#ifndef DM_DEDUP_H
+#define DM_DEDUP_H
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/device-mapper.h>
+#include <linux/dm-io.h>
+#include <linux/dm-kcopyd.h>
+#include <linux/list.h>
+#include <linux/err.h>
+#include <asm/current.h>
+#include <linux/string.h>
+#include <linux/gfp.h>
+#include <linux/delay.h>
+#include <linux/time.h>
+#include <linux/parser.h>
+#include <linux/blk_types.h>
+#include <linux/mempool.h>
+
+#include <linux/scatterlist.h>
+#include <asm/page.h>
+#include <asm/unaligned.h>
+#include <crypto/hash.h>
+#include <crypto/md5.h>
+#include <crypto/sha.h>
+#include <crypto/algapi.h>
+
+#define DM_MSG_PREFIX "dedup-mod"
+
+#define CRYPTO_ALG_NAME_LEN     16
+#define MAX_DIGEST_SIZE	SHA256_DIGEST_SIZE
+
+#define MIN_DEDUP_WORK_IO	16
+
+/* Per target instance structure */
+struct dedup_config {
+	struct dm_dev *data_dev;
+	struct dm_dev *metadata_dev;
+
+	uint32_t block_size;	/* in bytes */
+	uint32_t sectors_per_block;
+
+	uint32_t pblocks;	/* physical blocks */
+	uint32_t lblocks;	/* logical blocks */
+
+	struct workqueue_struct *workqueue;
+
+	struct hash_desc_table *desc_table;
+
+	uint64_t logical_block_counter;	/* Total number of used LBNs */
+	uint64_t physical_block_counter;/* Total number of allocated PBNs */
+
+	uint64_t	writes;		/* total number of writes */
+	uint64_t	dupwrites;
+	uint64_t	uniqwrites;
+	uint64_t	reads_on_writes;
+	uint64_t	overwrites;	/* writes to a prev. written offset */
+	uint64_t	newwrites;	/* writes to never written offsets */
+
+	struct dm_io_client *io_client;		/* used for read-on-write
+						   of misaligned requests */
+
+	struct metadata_ops *mdops;
+	struct metadata *bmd;
+	struct kvstore *kvs_hash_pbn;
+	struct kvstore *kvs_lbn_pbn;
+
+	char crypto_alg[CRYPTO_ALG_NAME_LEN];
+	int crypto_key_size;
+
+	uint32_t flushrq;		/* after how many writes call flush */
+	uint64_t writes_after_flush;	/* # of writes after the last flush */
+
+	mempool_t *dedup_work_pool;	/* Dedup work pool */
+};
+
+/* Value of the HASH-PBN key-value store */
+struct hash_pbn_value {
+	uint64_t pbn;	/* in blocks */
+};
+
+/* Value of the LBN-PBN key-value store */
+struct lbn_pbn_value {
+	uint64_t pbn;	/* in blocks */
+};
+
+#endif /* DM_DEDUP_H */
-- 
1.7.1

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

* Re: [PATCH RFCv2 01/10] dm-dedup: main data structures
  2014-08-28 21:56 [PATCH RFCv2 01/10] dm-dedup: main data structures Vasily Tarasov
@ 2014-09-26 15:24 ` Mike Snitzer
  2014-09-29 13:34   ` Vasily Tarasov
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Snitzer @ 2014-09-26 15:24 UTC (permalink / raw)
  To: Vasily Tarasov
  Cc: Joe Thornber, Christoph Hellwig, dm-devel, Philip Shilane,
	Sonam Mandal, Erez Zadok

Hi Vasily et al,

I've rebased my dm-dedup branch to your v2 patchset.  I then fixed
various issues with the code -- please see the ~7 commits that follow
your v2 patchset baseline:
http://git.kernel.org/cgit/linux/kernel/git/snitzer/linux.git/log/?h=dm-dedup

I will soon transition to actually trying to use dm-dedup and will then
focus primarily on the design (less on code style nits, etc).

I'll still likely fixup the ERRORs listed below.  Of note is the "ERROR:
application of sizeof to pointer".  I noticed that one during my
code-review too but it still needs fixing.

And BUG() and BUG_ON() are useful for early code development but they
need to be removed before the code can advance to the next stage
(e.g. upstream inclusion).

So I would _really_ appreciate it if you could remove most (if not all)
of the BUG() and BUG_ON() in the code.  Please rework the error paths so
that an error is returned and the error is propagated back to the
various callers in a graceful (non-destructive way).

Also, rather than posting v3 of the patchset, it'd probably be easiest
if you just cloned my repo and forked my 'dm-dedup' branch and then
submitted incremental patches to dm-devel.

Here is a forward of the kernel.org autobuild email we were sent related
to dm-dedup's excessive use of BUG() AND BUG_ON(), etc:

----- Forwarded message from Julia Lawall <julia.lawall@lip6.fr> -----

> Date: Tue, 23 Sep 2014 13:54:42 +0200 (CEST)
> From: Julia Lawall <julia.lawall@lip6.fr>
> To: kbuild test robot <fengguang.wu@intel.com>, tarasov@vasily.name
> cc: kbuild@01.org, snitzer@redhat.com
> Subject: [snitzer:dm-dedup 12/20] drivers/md/dm-dedup-hash.c:81:3-6: WARNING: Use BUG_ON (fwd)
> 
> All of the patches look good except for the one about unneeded variable
> (the last one?).
> 
> julia
> 
> ---------- Forwarded message ----------
> Date: Tue, 23 Sep 2014 05:27:24 +0800
> From: kbuild test robot <fengguang.wu@intel.com>
> To: kbuild@01.org
> Cc: Julia Lawall <julia.lawall@lip6.fr>
> Subject: [snitzer:dm-dedup 12/20] drivers/md/dm-dedup-hash.c:81:3-6: WARNING:
>     Use BUG_ON
> 
> TO: Vasily Tarasov <tarasov@vasily.name>
> CC: Mike Snitzer <snitzer@redhat.com>
> 
> Hi Vasily,
> 
> First bad commit (maybe != root cause):
> 
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/snitzer/linux.git dm-dedup
> head:   6d716389dd3b8320da41db4341ee390e226083b2
> commit: 266d082b5a0b2f7f2008379f7a31b0a7f2b498b6 [12/20] dm-dedup: Kconfig changes
> :::::: branch date: 3 hours ago
> :::::: commit date: 6 hours ago
> 
> >> drivers/md/dm-dedup-hash.c:81:3-6: WARNING: Use BUG_ON
> --
> >> drivers/md/dm-dedup-rw.c:219:2-5: WARNING: Use BUG_ON
> --
> >> drivers/md/dm-dedup-target.c:784:3-6: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:788:3-6: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:652:2-5: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:658:3-6: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:724:3-6: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:729:2-5: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:292:2-5: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:161:3-6: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:165:3-6: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:169:2-5: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:180:2-5: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:190:2-5: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:194:2-5: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:220:3-6: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:228:3-6: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:234:2-5: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:242:3-6: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:250:3-6: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:254:3-6: WARNING: Use BUG_ON
> >> drivers/md/dm-dedup-target.c:130:2-5: WARNING: Use BUG_ON
> --
> >> drivers/md/dm-dedup-cbt.c:343:8-10: ERROR: reference preceded by free on line 342
> >> drivers/md/dm-dedup-cbt.c:545:27-30: ERROR: reference preceded by free on line 544
> >> drivers/md/dm-dedup-cbt.c:738:27-30: ERROR: reference preceded by free on line 737
> --
> >> drivers/md/dm-dedup-rw.c:168:14-20: ERROR: application of sizeof to pointer
> --
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h:109:9-12: Unneeded variable: "__Y". Return "__Y" on line 110
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1180:9-12: Unneeded variable: "__Y". Return "__Y" on line 1181
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1173:10-13: Unneeded variable: "__Y". Return "__Y" on line 1174
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1187:10-13: Unneeded variable: "__Y". Return "__Y" on line 1188
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:93:10-13: Unneeded variable: "__Y". Return "__Y" on line 94
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:743:10-13: Unneeded variable: "__Y". Return "__Y" on line 744
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:115:9-12: Unneeded variable: "__Y". Return "__Y" on line 116
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:123:10-13: Unneeded variable: "__Y". Return "__Y" on line 124
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:131:10-13: Unneeded variable: "__Y". Return "__Y" on line 132
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h:109:9-12: Unneeded variable: "__Y". Return "__Y" on line 110
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1180:9-12: Unneeded variable: "__Y". Return "__Y" on line 1181
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1173:10-13: Unneeded variable: "__Y". Return "__Y" on line 1174
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1187:10-13: Unneeded variable: "__Y". Return "__Y" on line 1188
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:93:10-13: Unneeded variable: "__Y". Return "__Y" on line 94
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:743:10-13: Unneeded variable: "__Y". Return "__Y" on line 744
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:115:9-12: Unneeded variable: "__Y". Return "__Y" on line 116
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:123:10-13: Unneeded variable: "__Y". Return "__Y" on line 124
>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:131:10-13: Unneeded variable: "__Y". Return "__Y" on line 132
> >> drivers/md/dm-dedup-target.c:750:5-8: Unneeded variable: "ret". Return "0" on line 761
> 
> Please consider folding the attached diff :-)
> 
> ---
> 0-DAY kernel build testing backend              Open Source Technology Center
> http://lists.01.org/mailman/listinfo/kbuild                 Intel Corporation

> From: Fengguang Wu <fengguang.wu@intel.com>
> 
> Subject: [PATCH] dm-dedup: fix coccinelle warnings
> 
> TO: Mike Snitzer <snitzer@redhat.com>
> 
> CC: Vasily Tarasov <tarasov@vasily.name>
> 
> CC: linux-raid@vger.kernel.org (open list:SOFTWARE RAID 
> 
> CC: linux-kernel@vger.kernel.org 
> 
> 
> 
> drivers/md/dm-dedup-hash.c:81:3-6: WARNING: Use BUG_ON
> 
> 
> 
>  Use BUG_ON instead of a if condition followed by BUG.
> 
> 
> 
> Semantic patch information:
> 
>  This makes an effort to find cases where BUG() follows an if
> 
>  condition on an expression and replaces the if condition and BUG()
> 
>  with a BUG_ON having the conditional expression of the if statement
> 
>  as argument.
> 
> 
> 
> Generated by: scripts/coccinelle/misc/bugon.cocci
> 
> 
> 
> CC: Vasily Tarasov <tarasov@vasily.name>
> 
> CC: Mike Snitzer <snitzer@redhat.com>
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> 
> ---
> 
> 
> 
> Please take the patch only if it's a positive warning. Thanks!
> 
> 
> 
>  dm-dedup-hash.c |    3 +--
> 
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> 
> 
> --- a/drivers/md/dm-dedup-hash.c
> 
> +++ b/drivers/md/dm-dedup-hash.c
> 
> @@ -77,8 +77,7 @@ static int get_next_slot(struct hash_des
> 
>  	int count = 0;
> 
>  
> 
>  	do {
> 
> -		if (count == DEDUP_HASH_DESC_COUNT)
> 
> -			BUG();
> 
> +		BUG_ON(count == DEDUP_HASH_DESC_COUNT);
> 
>  
> 
>  		count++;
> 
>  		num = atomic_long_inc_return(&(desc_table->slot_counter));
> 

> From: Fengguang Wu <fengguang.wu@intel.com>
> 
> Subject: [PATCH] dm-dedup: fix coccinelle warnings
> 
> TO: Mike Snitzer <snitzer@redhat.com>
> 
> CC: Vasily Tarasov <tarasov@vasily.name>
> 
> CC: linux-raid@vger.kernel.org (open list:SOFTWARE RAID 
> 
> CC: linux-kernel@vger.kernel.org 
> 
> 
> 
> drivers/md/dm-dedup-rw.c:219:2-5: WARNING: Use BUG_ON
> 
> 
> 
>  Use BUG_ON instead of a if condition followed by BUG.
> 
> 
> 
> Semantic patch information:
> 
>  This makes an effort to find cases where BUG() follows an if
> 
>  condition on an expression and replaces the if condition and BUG()
> 
>  with a BUG_ON having the conditional expression of the if statement
> 
>  as argument.
> 
> 
> 
> Generated by: scripts/coccinelle/misc/bugon.cocci
> 
> 
> 
> CC: Vasily Tarasov <tarasov@vasily.name>
> 
> CC: Mike Snitzer <snitzer@redhat.com>
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> 
> ---
> 
> 
> 
> Please take the patch only if it's a positive warning. Thanks!
> 
> 
> 
>  dm-dedup-rw.c |    3 +--
> 
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> 
> 
> --- a/drivers/md/dm-dedup-rw.c
> 
> +++ b/drivers/md/dm-dedup-rw.c
> 
> @@ -215,8 +215,7 @@ static struct bio *prepare_bio_without_p
> 
>  	my_zero_fill_bio(clone);
> 
>  
> 
>  	r = merge_data(dc, clone->bi_io_vec->bv_page, bio);
> 
> -	if (r < 0)
> 
> -		BUG();
> 
> +	BUG_ON(r < 0);
> 
>  out:
> 
>  	return clone;
> 
>  }
> 

> From: Fengguang Wu <fengguang.wu@intel.com>
> 
> Subject: [PATCH] dm-dedup: fix coccinelle warnings
> 
> TO: Mike Snitzer <snitzer@redhat.com>
> 
> CC: Vasily Tarasov <tarasov@vasily.name>
> 
> CC: linux-raid@vger.kernel.org (open list:SOFTWARE RAID 
> 
> CC: linux-kernel@vger.kernel.org 
> 
> 
> 
> drivers/md/dm-dedup-target.c:784:3-6: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:788:3-6: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:652:2-5: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:658:3-6: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:724:3-6: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:729:2-5: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:292:2-5: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:161:3-6: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:165:3-6: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:169:2-5: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:180:2-5: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:190:2-5: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:194:2-5: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:220:3-6: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:228:3-6: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:234:2-5: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:242:3-6: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:250:3-6: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:254:3-6: WARNING: Use BUG_ON
> 
> drivers/md/dm-dedup-target.c:130:2-5: WARNING: Use BUG_ON
> 
> 
> 
>  Use BUG_ON instead of a if condition followed by BUG.
> 
> 
> 
> Semantic patch information:
> 
>  This makes an effort to find cases where BUG() follows an if
> 
>  condition on an expression and replaces the if condition and BUG()
> 
>  with a BUG_ON having the conditional expression of the if statement
> 
>  as argument.
> 
> 
> 
> Generated by: scripts/coccinelle/misc/bugon.cocci
> 
> 
> 
> CC: Vasily Tarasov <tarasov@vasily.name>
> 
> CC: Mike Snitzer <snitzer@redhat.com>
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> 
> ---
> 
> 
> 
> Please take the patch only if it's a positive warning. Thanks!
> 
> 
> 
>  dm-dedup-target.c |   60 ++++++++++++++++++------------------------------------
> 
>  1 file changed, 20 insertions(+), 40 deletions(-)
> 
> 
> 
> --- a/drivers/md/dm-dedup-target.c
> 
> +++ b/drivers/md/dm-dedup-target.c
> 
> @@ -126,8 +126,7 @@ static int write_to_new_block(struct ded
> 
>  
> 
>  	r = dc->kvs_lbn_pbn->kvs_insert(dc->kvs_lbn_pbn, (void *)&lbn,
> 
>  		sizeof(lbn), (void *)&lbnpbn_value, sizeof(lbnpbn_value));
> 
> -	if (r < 0)
> 
> -		BUG();
> 
> +	BUG_ON(r < 0);
> 
>  
> 
>  	return r;
> 
>  }
> 
> @@ -157,16 +156,13 @@ static int handle_write_no_hash(struct d
> 
>  		r = dc->kvs_hash_pbn->kvs_insert(dc->kvs_hash_pbn, (void *)hash,
> 
>  				dc->crypto_key_size, (void *)&hashpbn_value,
> 
>  				sizeof(hashpbn_value));
> 
> -		if (r < 0)
> 
> -			BUG();
> 
> +		BUG_ON(r < 0);
> 
>  
> 
>  		r = dc->mdops->inc_refcount(dc->bmd, pbn_new);
> 
> -		if (r < 0)
> 
> -			BUG();
> 
> +		BUG_ON(r < 0);
> 
>  
> 
>  		goto out;
> 
> -	} else if (r < 0)
> 
> -		BUG();
> 
> +	} else BUG_ON(r < 0);
> 
>  
> 
>  	/* LBN->PBN mappings exist */
> 
>  	dc->overwrites++;
> 
> @@ -176,8 +172,7 @@ static int handle_write_no_hash(struct d
> 
>  
> 
>  	pbn_old = lbnpbn_value.pbn;
> 
>  	r = dc->mdops->dec_refcount(dc->bmd, pbn_old);
> 
> -	if (r < 0)
> 
> -		BUG();
> 
> +	BUG_ON(r < 0);
> 
>  
> 
>  	dc->logical_block_counter--;
> 
>  
> 
> @@ -186,12 +181,10 @@ static int handle_write_no_hash(struct d
> 
>  	r = dc->kvs_hash_pbn->kvs_insert(dc->kvs_hash_pbn, (void *)hash,
> 
>  				dc->crypto_key_size, (void *)&hashpbn_value,
> 
>  				sizeof(hashpbn_value));
> 
> -	if (r < 0)
> 
> -		BUG();
> 
> +	BUG_ON(r < 0);
> 
>  
> 
>  	r = dc->mdops->inc_refcount(dc->bmd, pbn_new);
> 
> -	if (r < 0)
> 
> -		BUG();
> 
> +	BUG_ON(r < 0);
> 
>  out:
> 
>  	return r;
> 
>  }
> 
> @@ -216,42 +209,36 @@ static int handle_write_with_hash(struct
> 
>  		dc->newwrites++;
> 
>  
> 
>  		r = dc->mdops->inc_refcount(dc->bmd, pbn_new);
> 
> -		if (r < 0)
> 
> -			BUG();
> 
> +		BUG_ON(r < 0);
> 
>  
> 
>  		lbnpbn_value.pbn = pbn_new;
> 
>  
> 
>  		r = dc->kvs_lbn_pbn->kvs_insert(dc->kvs_lbn_pbn, (void *)&lbn,
> 
>  				sizeof(lbn), (void *)&lbnpbn_value,
> 
>  				sizeof(lbnpbn_value));
> 
> -		if (r < 0)
> 
> -			BUG();
> 
> +		BUG_ON(r < 0);
> 
>  
> 
>  		dc->logical_block_counter++;
> 
>  
> 
>  		goto out;
> 
> -	} else if (r < 0)
> 
> -		BUG();
> 
> +	} else BUG_ON(r < 0);
> 
>  
> 
>  	/* LBN->PBN mapping entry exists */
> 
>  	dc->overwrites++;
> 
>  	pbn_old = lbnpbn_value.pbn;
> 
>  	if (pbn_new != pbn_old) {
> 
>  		r = dc->mdops->inc_refcount(dc->bmd, pbn_new);
> 
> -		if (r < 0)
> 
> -			BUG();
> 
> +		BUG_ON(r < 0);
> 
>  
> 
>  		new_lbnpbn_value.pbn = pbn_new;
> 
>  
> 
>  		r = dc->kvs_lbn_pbn->kvs_insert(dc->kvs_lbn_pbn, (void *)&lbn,
> 
>  			sizeof(lbn), (void *)&new_lbnpbn_value,
> 
>  			sizeof(new_lbnpbn_value));
> 
> -		if (r < 0)
> 
> -			BUG();
> 
> +		BUG_ON(r < 0);
> 
>  
> 
>  		r = dc->mdops->dec_refcount(dc->bmd, pbn_old);
> 
> -		if (r < 0)
> 
> -			BUG();
> 
> +		BUG_ON(r < 0);
> 
>  
> 
>  		goto out;
> 
>  	}
> 
> @@ -288,8 +275,7 @@ static void handle_write(struct dedup_co
> 
>  	lbn = bio_lbn(dc, bio);
> 
>  
> 
>  	r = compute_hash_bio(dc->desc_table, bio, hash);
> 
> -	if (r)
> 
> -		BUG();
> 
> +	BUG_ON(r);
> 
>  
> 
>  	r = dc->kvs_hash_pbn->kvs_lookup(dc->kvs_hash_pbn, hash,
> 
>  				dc->crypto_key_size, &hashpbn_value, &vsize);
> 
> @@ -648,14 +634,12 @@ static int dm_dedup_ctr_fn(struct dm_tar
> 
>  	}
> 
>  
> 
>  	r = dc->mdops->flush_meta(md);
> 
> -	if (r < 0)
> 
> -		BUG();
> 
> +	BUG_ON(r < 0);
> 
>  
> 
>  	if (!unformatted && dc->mdops->get_private_data) {
> 
>  		r = dc->mdops->get_private_data(md, (void **)&data,
> 
>  				sizeof(struct on_disk_stats));
> 
> -		if (r < 0)
> 
> -			BUG();
> 
> +		BUG_ON(r < 0);
> 
>  
> 
>  		logical_block_counter = data->logical_block_counter;
> 
>  		physical_block_counter = data->physical_block_counter;
> 
> @@ -720,13 +704,11 @@ static void dm_dedup_dtr_fn(struct dm_ta
> 
>  
> 
>  		ret = dc->mdops->set_private_data(dc->bmd, &data,
> 
>  				sizeof(struct on_disk_stats));
> 
> -		if (ret < 0)
> 
> -			BUG();
> 
> +		BUG_ON(ret < 0);
> 
>  	}
> 
>  
> 
>  	ret = dc->mdops->flush_meta(dc->bmd);
> 
> -	if (ret < 0)
> 
> -		BUG();
> 
> +	BUG_ON(ret < 0);
> 
>  
> 
>  	flush_workqueue(dc->workqueue);
> 
>  	destroy_workqueue(dc->workqueue);
> 
> @@ -780,12 +762,10 @@ static int cleanup_hash_pbn(void *key, i
> 
>  	if (test_bit(pbn_val, ms_data->bitmap) == 0) {
> 
>  		ret = dc->kvs_hash_pbn->kvs_delete(dc->kvs_hash_pbn,
> 
>  							key, ksize);
> 
> -		if (ret < 0)
> 
> -			BUG();
> 
> +		BUG_ON(ret < 0);
> 
>  
> 
>  		r = dc->mdops->dec_refcount(ms_data->dc->bmd, pbn_val);
> 
> -		if (r < 0)
> 
> -			BUG();
> 
> +		BUG_ON(r < 0);
> 
>  
> 
>  		ms_data->cleanup_count++;
> 
>  	}
> 

> From: Fengguang Wu <fengguang.wu@intel.com>
> 
> Subject: [PATCH] dm-dedup: fix coccinelle warnings
> 
> TO: Mike Snitzer <snitzer@redhat.com>
> 
> CC: Vasily Tarasov <tarasov@vasily.name>
> 
> CC: linux-raid@vger.kernel.org (open list:SOFTWARE RAID 
> 
> CC: linux-kernel@vger.kernel.org 
> 
> 
> 
> drivers/md/dm-dedup-rw.c:168:14-20: ERROR: application of sizeof to pointer
> 
> 
> 
>  sizeof when applied to a pointer typed expression gives the size of
> 
>  the pointer
> 
> 
> 
> Generated by: scripts/coccinelle/misc/noderef.cocci
> 
> 
> 
> CC: Vasily Tarasov <tarasov@vasily.name>
> 
> CC: Mike Snitzer <snitzer@redhat.com>
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> 
> ---
> 
> 
> 
>  dm-dedup-rw.c |    2 +-
> 
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 
> 
> --- a/drivers/md/dm-dedup-rw.c
> 
> +++ b/drivers/md/dm-dedup-rw.c
> 
> @@ -165,7 +165,7 @@ static struct bio *prepare_bio_with_pbn(
> 
>  	struct page_list *pl;
> 
>  	struct bio *clone = NULL;
> 
>  
> 
> -	pl = kmalloc(sizeof(pl), GFP_NOIO);
> 
> +	pl = kmalloc(sizeof(*pl), GFP_NOIO);
> 
>  	if (!pl)
> 
>  		goto out;
> 
>  
> 

> From: Fengguang Wu <fengguang.wu@intel.com>
> 
> Subject: [PATCH] dm-dedup: fix coccinelle warnings
> 
> TO: Mike Snitzer <snitzer@redhat.com>
> 
> CC: Vasily Tarasov <tarasov@vasily.name>
> 
> CC: linux-raid@vger.kernel.org (open list:SOFTWARE RAID 
> 
> CC: linux-kernel@vger.kernel.org 
> 
> 
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h:109:9-12: Unneeded variable: "__Y". Return "__Y" on line 110
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1180:9-12: Unneeded variable: "__Y". Return "__Y" on line 1181
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1173:10-13: Unneeded variable: "__Y". Return "__Y" on line 1174
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1187:10-13: Unneeded variable: "__Y". Return "__Y" on line 1188
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:93:10-13: Unneeded variable: "__Y". Return "__Y" on line 94
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:743:10-13: Unneeded variable: "__Y". Return "__Y" on line 744
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:115:9-12: Unneeded variable: "__Y". Return "__Y" on line 116
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:123:10-13: Unneeded variable: "__Y". Return "__Y" on line 124
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:131:10-13: Unneeded variable: "__Y". Return "__Y" on line 132
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h:109:9-12: Unneeded variable: "__Y". Return "__Y" on line 110
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1180:9-12: Unneeded variable: "__Y". Return "__Y" on line 1181
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1173:10-13: Unneeded variable: "__Y". Return "__Y" on line 1174
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1187:10-13: Unneeded variable: "__Y". Return "__Y" on line 1188
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:93:10-13: Unneeded variable: "__Y". Return "__Y" on line 94
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:743:10-13: Unneeded variable: "__Y". Return "__Y" on line 744
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:115:9-12: Unneeded variable: "__Y". Return "__Y" on line 116
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:123:10-13: Unneeded variable: "__Y". Return "__Y" on line 124
> 
> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:131:10-13: Unneeded variable: "__Y". Return "__Y" on line 132
> 
> drivers/md/dm-dedup-target.c:750:5-8: Unneeded variable: "ret". Return "0" on line 761
> 
> 
> 
> 
> 
>  Removes unneeded variable used to store return value.
> 
> 
> 
> Generated by: scripts/coccinelle/misc/returnvar.cocci
> 
> 
> 
> CC: Vasily Tarasov <tarasov@vasily.name>
> 
> CC: Mike Snitzer <snitzer@redhat.com>
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> 
> ---
> 
> 
> 
> Please take the patch only if it's a positive warning. Thanks!
> 
> 
> 
>  /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h |    6 ------
> 
>  /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h     |    6 ------
> 
>  /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h     |    4 ----
> 
>  /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h     |    2 --
> 
>  drivers/md/dm-dedup-target.c                              |    3 +--
> 
>  5 files changed, 1 insertion(+), 20 deletions(-)
> 
> 
> 
> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h
> 
> @@ -106,7 +106,6 @@ typedef float __v4sf __attribute__ ((__v
> 
>  extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm_undefined_ps (void)
> 
>  {
> 
> -  __m128 __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h
> 
> @@ -1170,21 +1170,18 @@ _mm256_movemask_ps (__m256 __A)
> 
>  extern __inline __m256d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm256_undefined_pd (void)
> 
>  {
> 
> -  __m256d __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
>  extern __inline __m256 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm256_undefined_ps (void)
> 
>  {
> 
> -  __m256 __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
>  extern __inline __m256i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm256_undefined_si256 (void)
> 
>  {
> 
> -  __m256i __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h
> 
> @@ -90,7 +90,6 @@ _mm_setr_pd (double __W, double __X)
> 
>  extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm_undefined_pd (void)
> 
>  {
> 
> -  __m128d __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
> @@ -740,7 +739,6 @@ _mm_move_epi64 (__m128i __A)
> 
>  extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm_undefined_si128 (void)
> 
>  {
> 
> -  __m128i __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h
> 
> @@ -112,7 +112,6 @@ extern __inline __m512
> 
>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm512_undefined_ps (void)
> 
>  {
> 
> -  __m512 __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
> @@ -120,7 +119,6 @@ extern __inline __m512d
> 
>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm512_undefined_pd (void)
> 
>  {
> 
> -  __m512d __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
> @@ -128,7 +126,6 @@ extern __inline __m512i
> 
>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm512_undefined_si512 (void)
> 
>  {
> 
> -  __m512i __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h
> 
> @@ -106,7 +106,6 @@ typedef float __v4sf __attribute__ ((__v
> 
>  extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm_undefined_ps (void)
> 
>  {
> 
> -  __m128 __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h
> 
> @@ -1170,21 +1170,18 @@ _mm256_movemask_ps (__m256 __A)
> 
>  extern __inline __m256d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm256_undefined_pd (void)
> 
>  {
> 
> -  __m256d __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
>  extern __inline __m256 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm256_undefined_ps (void)
> 
>  {
> 
> -  __m256 __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
>  extern __inline __m256i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm256_undefined_si256 (void)
> 
>  {
> 
> -  __m256i __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h
> 
> @@ -90,7 +90,6 @@ _mm_setr_pd (double __W, double __X)
> 
>  extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm_undefined_pd (void)
> 
>  {
> 
> -  __m128d __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
> @@ -740,7 +739,6 @@ _mm_move_epi64 (__m128i __A)
> 
>  extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm_undefined_si128 (void)
> 
>  {
> 
> -  __m128i __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h
> 
> @@ -112,7 +112,6 @@ extern __inline __m512
> 
>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm512_undefined_ps (void)
> 
>  {
> 
> -  __m512 __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
> @@ -120,7 +119,6 @@ extern __inline __m512d
> 
>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm512_undefined_pd (void)
> 
>  {
> 
> -  __m512d __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
> @@ -128,7 +126,6 @@ extern __inline __m512i
> 
>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
> 
>  _mm512_undefined_si512 (void)
> 
>  {
> 
> -  __m512i __Y = __Y;
> 
>    return __Y;
> 
>  }
> 
>  
> 
> --- a/drivers/md/dm-dedup-target.c
> 
> +++ b/drivers/md/dm-dedup-target.c
> 
> @@ -747,7 +747,6 @@ static void dm_dedup_dtr_fn(struct dm_ta
> 
>  static int mark_lbn_pbn_bitmap(void *key, int32_t ksize,
> 
>  		void *value, int32_t vsize, void *data)
> 
>  {
> 
> -	int ret = 0;
> 
>  	struct mark_and_sweep_data *ms_data =
> 
>  		(struct mark_and_sweep_data *)data;
> 
>  	uint64_t pbn_val = *((uint64_t *)value);
> 
> @@ -758,7 +757,7 @@ static int mark_lbn_pbn_bitmap(void *key
> 
>  
> 
>  	bitmap_set(ms_data->bitmap, pbn_val, 1);
> 
>  
> 
> -	return ret;
> 
> +	return 0;
> 
>  }
> 
>  
> 
>  static int cleanup_hash_pbn(void *key, int32_t ksize, void *value,
> 


----- End forwarded message -----

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

* Re: [PATCH RFCv2 01/10] dm-dedup: main data structures
  2014-09-26 15:24 ` Mike Snitzer
@ 2014-09-29 13:34   ` Vasily Tarasov
  2014-10-17 17:11     ` Vasily Tarasov
  0 siblings, 1 reply; 10+ messages in thread
From: Vasily Tarasov @ 2014-09-29 13:34 UTC (permalink / raw)
  To: Mike Snitzer
  Cc: Joe Thornber, Christoph Hellwig, device-mapper development,
	Philip Shilane, Sonam Mandal, Erez Zadok

Hi Mike,

Thanks for staging the patches and fixing some issues!

It totally makes sense to clone your repo and develop on top of it.
That should make things easier both for you and us.

Let us work through the error paths and fix BUG() and BUG_ON() things
first. We'll try to get some patches ready by the end of the week.

Thanks,
Vasily

On Fri, Sep 26, 2014 at 11:24 AM, Mike Snitzer <snitzer@redhat.com> wrote:
> Hi Vasily et al,
>
> I've rebased my dm-dedup branch to your v2 patchset.  I then fixed
> various issues with the code -- please see the ~7 commits that follow
> your v2 patchset baseline:
> http://git.kernel.org/cgit/linux/kernel/git/snitzer/linux.git/log/?h=dm-dedup
>
> I will soon transition to actually trying to use dm-dedup and will then
> focus primarily on the design (less on code style nits, etc).
>
> I'll still likely fixup the ERRORs listed below.  Of note is the "ERROR:
> application of sizeof to pointer".  I noticed that one during my
> code-review too but it still needs fixing.
>
> And BUG() and BUG_ON() are useful for early code development but they
> need to be removed before the code can advance to the next stage
> (e.g. upstream inclusion).
>
> So I would _really_ appreciate it if you could remove most (if not all)
> of the BUG() and BUG_ON() in the code.  Please rework the error paths so
> that an error is returned and the error is propagated back to the
> various callers in a graceful (non-destructive way).
>
> Also, rather than posting v3 of the patchset, it'd probably be easiest
> if you just cloned my repo and forked my 'dm-dedup' branch and then
> submitted incremental patches to dm-devel.
>
> Here is a forward of the kernel.org autobuild email we were sent related
> to dm-dedup's excessive use of BUG() AND BUG_ON(), etc:
>
> ----- Forwarded message from Julia Lawall <julia.lawall@lip6.fr> -----
>
>> Date: Tue, 23 Sep 2014 13:54:42 +0200 (CEST)
>> From: Julia Lawall <julia.lawall@lip6.fr>
>> To: kbuild test robot <fengguang.wu@intel.com>, tarasov@vasily.name
>> cc: kbuild@01.org, snitzer@redhat.com
>> Subject: [snitzer:dm-dedup 12/20] drivers/md/dm-dedup-hash.c:81:3-6: WARNING: Use BUG_ON (fwd)
>>
>> All of the patches look good except for the one about unneeded variable
>> (the last one?).
>>
>> julia
>>
>> ---------- Forwarded message ----------
>> Date: Tue, 23 Sep 2014 05:27:24 +0800
>> From: kbuild test robot <fengguang.wu@intel.com>
>> To: kbuild@01.org
>> Cc: Julia Lawall <julia.lawall@lip6.fr>
>> Subject: [snitzer:dm-dedup 12/20] drivers/md/dm-dedup-hash.c:81:3-6: WARNING:
>>     Use BUG_ON
>>
>> TO: Vasily Tarasov <tarasov@vasily.name>
>> CC: Mike Snitzer <snitzer@redhat.com>
>>
>> Hi Vasily,
>>
>> First bad commit (maybe != root cause):
>>
>> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/snitzer/linux.git dm-dedup
>> head:   6d716389dd3b8320da41db4341ee390e226083b2
>> commit: 266d082b5a0b2f7f2008379f7a31b0a7f2b498b6 [12/20] dm-dedup: Kconfig changes
>> :::::: branch date: 3 hours ago
>> :::::: commit date: 6 hours ago
>>
>> >> drivers/md/dm-dedup-hash.c:81:3-6: WARNING: Use BUG_ON
>> --
>> >> drivers/md/dm-dedup-rw.c:219:2-5: WARNING: Use BUG_ON
>> --
>> >> drivers/md/dm-dedup-target.c:784:3-6: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:788:3-6: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:652:2-5: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:658:3-6: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:724:3-6: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:729:2-5: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:292:2-5: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:161:3-6: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:165:3-6: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:169:2-5: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:180:2-5: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:190:2-5: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:194:2-5: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:220:3-6: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:228:3-6: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:234:2-5: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:242:3-6: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:250:3-6: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:254:3-6: WARNING: Use BUG_ON
>> >> drivers/md/dm-dedup-target.c:130:2-5: WARNING: Use BUG_ON
>> --
>> >> drivers/md/dm-dedup-cbt.c:343:8-10: ERROR: reference preceded by free on line 342
>> >> drivers/md/dm-dedup-cbt.c:545:27-30: ERROR: reference preceded by free on line 544
>> >> drivers/md/dm-dedup-cbt.c:738:27-30: ERROR: reference preceded by free on line 737
>> --
>> >> drivers/md/dm-dedup-rw.c:168:14-20: ERROR: application of sizeof to pointer
>> --
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h:109:9-12: Unneeded variable: "__Y". Return "__Y" on line 110
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1180:9-12: Unneeded variable: "__Y". Return "__Y" on line 1181
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1173:10-13: Unneeded variable: "__Y". Return "__Y" on line 1174
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1187:10-13: Unneeded variable: "__Y". Return "__Y" on line 1188
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:93:10-13: Unneeded variable: "__Y". Return "__Y" on line 94
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:743:10-13: Unneeded variable: "__Y". Return "__Y" on line 744
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:115:9-12: Unneeded variable: "__Y". Return "__Y" on line 116
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:123:10-13: Unneeded variable: "__Y". Return "__Y" on line 124
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:131:10-13: Unneeded variable: "__Y". Return "__Y" on line 132
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h:109:9-12: Unneeded variable: "__Y". Return "__Y" on line 110
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1180:9-12: Unneeded variable: "__Y". Return "__Y" on line 1181
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1173:10-13: Unneeded variable: "__Y". Return "__Y" on line 1174
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1187:10-13: Unneeded variable: "__Y". Return "__Y" on line 1188
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:93:10-13: Unneeded variable: "__Y". Return "__Y" on line 94
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:743:10-13: Unneeded variable: "__Y". Return "__Y" on line 744
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:115:9-12: Unneeded variable: "__Y". Return "__Y" on line 116
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:123:10-13: Unneeded variable: "__Y". Return "__Y" on line 124
>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:131:10-13: Unneeded variable: "__Y". Return "__Y" on line 132
>> >> drivers/md/dm-dedup-target.c:750:5-8: Unneeded variable: "ret". Return "0" on line 761
>>
>> Please consider folding the attached diff :-)
>>
>> ---
>> 0-DAY kernel build testing backend              Open Source Technology Center
>> http://lists.01.org/mailman/listinfo/kbuild                 Intel Corporation
>
>> From: Fengguang Wu <fengguang.wu@intel.com>
>>
>> Subject: [PATCH] dm-dedup: fix coccinelle warnings
>>
>> TO: Mike Snitzer <snitzer@redhat.com>
>>
>> CC: Vasily Tarasov <tarasov@vasily.name>
>>
>> CC: linux-raid@vger.kernel.org (open list:SOFTWARE RAID
>>
>> CC: linux-kernel@vger.kernel.org
>>
>>
>>
>> drivers/md/dm-dedup-hash.c:81:3-6: WARNING: Use BUG_ON
>>
>>
>>
>>  Use BUG_ON instead of a if condition followed by BUG.
>>
>>
>>
>> Semantic patch information:
>>
>>  This makes an effort to find cases where BUG() follows an if
>>
>>  condition on an expression and replaces the if condition and BUG()
>>
>>  with a BUG_ON having the conditional expression of the if statement
>>
>>  as argument.
>>
>>
>>
>> Generated by: scripts/coccinelle/misc/bugon.cocci
>>
>>
>>
>> CC: Vasily Tarasov <tarasov@vasily.name>
>>
>> CC: Mike Snitzer <snitzer@redhat.com>
>>
>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>
>> ---
>>
>>
>>
>> Please take the patch only if it's a positive warning. Thanks!
>>
>>
>>
>>  dm-dedup-hash.c |    3 +--
>>
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>>
>>
>> --- a/drivers/md/dm-dedup-hash.c
>>
>> +++ b/drivers/md/dm-dedup-hash.c
>>
>> @@ -77,8 +77,7 @@ static int get_next_slot(struct hash_des
>>
>>       int count = 0;
>>
>>
>>
>>       do {
>>
>> -             if (count == DEDUP_HASH_DESC_COUNT)
>>
>> -                     BUG();
>>
>> +             BUG_ON(count == DEDUP_HASH_DESC_COUNT);
>>
>>
>>
>>               count++;
>>
>>               num = atomic_long_inc_return(&(desc_table->slot_counter));
>>
>
>> From: Fengguang Wu <fengguang.wu@intel.com>
>>
>> Subject: [PATCH] dm-dedup: fix coccinelle warnings
>>
>> TO: Mike Snitzer <snitzer@redhat.com>
>>
>> CC: Vasily Tarasov <tarasov@vasily.name>
>>
>> CC: linux-raid@vger.kernel.org (open list:SOFTWARE RAID
>>
>> CC: linux-kernel@vger.kernel.org
>>
>>
>>
>> drivers/md/dm-dedup-rw.c:219:2-5: WARNING: Use BUG_ON
>>
>>
>>
>>  Use BUG_ON instead of a if condition followed by BUG.
>>
>>
>>
>> Semantic patch information:
>>
>>  This makes an effort to find cases where BUG() follows an if
>>
>>  condition on an expression and replaces the if condition and BUG()
>>
>>  with a BUG_ON having the conditional expression of the if statement
>>
>>  as argument.
>>
>>
>>
>> Generated by: scripts/coccinelle/misc/bugon.cocci
>>
>>
>>
>> CC: Vasily Tarasov <tarasov@vasily.name>
>>
>> CC: Mike Snitzer <snitzer@redhat.com>
>>
>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>
>> ---
>>
>>
>>
>> Please take the patch only if it's a positive warning. Thanks!
>>
>>
>>
>>  dm-dedup-rw.c |    3 +--
>>
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>>
>>
>> --- a/drivers/md/dm-dedup-rw.c
>>
>> +++ b/drivers/md/dm-dedup-rw.c
>>
>> @@ -215,8 +215,7 @@ static struct bio *prepare_bio_without_p
>>
>>       my_zero_fill_bio(clone);
>>
>>
>>
>>       r = merge_data(dc, clone->bi_io_vec->bv_page, bio);
>>
>> -     if (r < 0)
>>
>> -             BUG();
>>
>> +     BUG_ON(r < 0);
>>
>>  out:
>>
>>       return clone;
>>
>>  }
>>
>
>> From: Fengguang Wu <fengguang.wu@intel.com>
>>
>> Subject: [PATCH] dm-dedup: fix coccinelle warnings
>>
>> TO: Mike Snitzer <snitzer@redhat.com>
>>
>> CC: Vasily Tarasov <tarasov@vasily.name>
>>
>> CC: linux-raid@vger.kernel.org (open list:SOFTWARE RAID
>>
>> CC: linux-kernel@vger.kernel.org
>>
>>
>>
>> drivers/md/dm-dedup-target.c:784:3-6: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:788:3-6: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:652:2-5: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:658:3-6: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:724:3-6: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:729:2-5: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:292:2-5: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:161:3-6: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:165:3-6: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:169:2-5: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:180:2-5: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:190:2-5: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:194:2-5: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:220:3-6: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:228:3-6: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:234:2-5: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:242:3-6: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:250:3-6: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:254:3-6: WARNING: Use BUG_ON
>>
>> drivers/md/dm-dedup-target.c:130:2-5: WARNING: Use BUG_ON
>>
>>
>>
>>  Use BUG_ON instead of a if condition followed by BUG.
>>
>>
>>
>> Semantic patch information:
>>
>>  This makes an effort to find cases where BUG() follows an if
>>
>>  condition on an expression and replaces the if condition and BUG()
>>
>>  with a BUG_ON having the conditional expression of the if statement
>>
>>  as argument.
>>
>>
>>
>> Generated by: scripts/coccinelle/misc/bugon.cocci
>>
>>
>>
>> CC: Vasily Tarasov <tarasov@vasily.name>
>>
>> CC: Mike Snitzer <snitzer@redhat.com>
>>
>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>
>> ---
>>
>>
>>
>> Please take the patch only if it's a positive warning. Thanks!
>>
>>
>>
>>  dm-dedup-target.c |   60 ++++++++++++++++++------------------------------------
>>
>>  1 file changed, 20 insertions(+), 40 deletions(-)
>>
>>
>>
>> --- a/drivers/md/dm-dedup-target.c
>>
>> +++ b/drivers/md/dm-dedup-target.c
>>
>> @@ -126,8 +126,7 @@ static int write_to_new_block(struct ded
>>
>>
>>
>>       r = dc->kvs_lbn_pbn->kvs_insert(dc->kvs_lbn_pbn, (void *)&lbn,
>>
>>               sizeof(lbn), (void *)&lbnpbn_value, sizeof(lbnpbn_value));
>>
>> -     if (r < 0)
>>
>> -             BUG();
>>
>> +     BUG_ON(r < 0);
>>
>>
>>
>>       return r;
>>
>>  }
>>
>> @@ -157,16 +156,13 @@ static int handle_write_no_hash(struct d
>>
>>               r = dc->kvs_hash_pbn->kvs_insert(dc->kvs_hash_pbn, (void *)hash,
>>
>>                               dc->crypto_key_size, (void *)&hashpbn_value,
>>
>>                               sizeof(hashpbn_value));
>>
>> -             if (r < 0)
>>
>> -                     BUG();
>>
>> +             BUG_ON(r < 0);
>>
>>
>>
>>               r = dc->mdops->inc_refcount(dc->bmd, pbn_new);
>>
>> -             if (r < 0)
>>
>> -                     BUG();
>>
>> +             BUG_ON(r < 0);
>>
>>
>>
>>               goto out;
>>
>> -     } else if (r < 0)
>>
>> -             BUG();
>>
>> +     } else BUG_ON(r < 0);
>>
>>
>>
>>       /* LBN->PBN mappings exist */
>>
>>       dc->overwrites++;
>>
>> @@ -176,8 +172,7 @@ static int handle_write_no_hash(struct d
>>
>>
>>
>>       pbn_old = lbnpbn_value.pbn;
>>
>>       r = dc->mdops->dec_refcount(dc->bmd, pbn_old);
>>
>> -     if (r < 0)
>>
>> -             BUG();
>>
>> +     BUG_ON(r < 0);
>>
>>
>>
>>       dc->logical_block_counter--;
>>
>>
>>
>> @@ -186,12 +181,10 @@ static int handle_write_no_hash(struct d
>>
>>       r = dc->kvs_hash_pbn->kvs_insert(dc->kvs_hash_pbn, (void *)hash,
>>
>>                               dc->crypto_key_size, (void *)&hashpbn_value,
>>
>>                               sizeof(hashpbn_value));
>>
>> -     if (r < 0)
>>
>> -             BUG();
>>
>> +     BUG_ON(r < 0);
>>
>>
>>
>>       r = dc->mdops->inc_refcount(dc->bmd, pbn_new);
>>
>> -     if (r < 0)
>>
>> -             BUG();
>>
>> +     BUG_ON(r < 0);
>>
>>  out:
>>
>>       return r;
>>
>>  }
>>
>> @@ -216,42 +209,36 @@ static int handle_write_with_hash(struct
>>
>>               dc->newwrites++;
>>
>>
>>
>>               r = dc->mdops->inc_refcount(dc->bmd, pbn_new);
>>
>> -             if (r < 0)
>>
>> -                     BUG();
>>
>> +             BUG_ON(r < 0);
>>
>>
>>
>>               lbnpbn_value.pbn = pbn_new;
>>
>>
>>
>>               r = dc->kvs_lbn_pbn->kvs_insert(dc->kvs_lbn_pbn, (void *)&lbn,
>>
>>                               sizeof(lbn), (void *)&lbnpbn_value,
>>
>>                               sizeof(lbnpbn_value));
>>
>> -             if (r < 0)
>>
>> -                     BUG();
>>
>> +             BUG_ON(r < 0);
>>
>>
>>
>>               dc->logical_block_counter++;
>>
>>
>>
>>               goto out;
>>
>> -     } else if (r < 0)
>>
>> -             BUG();
>>
>> +     } else BUG_ON(r < 0);
>>
>>
>>
>>       /* LBN->PBN mapping entry exists */
>>
>>       dc->overwrites++;
>>
>>       pbn_old = lbnpbn_value.pbn;
>>
>>       if (pbn_new != pbn_old) {
>>
>>               r = dc->mdops->inc_refcount(dc->bmd, pbn_new);
>>
>> -             if (r < 0)
>>
>> -                     BUG();
>>
>> +             BUG_ON(r < 0);
>>
>>
>>
>>               new_lbnpbn_value.pbn = pbn_new;
>>
>>
>>
>>               r = dc->kvs_lbn_pbn->kvs_insert(dc->kvs_lbn_pbn, (void *)&lbn,
>>
>>                       sizeof(lbn), (void *)&new_lbnpbn_value,
>>
>>                       sizeof(new_lbnpbn_value));
>>
>> -             if (r < 0)
>>
>> -                     BUG();
>>
>> +             BUG_ON(r < 0);
>>
>>
>>
>>               r = dc->mdops->dec_refcount(dc->bmd, pbn_old);
>>
>> -             if (r < 0)
>>
>> -                     BUG();
>>
>> +             BUG_ON(r < 0);
>>
>>
>>
>>               goto out;
>>
>>       }
>>
>> @@ -288,8 +275,7 @@ static void handle_write(struct dedup_co
>>
>>       lbn = bio_lbn(dc, bio);
>>
>>
>>
>>       r = compute_hash_bio(dc->desc_table, bio, hash);
>>
>> -     if (r)
>>
>> -             BUG();
>>
>> +     BUG_ON(r);
>>
>>
>>
>>       r = dc->kvs_hash_pbn->kvs_lookup(dc->kvs_hash_pbn, hash,
>>
>>                               dc->crypto_key_size, &hashpbn_value, &vsize);
>>
>> @@ -648,14 +634,12 @@ static int dm_dedup_ctr_fn(struct dm_tar
>>
>>       }
>>
>>
>>
>>       r = dc->mdops->flush_meta(md);
>>
>> -     if (r < 0)
>>
>> -             BUG();
>>
>> +     BUG_ON(r < 0);
>>
>>
>>
>>       if (!unformatted && dc->mdops->get_private_data) {
>>
>>               r = dc->mdops->get_private_data(md, (void **)&data,
>>
>>                               sizeof(struct on_disk_stats));
>>
>> -             if (r < 0)
>>
>> -                     BUG();
>>
>> +             BUG_ON(r < 0);
>>
>>
>>
>>               logical_block_counter = data->logical_block_counter;
>>
>>               physical_block_counter = data->physical_block_counter;
>>
>> @@ -720,13 +704,11 @@ static void dm_dedup_dtr_fn(struct dm_ta
>>
>>
>>
>>               ret = dc->mdops->set_private_data(dc->bmd, &data,
>>
>>                               sizeof(struct on_disk_stats));
>>
>> -             if (ret < 0)
>>
>> -                     BUG();
>>
>> +             BUG_ON(ret < 0);
>>
>>       }
>>
>>
>>
>>       ret = dc->mdops->flush_meta(dc->bmd);
>>
>> -     if (ret < 0)
>>
>> -             BUG();
>>
>> +     BUG_ON(ret < 0);
>>
>>
>>
>>       flush_workqueue(dc->workqueue);
>>
>>       destroy_workqueue(dc->workqueue);
>>
>> @@ -780,12 +762,10 @@ static int cleanup_hash_pbn(void *key, i
>>
>>       if (test_bit(pbn_val, ms_data->bitmap) == 0) {
>>
>>               ret = dc->kvs_hash_pbn->kvs_delete(dc->kvs_hash_pbn,
>>
>>                                                       key, ksize);
>>
>> -             if (ret < 0)
>>
>> -                     BUG();
>>
>> +             BUG_ON(ret < 0);
>>
>>
>>
>>               r = dc->mdops->dec_refcount(ms_data->dc->bmd, pbn_val);
>>
>> -             if (r < 0)
>>
>> -                     BUG();
>>
>> +             BUG_ON(r < 0);
>>
>>
>>
>>               ms_data->cleanup_count++;
>>
>>       }
>>
>
>> From: Fengguang Wu <fengguang.wu@intel.com>
>>
>> Subject: [PATCH] dm-dedup: fix coccinelle warnings
>>
>> TO: Mike Snitzer <snitzer@redhat.com>
>>
>> CC: Vasily Tarasov <tarasov@vasily.name>
>>
>> CC: linux-raid@vger.kernel.org (open list:SOFTWARE RAID
>>
>> CC: linux-kernel@vger.kernel.org
>>
>>
>>
>> drivers/md/dm-dedup-rw.c:168:14-20: ERROR: application of sizeof to pointer
>>
>>
>>
>>  sizeof when applied to a pointer typed expression gives the size of
>>
>>  the pointer
>>
>>
>>
>> Generated by: scripts/coccinelle/misc/noderef.cocci
>>
>>
>>
>> CC: Vasily Tarasov <tarasov@vasily.name>
>>
>> CC: Mike Snitzer <snitzer@redhat.com>
>>
>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>
>> ---
>>
>>
>>
>>  dm-dedup-rw.c |    2 +-
>>
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>
>>
>> --- a/drivers/md/dm-dedup-rw.c
>>
>> +++ b/drivers/md/dm-dedup-rw.c
>>
>> @@ -165,7 +165,7 @@ static struct bio *prepare_bio_with_pbn(
>>
>>       struct page_list *pl;
>>
>>       struct bio *clone = NULL;
>>
>>
>>
>> -     pl = kmalloc(sizeof(pl), GFP_NOIO);
>>
>> +     pl = kmalloc(sizeof(*pl), GFP_NOIO);
>>
>>       if (!pl)
>>
>>               goto out;
>>
>>
>>
>
>> From: Fengguang Wu <fengguang.wu@intel.com>
>>
>> Subject: [PATCH] dm-dedup: fix coccinelle warnings
>>
>> TO: Mike Snitzer <snitzer@redhat.com>
>>
>> CC: Vasily Tarasov <tarasov@vasily.name>
>>
>> CC: linux-raid@vger.kernel.org (open list:SOFTWARE RAID
>>
>> CC: linux-kernel@vger.kernel.org
>>
>>
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h:109:9-12: Unneeded variable: "__Y". Return "__Y" on line 110
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1180:9-12: Unneeded variable: "__Y". Return "__Y" on line 1181
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1173:10-13: Unneeded variable: "__Y". Return "__Y" on line 1174
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1187:10-13: Unneeded variable: "__Y". Return "__Y" on line 1188
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:93:10-13: Unneeded variable: "__Y". Return "__Y" on line 94
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:743:10-13: Unneeded variable: "__Y". Return "__Y" on line 744
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:115:9-12: Unneeded variable: "__Y". Return "__Y" on line 116
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:123:10-13: Unneeded variable: "__Y". Return "__Y" on line 124
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:131:10-13: Unneeded variable: "__Y". Return "__Y" on line 132
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h:109:9-12: Unneeded variable: "__Y". Return "__Y" on line 110
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1180:9-12: Unneeded variable: "__Y". Return "__Y" on line 1181
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1173:10-13: Unneeded variable: "__Y". Return "__Y" on line 1174
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1187:10-13: Unneeded variable: "__Y". Return "__Y" on line 1188
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:93:10-13: Unneeded variable: "__Y". Return "__Y" on line 94
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:743:10-13: Unneeded variable: "__Y". Return "__Y" on line 744
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:115:9-12: Unneeded variable: "__Y". Return "__Y" on line 116
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:123:10-13: Unneeded variable: "__Y". Return "__Y" on line 124
>>
>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:131:10-13: Unneeded variable: "__Y". Return "__Y" on line 132
>>
>> drivers/md/dm-dedup-target.c:750:5-8: Unneeded variable: "ret". Return "0" on line 761
>>
>>
>>
>>
>>
>>  Removes unneeded variable used to store return value.
>>
>>
>>
>> Generated by: scripts/coccinelle/misc/returnvar.cocci
>>
>>
>>
>> CC: Vasily Tarasov <tarasov@vasily.name>
>>
>> CC: Mike Snitzer <snitzer@redhat.com>
>>
>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>
>> ---
>>
>>
>>
>> Please take the patch only if it's a positive warning. Thanks!
>>
>>
>>
>>  /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h |    6 ------
>>
>>  /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h     |    6 ------
>>
>>  /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h     |    4 ----
>>
>>  /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h     |    2 --
>>
>>  drivers/md/dm-dedup-target.c                              |    3 +--
>>
>>  5 files changed, 1 insertion(+), 20 deletions(-)
>>
>>
>>
>> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h
>>
>> @@ -106,7 +106,6 @@ typedef float __v4sf __attribute__ ((__v
>>
>>  extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm_undefined_ps (void)
>>
>>  {
>>
>> -  __m128 __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h
>>
>> @@ -1170,21 +1170,18 @@ _mm256_movemask_ps (__m256 __A)
>>
>>  extern __inline __m256d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm256_undefined_pd (void)
>>
>>  {
>>
>> -  __m256d __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>>  extern __inline __m256 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm256_undefined_ps (void)
>>
>>  {
>>
>> -  __m256 __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>>  extern __inline __m256i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm256_undefined_si256 (void)
>>
>>  {
>>
>> -  __m256i __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h
>>
>> @@ -90,7 +90,6 @@ _mm_setr_pd (double __W, double __X)
>>
>>  extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm_undefined_pd (void)
>>
>>  {
>>
>> -  __m128d __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>> @@ -740,7 +739,6 @@ _mm_move_epi64 (__m128i __A)
>>
>>  extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm_undefined_si128 (void)
>>
>>  {
>>
>> -  __m128i __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h
>>
>> @@ -112,7 +112,6 @@ extern __inline __m512
>>
>>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm512_undefined_ps (void)
>>
>>  {
>>
>> -  __m512 __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>> @@ -120,7 +119,6 @@ extern __inline __m512d
>>
>>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm512_undefined_pd (void)
>>
>>  {
>>
>> -  __m512d __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>> @@ -128,7 +126,6 @@ extern __inline __m512i
>>
>>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm512_undefined_si512 (void)
>>
>>  {
>>
>> -  __m512i __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h
>>
>> @@ -106,7 +106,6 @@ typedef float __v4sf __attribute__ ((__v
>>
>>  extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm_undefined_ps (void)
>>
>>  {
>>
>> -  __m128 __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h
>>
>> @@ -1170,21 +1170,18 @@ _mm256_movemask_ps (__m256 __A)
>>
>>  extern __inline __m256d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm256_undefined_pd (void)
>>
>>  {
>>
>> -  __m256d __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>>  extern __inline __m256 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm256_undefined_ps (void)
>>
>>  {
>>
>> -  __m256 __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>>  extern __inline __m256i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm256_undefined_si256 (void)
>>
>>  {
>>
>> -  __m256i __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h
>>
>> @@ -90,7 +90,6 @@ _mm_setr_pd (double __W, double __X)
>>
>>  extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm_undefined_pd (void)
>>
>>  {
>>
>> -  __m128d __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>> @@ -740,7 +739,6 @@ _mm_move_epi64 (__m128i __A)
>>
>>  extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm_undefined_si128 (void)
>>
>>  {
>>
>> -  __m128i __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h
>>
>> @@ -112,7 +112,6 @@ extern __inline __m512
>>
>>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm512_undefined_ps (void)
>>
>>  {
>>
>> -  __m512 __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>> @@ -120,7 +119,6 @@ extern __inline __m512d
>>
>>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm512_undefined_pd (void)
>>
>>  {
>>
>> -  __m512d __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>> @@ -128,7 +126,6 @@ extern __inline __m512i
>>
>>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
>>
>>  _mm512_undefined_si512 (void)
>>
>>  {
>>
>> -  __m512i __Y = __Y;
>>
>>    return __Y;
>>
>>  }
>>
>>
>>
>> --- a/drivers/md/dm-dedup-target.c
>>
>> +++ b/drivers/md/dm-dedup-target.c
>>
>> @@ -747,7 +747,6 @@ static void dm_dedup_dtr_fn(struct dm_ta
>>
>>  static int mark_lbn_pbn_bitmap(void *key, int32_t ksize,
>>
>>               void *value, int32_t vsize, void *data)
>>
>>  {
>>
>> -     int ret = 0;
>>
>>       struct mark_and_sweep_data *ms_data =
>>
>>               (struct mark_and_sweep_data *)data;
>>
>>       uint64_t pbn_val = *((uint64_t *)value);
>>
>> @@ -758,7 +757,7 @@ static int mark_lbn_pbn_bitmap(void *key
>>
>>
>>
>>       bitmap_set(ms_data->bitmap, pbn_val, 1);
>>
>>
>>
>> -     return ret;
>>
>> +     return 0;
>>
>>  }
>>
>>
>>
>>  static int cleanup_hash_pbn(void *key, int32_t ksize, void *value,
>>
>
>
> ----- End forwarded message -----
>

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

* Re: [PATCH RFCv2 01/10] dm-dedup: main data structures
  2014-09-29 13:34   ` Vasily Tarasov
@ 2014-10-17 17:11     ` Vasily Tarasov
  2014-10-17 17:42       ` Mike Snitzer
  0 siblings, 1 reply; 10+ messages in thread
From: Vasily Tarasov @ 2014-10-17 17:11 UTC (permalink / raw)
  To: Mike Snitzer
  Cc: Joe Thornber, Christoph Hellwig, device-mapper development,
	Philip Shilane, Sonam Mandal, Erez Zadok

Hi Mike,

Sonam Mandal, who also works on dm-dedup project, has addressed your
comments about BUG() and BUG_ON(). She has also updated the code
related to mark and sweep. The changes are staged here (on top of your
dm-dedup repo):

git://git.fsl.cs.stonybrook.edu/scm/git/linux-dmdedup
branch: dm-dedup-devel

I'm not sure if you want us to send the patches to device-mapper
mailing list in addition to that. Let us know if we should do it.

Thanks,
Vasily

On Mon, Sep 29, 2014 at 9:34 AM, Vasily Tarasov <tarasov@vasily.name> wrote:
> Hi Mike,
>
> Thanks for staging the patches and fixing some issues!
>
> It totally makes sense to clone your repo and develop on top of it.
> That should make things easier both for you and us.
>
> Let us work through the error paths and fix BUG() and BUG_ON() things
> first. We'll try to get some patches ready by the end of the week.
>
> Thanks,
> Vasily
>
> On Fri, Sep 26, 2014 at 11:24 AM, Mike Snitzer <snitzer@redhat.com> wrote:
>> Hi Vasily et al,
>>
>> I've rebased my dm-dedup branch to your v2 patchset.  I then fixed
>> various issues with the code -- please see the ~7 commits that follow
>> your v2 patchset baseline:
>> http://git.kernel.org/cgit/linux/kernel/git/snitzer/linux.git/log/?h=dm-dedup
>>
>> I will soon transition to actually trying to use dm-dedup and will then
>> focus primarily on the design (less on code style nits, etc).
>>
>> I'll still likely fixup the ERRORs listed below.  Of note is the "ERROR:
>> application of sizeof to pointer".  I noticed that one during my
>> code-review too but it still needs fixing.
>>
>> And BUG() and BUG_ON() are useful for early code development but they
>> need to be removed before the code can advance to the next stage
>> (e.g. upstream inclusion).
>>
>> So I would _really_ appreciate it if you could remove most (if not all)
>> of the BUG() and BUG_ON() in the code.  Please rework the error paths so
>> that an error is returned and the error is propagated back to the
>> various callers in a graceful (non-destructive way).
>>
>> Also, rather than posting v3 of the patchset, it'd probably be easiest
>> if you just cloned my repo and forked my 'dm-dedup' branch and then
>> submitted incremental patches to dm-devel.
>>
>> Here is a forward of the kernel.org autobuild email we were sent related
>> to dm-dedup's excessive use of BUG() AND BUG_ON(), etc:
>>
>> ----- Forwarded message from Julia Lawall <julia.lawall@lip6.fr> -----
>>
>>> Date: Tue, 23 Sep 2014 13:54:42 +0200 (CEST)
>>> From: Julia Lawall <julia.lawall@lip6.fr>
>>> To: kbuild test robot <fengguang.wu@intel.com>, tarasov@vasily.name
>>> cc: kbuild@01.org, snitzer@redhat.com
>>> Subject: [snitzer:dm-dedup 12/20] drivers/md/dm-dedup-hash.c:81:3-6: WARNING: Use BUG_ON (fwd)
>>>
>>> All of the patches look good except for the one about unneeded variable
>>> (the last one?).
>>>
>>> julia
>>>
>>> ---------- Forwarded message ----------
>>> Date: Tue, 23 Sep 2014 05:27:24 +0800
>>> From: kbuild test robot <fengguang.wu@intel.com>
>>> To: kbuild@01.org
>>> Cc: Julia Lawall <julia.lawall@lip6.fr>
>>> Subject: [snitzer:dm-dedup 12/20] drivers/md/dm-dedup-hash.c:81:3-6: WARNING:
>>>     Use BUG_ON
>>>
>>> TO: Vasily Tarasov <tarasov@vasily.name>
>>> CC: Mike Snitzer <snitzer@redhat.com>
>>>
>>> Hi Vasily,
>>>
>>> First bad commit (maybe != root cause):
>>>
>>> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/snitzer/linux.git dm-dedup
>>> head:   6d716389dd3b8320da41db4341ee390e226083b2
>>> commit: 266d082b5a0b2f7f2008379f7a31b0a7f2b498b6 [12/20] dm-dedup: Kconfig changes
>>> :::::: branch date: 3 hours ago
>>> :::::: commit date: 6 hours ago
>>>
>>> >> drivers/md/dm-dedup-hash.c:81:3-6: WARNING: Use BUG_ON
>>> --
>>> >> drivers/md/dm-dedup-rw.c:219:2-5: WARNING: Use BUG_ON
>>> --
>>> >> drivers/md/dm-dedup-target.c:784:3-6: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:788:3-6: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:652:2-5: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:658:3-6: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:724:3-6: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:729:2-5: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:292:2-5: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:161:3-6: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:165:3-6: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:169:2-5: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:180:2-5: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:190:2-5: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:194:2-5: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:220:3-6: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:228:3-6: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:234:2-5: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:242:3-6: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:250:3-6: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:254:3-6: WARNING: Use BUG_ON
>>> >> drivers/md/dm-dedup-target.c:130:2-5: WARNING: Use BUG_ON
>>> --
>>> >> drivers/md/dm-dedup-cbt.c:343:8-10: ERROR: reference preceded by free on line 342
>>> >> drivers/md/dm-dedup-cbt.c:545:27-30: ERROR: reference preceded by free on line 544
>>> >> drivers/md/dm-dedup-cbt.c:738:27-30: ERROR: reference preceded by free on line 737
>>> --
>>> >> drivers/md/dm-dedup-rw.c:168:14-20: ERROR: application of sizeof to pointer
>>> --
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h:109:9-12: Unneeded variable: "__Y". Return "__Y" on line 110
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1180:9-12: Unneeded variable: "__Y". Return "__Y" on line 1181
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1173:10-13: Unneeded variable: "__Y". Return "__Y" on line 1174
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1187:10-13: Unneeded variable: "__Y". Return "__Y" on line 1188
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:93:10-13: Unneeded variable: "__Y". Return "__Y" on line 94
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:743:10-13: Unneeded variable: "__Y". Return "__Y" on line 744
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:115:9-12: Unneeded variable: "__Y". Return "__Y" on line 116
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:123:10-13: Unneeded variable: "__Y". Return "__Y" on line 124
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:131:10-13: Unneeded variable: "__Y". Return "__Y" on line 132
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h:109:9-12: Unneeded variable: "__Y". Return "__Y" on line 110
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1180:9-12: Unneeded variable: "__Y". Return "__Y" on line 1181
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1173:10-13: Unneeded variable: "__Y". Return "__Y" on line 1174
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1187:10-13: Unneeded variable: "__Y". Return "__Y" on line 1188
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:93:10-13: Unneeded variable: "__Y". Return "__Y" on line 94
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:743:10-13: Unneeded variable: "__Y". Return "__Y" on line 744
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:115:9-12: Unneeded variable: "__Y". Return "__Y" on line 116
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:123:10-13: Unneeded variable: "__Y". Return "__Y" on line 124
>>>    /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:131:10-13: Unneeded variable: "__Y". Return "__Y" on line 132
>>> >> drivers/md/dm-dedup-target.c:750:5-8: Unneeded variable: "ret". Return "0" on line 761
>>>
>>> Please consider folding the attached diff :-)
>>>
>>> ---
>>> 0-DAY kernel build testing backend              Open Source Technology Center
>>> http://lists.01.org/mailman/listinfo/kbuild                 Intel Corporation
>>
>>> From: Fengguang Wu <fengguang.wu@intel.com>
>>>
>>> Subject: [PATCH] dm-dedup: fix coccinelle warnings
>>>
>>> TO: Mike Snitzer <snitzer@redhat.com>
>>>
>>> CC: Vasily Tarasov <tarasov@vasily.name>
>>>
>>> CC: linux-raid@vger.kernel.org (open list:SOFTWARE RAID
>>>
>>> CC: linux-kernel@vger.kernel.org
>>>
>>>
>>>
>>> drivers/md/dm-dedup-hash.c:81:3-6: WARNING: Use BUG_ON
>>>
>>>
>>>
>>>  Use BUG_ON instead of a if condition followed by BUG.
>>>
>>>
>>>
>>> Semantic patch information:
>>>
>>>  This makes an effort to find cases where BUG() follows an if
>>>
>>>  condition on an expression and replaces the if condition and BUG()
>>>
>>>  with a BUG_ON having the conditional expression of the if statement
>>>
>>>  as argument.
>>>
>>>
>>>
>>> Generated by: scripts/coccinelle/misc/bugon.cocci
>>>
>>>
>>>
>>> CC: Vasily Tarasov <tarasov@vasily.name>
>>>
>>> CC: Mike Snitzer <snitzer@redhat.com>
>>>
>>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>>
>>> ---
>>>
>>>
>>>
>>> Please take the patch only if it's a positive warning. Thanks!
>>>
>>>
>>>
>>>  dm-dedup-hash.c |    3 +--
>>>
>>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>>
>>>
>>> --- a/drivers/md/dm-dedup-hash.c
>>>
>>> +++ b/drivers/md/dm-dedup-hash.c
>>>
>>> @@ -77,8 +77,7 @@ static int get_next_slot(struct hash_des
>>>
>>>       int count = 0;
>>>
>>>
>>>
>>>       do {
>>>
>>> -             if (count == DEDUP_HASH_DESC_COUNT)
>>>
>>> -                     BUG();
>>>
>>> +             BUG_ON(count == DEDUP_HASH_DESC_COUNT);
>>>
>>>
>>>
>>>               count++;
>>>
>>>               num = atomic_long_inc_return(&(desc_table->slot_counter));
>>>
>>
>>> From: Fengguang Wu <fengguang.wu@intel.com>
>>>
>>> Subject: [PATCH] dm-dedup: fix coccinelle warnings
>>>
>>> TO: Mike Snitzer <snitzer@redhat.com>
>>>
>>> CC: Vasily Tarasov <tarasov@vasily.name>
>>>
>>> CC: linux-raid@vger.kernel.org (open list:SOFTWARE RAID
>>>
>>> CC: linux-kernel@vger.kernel.org
>>>
>>>
>>>
>>> drivers/md/dm-dedup-rw.c:219:2-5: WARNING: Use BUG_ON
>>>
>>>
>>>
>>>  Use BUG_ON instead of a if condition followed by BUG.
>>>
>>>
>>>
>>> Semantic patch information:
>>>
>>>  This makes an effort to find cases where BUG() follows an if
>>>
>>>  condition on an expression and replaces the if condition and BUG()
>>>
>>>  with a BUG_ON having the conditional expression of the if statement
>>>
>>>  as argument.
>>>
>>>
>>>
>>> Generated by: scripts/coccinelle/misc/bugon.cocci
>>>
>>>
>>>
>>> CC: Vasily Tarasov <tarasov@vasily.name>
>>>
>>> CC: Mike Snitzer <snitzer@redhat.com>
>>>
>>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>>
>>> ---
>>>
>>>
>>>
>>> Please take the patch only if it's a positive warning. Thanks!
>>>
>>>
>>>
>>>  dm-dedup-rw.c |    3 +--
>>>
>>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>>
>>>
>>> --- a/drivers/md/dm-dedup-rw.c
>>>
>>> +++ b/drivers/md/dm-dedup-rw.c
>>>
>>> @@ -215,8 +215,7 @@ static struct bio *prepare_bio_without_p
>>>
>>>       my_zero_fill_bio(clone);
>>>
>>>
>>>
>>>       r = merge_data(dc, clone->bi_io_vec->bv_page, bio);
>>>
>>> -     if (r < 0)
>>>
>>> -             BUG();
>>>
>>> +     BUG_ON(r < 0);
>>>
>>>  out:
>>>
>>>       return clone;
>>>
>>>  }
>>>
>>
>>> From: Fengguang Wu <fengguang.wu@intel.com>
>>>
>>> Subject: [PATCH] dm-dedup: fix coccinelle warnings
>>>
>>> TO: Mike Snitzer <snitzer@redhat.com>
>>>
>>> CC: Vasily Tarasov <tarasov@vasily.name>
>>>
>>> CC: linux-raid@vger.kernel.org (open list:SOFTWARE RAID
>>>
>>> CC: linux-kernel@vger.kernel.org
>>>
>>>
>>>
>>> drivers/md/dm-dedup-target.c:784:3-6: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:788:3-6: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:652:2-5: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:658:3-6: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:724:3-6: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:729:2-5: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:292:2-5: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:161:3-6: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:165:3-6: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:169:2-5: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:180:2-5: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:190:2-5: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:194:2-5: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:220:3-6: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:228:3-6: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:234:2-5: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:242:3-6: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:250:3-6: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:254:3-6: WARNING: Use BUG_ON
>>>
>>> drivers/md/dm-dedup-target.c:130:2-5: WARNING: Use BUG_ON
>>>
>>>
>>>
>>>  Use BUG_ON instead of a if condition followed by BUG.
>>>
>>>
>>>
>>> Semantic patch information:
>>>
>>>  This makes an effort to find cases where BUG() follows an if
>>>
>>>  condition on an expression and replaces the if condition and BUG()
>>>
>>>  with a BUG_ON having the conditional expression of the if statement
>>>
>>>  as argument.
>>>
>>>
>>>
>>> Generated by: scripts/coccinelle/misc/bugon.cocci
>>>
>>>
>>>
>>> CC: Vasily Tarasov <tarasov@vasily.name>
>>>
>>> CC: Mike Snitzer <snitzer@redhat.com>
>>>
>>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>>
>>> ---
>>>
>>>
>>>
>>> Please take the patch only if it's a positive warning. Thanks!
>>>
>>>
>>>
>>>  dm-dedup-target.c |   60 ++++++++++++++++++------------------------------------
>>>
>>>  1 file changed, 20 insertions(+), 40 deletions(-)
>>>
>>>
>>>
>>> --- a/drivers/md/dm-dedup-target.c
>>>
>>> +++ b/drivers/md/dm-dedup-target.c
>>>
>>> @@ -126,8 +126,7 @@ static int write_to_new_block(struct ded
>>>
>>>
>>>
>>>       r = dc->kvs_lbn_pbn->kvs_insert(dc->kvs_lbn_pbn, (void *)&lbn,
>>>
>>>               sizeof(lbn), (void *)&lbnpbn_value, sizeof(lbnpbn_value));
>>>
>>> -     if (r < 0)
>>>
>>> -             BUG();
>>>
>>> +     BUG_ON(r < 0);
>>>
>>>
>>>
>>>       return r;
>>>
>>>  }
>>>
>>> @@ -157,16 +156,13 @@ static int handle_write_no_hash(struct d
>>>
>>>               r = dc->kvs_hash_pbn->kvs_insert(dc->kvs_hash_pbn, (void *)hash,
>>>
>>>                               dc->crypto_key_size, (void *)&hashpbn_value,
>>>
>>>                               sizeof(hashpbn_value));
>>>
>>> -             if (r < 0)
>>>
>>> -                     BUG();
>>>
>>> +             BUG_ON(r < 0);
>>>
>>>
>>>
>>>               r = dc->mdops->inc_refcount(dc->bmd, pbn_new);
>>>
>>> -             if (r < 0)
>>>
>>> -                     BUG();
>>>
>>> +             BUG_ON(r < 0);
>>>
>>>
>>>
>>>               goto out;
>>>
>>> -     } else if (r < 0)
>>>
>>> -             BUG();
>>>
>>> +     } else BUG_ON(r < 0);
>>>
>>>
>>>
>>>       /* LBN->PBN mappings exist */
>>>
>>>       dc->overwrites++;
>>>
>>> @@ -176,8 +172,7 @@ static int handle_write_no_hash(struct d
>>>
>>>
>>>
>>>       pbn_old = lbnpbn_value.pbn;
>>>
>>>       r = dc->mdops->dec_refcount(dc->bmd, pbn_old);
>>>
>>> -     if (r < 0)
>>>
>>> -             BUG();
>>>
>>> +     BUG_ON(r < 0);
>>>
>>>
>>>
>>>       dc->logical_block_counter--;
>>>
>>>
>>>
>>> @@ -186,12 +181,10 @@ static int handle_write_no_hash(struct d
>>>
>>>       r = dc->kvs_hash_pbn->kvs_insert(dc->kvs_hash_pbn, (void *)hash,
>>>
>>>                               dc->crypto_key_size, (void *)&hashpbn_value,
>>>
>>>                               sizeof(hashpbn_value));
>>>
>>> -     if (r < 0)
>>>
>>> -             BUG();
>>>
>>> +     BUG_ON(r < 0);
>>>
>>>
>>>
>>>       r = dc->mdops->inc_refcount(dc->bmd, pbn_new);
>>>
>>> -     if (r < 0)
>>>
>>> -             BUG();
>>>
>>> +     BUG_ON(r < 0);
>>>
>>>  out:
>>>
>>>       return r;
>>>
>>>  }
>>>
>>> @@ -216,42 +209,36 @@ static int handle_write_with_hash(struct
>>>
>>>               dc->newwrites++;
>>>
>>>
>>>
>>>               r = dc->mdops->inc_refcount(dc->bmd, pbn_new);
>>>
>>> -             if (r < 0)
>>>
>>> -                     BUG();
>>>
>>> +             BUG_ON(r < 0);
>>>
>>>
>>>
>>>               lbnpbn_value.pbn = pbn_new;
>>>
>>>
>>>
>>>               r = dc->kvs_lbn_pbn->kvs_insert(dc->kvs_lbn_pbn, (void *)&lbn,
>>>
>>>                               sizeof(lbn), (void *)&lbnpbn_value,
>>>
>>>                               sizeof(lbnpbn_value));
>>>
>>> -             if (r < 0)
>>>
>>> -                     BUG();
>>>
>>> +             BUG_ON(r < 0);
>>>
>>>
>>>
>>>               dc->logical_block_counter++;
>>>
>>>
>>>
>>>               goto out;
>>>
>>> -     } else if (r < 0)
>>>
>>> -             BUG();
>>>
>>> +     } else BUG_ON(r < 0);
>>>
>>>
>>>
>>>       /* LBN->PBN mapping entry exists */
>>>
>>>       dc->overwrites++;
>>>
>>>       pbn_old = lbnpbn_value.pbn;
>>>
>>>       if (pbn_new != pbn_old) {
>>>
>>>               r = dc->mdops->inc_refcount(dc->bmd, pbn_new);
>>>
>>> -             if (r < 0)
>>>
>>> -                     BUG();
>>>
>>> +             BUG_ON(r < 0);
>>>
>>>
>>>
>>>               new_lbnpbn_value.pbn = pbn_new;
>>>
>>>
>>>
>>>               r = dc->kvs_lbn_pbn->kvs_insert(dc->kvs_lbn_pbn, (void *)&lbn,
>>>
>>>                       sizeof(lbn), (void *)&new_lbnpbn_value,
>>>
>>>                       sizeof(new_lbnpbn_value));
>>>
>>> -             if (r < 0)
>>>
>>> -                     BUG();
>>>
>>> +             BUG_ON(r < 0);
>>>
>>>
>>>
>>>               r = dc->mdops->dec_refcount(dc->bmd, pbn_old);
>>>
>>> -             if (r < 0)
>>>
>>> -                     BUG();
>>>
>>> +             BUG_ON(r < 0);
>>>
>>>
>>>
>>>               goto out;
>>>
>>>       }
>>>
>>> @@ -288,8 +275,7 @@ static void handle_write(struct dedup_co
>>>
>>>       lbn = bio_lbn(dc, bio);
>>>
>>>
>>>
>>>       r = compute_hash_bio(dc->desc_table, bio, hash);
>>>
>>> -     if (r)
>>>
>>> -             BUG();
>>>
>>> +     BUG_ON(r);
>>>
>>>
>>>
>>>       r = dc->kvs_hash_pbn->kvs_lookup(dc->kvs_hash_pbn, hash,
>>>
>>>                               dc->crypto_key_size, &hashpbn_value, &vsize);
>>>
>>> @@ -648,14 +634,12 @@ static int dm_dedup_ctr_fn(struct dm_tar
>>>
>>>       }
>>>
>>>
>>>
>>>       r = dc->mdops->flush_meta(md);
>>>
>>> -     if (r < 0)
>>>
>>> -             BUG();
>>>
>>> +     BUG_ON(r < 0);
>>>
>>>
>>>
>>>       if (!unformatted && dc->mdops->get_private_data) {
>>>
>>>               r = dc->mdops->get_private_data(md, (void **)&data,
>>>
>>>                               sizeof(struct on_disk_stats));
>>>
>>> -             if (r < 0)
>>>
>>> -                     BUG();
>>>
>>> +             BUG_ON(r < 0);
>>>
>>>
>>>
>>>               logical_block_counter = data->logical_block_counter;
>>>
>>>               physical_block_counter = data->physical_block_counter;
>>>
>>> @@ -720,13 +704,11 @@ static void dm_dedup_dtr_fn(struct dm_ta
>>>
>>>
>>>
>>>               ret = dc->mdops->set_private_data(dc->bmd, &data,
>>>
>>>                               sizeof(struct on_disk_stats));
>>>
>>> -             if (ret < 0)
>>>
>>> -                     BUG();
>>>
>>> +             BUG_ON(ret < 0);
>>>
>>>       }
>>>
>>>
>>>
>>>       ret = dc->mdops->flush_meta(dc->bmd);
>>>
>>> -     if (ret < 0)
>>>
>>> -             BUG();
>>>
>>> +     BUG_ON(ret < 0);
>>>
>>>
>>>
>>>       flush_workqueue(dc->workqueue);
>>>
>>>       destroy_workqueue(dc->workqueue);
>>>
>>> @@ -780,12 +762,10 @@ static int cleanup_hash_pbn(void *key, i
>>>
>>>       if (test_bit(pbn_val, ms_data->bitmap) == 0) {
>>>
>>>               ret = dc->kvs_hash_pbn->kvs_delete(dc->kvs_hash_pbn,
>>>
>>>                                                       key, ksize);
>>>
>>> -             if (ret < 0)
>>>
>>> -                     BUG();
>>>
>>> +             BUG_ON(ret < 0);
>>>
>>>
>>>
>>>               r = dc->mdops->dec_refcount(ms_data->dc->bmd, pbn_val);
>>>
>>> -             if (r < 0)
>>>
>>> -                     BUG();
>>>
>>> +             BUG_ON(r < 0);
>>>
>>>
>>>
>>>               ms_data->cleanup_count++;
>>>
>>>       }
>>>
>>
>>> From: Fengguang Wu <fengguang.wu@intel.com>
>>>
>>> Subject: [PATCH] dm-dedup: fix coccinelle warnings
>>>
>>> TO: Mike Snitzer <snitzer@redhat.com>
>>>
>>> CC: Vasily Tarasov <tarasov@vasily.name>
>>>
>>> CC: linux-raid@vger.kernel.org (open list:SOFTWARE RAID
>>>
>>> CC: linux-kernel@vger.kernel.org
>>>
>>>
>>>
>>> drivers/md/dm-dedup-rw.c:168:14-20: ERROR: application of sizeof to pointer
>>>
>>>
>>>
>>>  sizeof when applied to a pointer typed expression gives the size of
>>>
>>>  the pointer
>>>
>>>
>>>
>>> Generated by: scripts/coccinelle/misc/noderef.cocci
>>>
>>>
>>>
>>> CC: Vasily Tarasov <tarasov@vasily.name>
>>>
>>> CC: Mike Snitzer <snitzer@redhat.com>
>>>
>>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>>
>>> ---
>>>
>>>
>>>
>>>  dm-dedup-rw.c |    2 +-
>>>
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>>
>>>
>>> --- a/drivers/md/dm-dedup-rw.c
>>>
>>> +++ b/drivers/md/dm-dedup-rw.c
>>>
>>> @@ -165,7 +165,7 @@ static struct bio *prepare_bio_with_pbn(
>>>
>>>       struct page_list *pl;
>>>
>>>       struct bio *clone = NULL;
>>>
>>>
>>>
>>> -     pl = kmalloc(sizeof(pl), GFP_NOIO);
>>>
>>> +     pl = kmalloc(sizeof(*pl), GFP_NOIO);
>>>
>>>       if (!pl)
>>>
>>>               goto out;
>>>
>>>
>>>
>>
>>> From: Fengguang Wu <fengguang.wu@intel.com>
>>>
>>> Subject: [PATCH] dm-dedup: fix coccinelle warnings
>>>
>>> TO: Mike Snitzer <snitzer@redhat.com>
>>>
>>> CC: Vasily Tarasov <tarasov@vasily.name>
>>>
>>> CC: linux-raid@vger.kernel.org (open list:SOFTWARE RAID
>>>
>>> CC: linux-kernel@vger.kernel.org
>>>
>>>
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h:109:9-12: Unneeded variable: "__Y". Return "__Y" on line 110
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1180:9-12: Unneeded variable: "__Y". Return "__Y" on line 1181
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1173:10-13: Unneeded variable: "__Y". Return "__Y" on line 1174
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1187:10-13: Unneeded variable: "__Y". Return "__Y" on line 1188
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:93:10-13: Unneeded variable: "__Y". Return "__Y" on line 94
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:743:10-13: Unneeded variable: "__Y". Return "__Y" on line 744
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:115:9-12: Unneeded variable: "__Y". Return "__Y" on line 116
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:123:10-13: Unneeded variable: "__Y". Return "__Y" on line 124
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:131:10-13: Unneeded variable: "__Y". Return "__Y" on line 132
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h:109:9-12: Unneeded variable: "__Y". Return "__Y" on line 110
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1180:9-12: Unneeded variable: "__Y". Return "__Y" on line 1181
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1173:10-13: Unneeded variable: "__Y". Return "__Y" on line 1174
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h:1187:10-13: Unneeded variable: "__Y". Return "__Y" on line 1188
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:93:10-13: Unneeded variable: "__Y". Return "__Y" on line 94
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:743:10-13: Unneeded variable: "__Y". Return "__Y" on line 744
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:115:9-12: Unneeded variable: "__Y". Return "__Y" on line 116
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:123:10-13: Unneeded variable: "__Y". Return "__Y" on line 124
>>>
>>> /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h:131:10-13: Unneeded variable: "__Y". Return "__Y" on line 132
>>>
>>> drivers/md/dm-dedup-target.c:750:5-8: Unneeded variable: "ret". Return "0" on line 761
>>>
>>>
>>>
>>>
>>>
>>>  Removes unneeded variable used to store return value.
>>>
>>>
>>>
>>> Generated by: scripts/coccinelle/misc/returnvar.cocci
>>>
>>>
>>>
>>> CC: Vasily Tarasov <tarasov@vasily.name>
>>>
>>> CC: Mike Snitzer <snitzer@redhat.com>
>>>
>>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>>
>>> ---
>>>
>>>
>>>
>>> Please take the patch only if it's a positive warning. Thanks!
>>>
>>>
>>>
>>>  /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h |    6 ------
>>>
>>>  /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h     |    6 ------
>>>
>>>  /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h     |    4 ----
>>>
>>>  /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h     |    2 --
>>>
>>>  drivers/md/dm-dedup-target.c                              |    3 +--
>>>
>>>  5 files changed, 1 insertion(+), 20 deletions(-)
>>>
>>>
>>>
>>> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h
>>>
>>> @@ -106,7 +106,6 @@ typedef float __v4sf __attribute__ ((__v
>>>
>>>  extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm_undefined_ps (void)
>>>
>>>  {
>>>
>>> -  __m128 __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h
>>>
>>> @@ -1170,21 +1170,18 @@ _mm256_movemask_ps (__m256 __A)
>>>
>>>  extern __inline __m256d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm256_undefined_pd (void)
>>>
>>>  {
>>>
>>> -  __m256d __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>>  extern __inline __m256 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm256_undefined_ps (void)
>>>
>>>  {
>>>
>>> -  __m256 __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>>  extern __inline __m256i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm256_undefined_si256 (void)
>>>
>>>  {
>>>
>>> -  __m256i __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h
>>>
>>> @@ -90,7 +90,6 @@ _mm_setr_pd (double __W, double __X)
>>>
>>>  extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm_undefined_pd (void)
>>>
>>>  {
>>>
>>> -  __m128d __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>> @@ -740,7 +739,6 @@ _mm_move_epi64 (__m128i __A)
>>>
>>>  extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm_undefined_si128 (void)
>>>
>>>  {
>>>
>>> -  __m128i __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h
>>>
>>> @@ -112,7 +112,6 @@ extern __inline __m512
>>>
>>>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm512_undefined_ps (void)
>>>
>>>  {
>>>
>>> -  __m512 __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>> @@ -120,7 +119,6 @@ extern __inline __m512d
>>>
>>>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm512_undefined_pd (void)
>>>
>>>  {
>>>
>>> -  __m512d __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>> @@ -128,7 +126,6 @@ extern __inline __m512i
>>>
>>>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm512_undefined_si512 (void)
>>>
>>>  {
>>>
>>> -  __m512i __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h
>>>
>>> @@ -106,7 +106,6 @@ typedef float __v4sf __attribute__ ((__v
>>>
>>>  extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm_undefined_ps (void)
>>>
>>>  {
>>>
>>> -  __m128 __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avxintrin.h
>>>
>>> @@ -1170,21 +1170,18 @@ _mm256_movemask_ps (__m256 __A)
>>>
>>>  extern __inline __m256d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm256_undefined_pd (void)
>>>
>>>  {
>>>
>>> -  __m256d __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>>  extern __inline __m256 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm256_undefined_ps (void)
>>>
>>>  {
>>>
>>> -  __m256 __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>>  extern __inline __m256i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm256_undefined_si256 (void)
>>>
>>>  {
>>>
>>> -  __m256i __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h
>>>
>>> @@ -90,7 +90,6 @@ _mm_setr_pd (double __W, double __X)
>>>
>>>  extern __inline __m128d __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm_undefined_pd (void)
>>>
>>>  {
>>>
>>> -  __m128d __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>> @@ -740,7 +739,6 @@ _mm_move_epi64 (__m128i __A)
>>>
>>>  extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm_undefined_si128 (void)
>>>
>>>  {
>>>
>>> -  __m128i __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>> --- /usr/lib/gcc/x86_64-linux-gnu/4.9/include/avx512fintrin.h
>>>
>>> @@ -112,7 +112,6 @@ extern __inline __m512
>>>
>>>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm512_undefined_ps (void)
>>>
>>>  {
>>>
>>> -  __m512 __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>> @@ -120,7 +119,6 @@ extern __inline __m512d
>>>
>>>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm512_undefined_pd (void)
>>>
>>>  {
>>>
>>> -  __m512d __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>> @@ -128,7 +126,6 @@ extern __inline __m512i
>>>
>>>  __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
>>>
>>>  _mm512_undefined_si512 (void)
>>>
>>>  {
>>>
>>> -  __m512i __Y = __Y;
>>>
>>>    return __Y;
>>>
>>>  }
>>>
>>>
>>>
>>> --- a/drivers/md/dm-dedup-target.c
>>>
>>> +++ b/drivers/md/dm-dedup-target.c
>>>
>>> @@ -747,7 +747,6 @@ static void dm_dedup_dtr_fn(struct dm_ta
>>>
>>>  static int mark_lbn_pbn_bitmap(void *key, int32_t ksize,
>>>
>>>               void *value, int32_t vsize, void *data)
>>>
>>>  {
>>>
>>> -     int ret = 0;
>>>
>>>       struct mark_and_sweep_data *ms_data =
>>>
>>>               (struct mark_and_sweep_data *)data;
>>>
>>>       uint64_t pbn_val = *((uint64_t *)value);
>>>
>>> @@ -758,7 +757,7 @@ static int mark_lbn_pbn_bitmap(void *key
>>>
>>>
>>>
>>>       bitmap_set(ms_data->bitmap, pbn_val, 1);
>>>
>>>
>>>
>>> -     return ret;
>>>
>>> +     return 0;
>>>
>>>  }
>>>
>>>
>>>
>>>  static int cleanup_hash_pbn(void *key, int32_t ksize, void *value,
>>>
>>
>>
>> ----- End forwarded message -----
>>

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

* Re: [PATCH RFCv2 01/10] dm-dedup: main data structures
  2014-10-17 17:11     ` Vasily Tarasov
@ 2014-10-17 17:42       ` Mike Snitzer
  2014-11-26 15:38         ` Mike Snitzer
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Snitzer @ 2014-10-17 17:42 UTC (permalink / raw)
  To: Vasily Tarasov
  Cc: Joe Thornber, Christoph Hellwig, device-mapper development,
	Philip Shilane, Sonam Mandal, Erez Zadok

On Fri, Oct 17 2014 at  1:11pm -0400,
Vasily Tarasov <tarasov@vasily.name> wrote:

> Hi Mike,
> 
> Sonam Mandal, who also works on dm-dedup project, has addressed your
> comments about BUG() and BUG_ON(). She has also updated the code
> related to mark and sweep. The changes are staged here (on top of your
> dm-dedup repo):
> 
> git://git.fsl.cs.stonybrook.edu/scm/git/linux-dmdedup
> branch: dm-dedup-devel
> 
> I'm not sure if you want us to send the patches to device-mapper
> mailing list in addition to that. Let us know if we should do it.

I'll take a look next week, I need to finish up some dm-thinp work this
week.  Your repo is perfect for now.

Thanks for doing this work.
Mike

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

* Re: [PATCH RFCv2 01/10] dm-dedup: main data structures
  2014-10-17 17:42       ` Mike Snitzer
@ 2014-11-26 15:38         ` Mike Snitzer
  2014-11-26 16:36           ` Erez Zadok
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Snitzer @ 2014-11-26 15:38 UTC (permalink / raw)
  To: Vasily Tarasov
  Cc: Joe Thornber, Christoph Hellwig, device-mapper development,
	Philip Shilane, Sonam Mandal, Erez Zadok, Vivek Goyal

On Fri, Oct 17 2014 at  1:42pm -0400,
Mike Snitzer <snitzer@redhat.com> wrote:

> On Fri, Oct 17 2014 at  1:11pm -0400,
> Vasily Tarasov <tarasov@vasily.name> wrote:
> 
> > Hi Mike,
> > 
> > Sonam Mandal, who also works on dm-dedup project, has addressed your
> > comments about BUG() and BUG_ON(). She has also updated the code
> > related to mark and sweep. The changes are staged here (on top of your
> > dm-dedup repo):
> > 
> > git://git.fsl.cs.stonybrook.edu/scm/git/linux-dmdedup
> > branch: dm-dedup-devel
> > 
> > I'm not sure if you want us to send the patches to device-mapper
> > mailing list in addition to that. Let us know if we should do it.
> 
> I'll take a look next week, I need to finish up some dm-thinp work this
> week.  Your repo is perfect for now.
> 
> Thanks for doing this work.
> Mike

Hi Vasily,

I've been slammed with working on DM thinp and DM cache.  High priority
issues got elevated and we're only now putting those issues to rest.

So that said, I'll have time to focus on dm-dedup review starting next
week.  BUT this time it is different in that I'll be working closely
with Vivek Goyal (cc'd).  Vivek just joined Red hat's kernel storage
team and will be able to help with this review.  I'm asking Vivek to
focus on the meat of the dedup strategy you've deployed (algorithms,
etc).

I'll be maintain focus on the DM target mechanics (which should be in
good shape coming off the first cycle of review).

Apologies for DM dedup's review/inclusion slipping to the degree it
has.  I could've been much better about communicating my status.

Hopefully we can have DM dedup buttoned up and staged for upstream
inclusion in time for Christmas ;)

Mike

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

* Re: [PATCH RFCv2 01/10] dm-dedup: main data structures
  2014-11-26 15:38         ` Mike Snitzer
@ 2014-11-26 16:36           ` Erez Zadok
  2014-11-26 16:47             ` Mike Snitzer
  0 siblings, 1 reply; 10+ messages in thread
From: Erez Zadok @ 2014-11-26 16:36 UTC (permalink / raw)
  To: Mike Snitzer
  Cc: Vasily Tarasov, Joe Thornber, Christoph Hellwig,
	device-mapper development, Shilane Philip, Sonam Mandal,
	Vivek Goyal

Mike, Vivek,

Thank you for the effort and especially for adding more man-power to this review.  We know how busy you guys are so it’s understandable that things can take a while to get started.  Either way, I’ve instructed my students to give this project the highest priority, especially once we receive comments from you.

Sincerely,
Erez.


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

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

* Re: [PATCH RFCv2 01/10] dm-dedup: main data structures
  2014-11-26 16:36           ` Erez Zadok
@ 2014-11-26 16:47             ` Mike Snitzer
  2014-11-26 18:35               ` Vasily Tarasov
  0 siblings, 1 reply; 10+ messages in thread
From: Mike Snitzer @ 2014-11-26 16:47 UTC (permalink / raw)
  To: Erez Zadok
  Cc: Vasily Tarasov, Joe Thornber, Christoph Hellwig,
	device-mapper development, Shilane Philip, Sonam Mandal,
	Vivek Goyal

On Wed, Nov 26 2014 at 11:36am -0500,
Erez Zadok <ezk@fsl.cs.sunysb.edu> wrote:

> Mike, Vivek,
> 
> Thank you for the effort and especially for adding more man-power to
> this review.  We know how busy you guys are so it’s understandable
> that things can take a while to get started.  Either way, I’ve
> instructed my students to give this project the highest priority,
> especially once we receive comments from you.

Great.  So along those lines have you guys worked on userspace tools
that can verify/repair the ondisk metadata?

That will be a prereq for upstream inclusion (at least for dm-dedup to
become anything but "experimental").

dm-cache and dm-thin targets have these types of tools
(thin_{check,repair}, cache_{check,repair}, etc).  Upstream repo is here
(misnamed, gets packaged into device-mapper-persistent-data rpm on
Fedora, RHEL, CentOS, etc):
https://github.com/jthornber/thin-provisioning-tools

Mike

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

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

* Re: [PATCH RFCv2 01/10] dm-dedup: main data structures
  2014-11-26 16:47             ` Mike Snitzer
@ 2014-11-26 18:35               ` Vasily Tarasov
  2014-12-04  1:21                 ` Darrick J. Wong
  0 siblings, 1 reply; 10+ messages in thread
From: Vasily Tarasov @ 2014-11-26 18:35 UTC (permalink / raw)
  To: Mike Snitzer
  Cc: Joe Thornber, Christoph Hellwig, device-mapper development,
	Shilane Philip, Sonam Mandal, Erez Zadok, Vivek Goyal

Hi Mike, Vivek,

Sounds good, thanks for looking into this!

At this point we don't have a dedup_checker. Could you clarify a bit
on the main use case for a cheker? Sudden power loss or accidental
corruption of metadata/ data devices?

In dm-dedup, metadata is stored using dm's persistent-data library
(COW B-trees). Data blocks are written asynchronously with meta-data
but allocated sequentially. So, theoretically, on a sudden power loss
the state of a dm-dedup should remain consistent.

But if somebody corrupts metadata/data devices manually the checker
will help. Is it the main use case?

We'll definitely take a look into the verifier's code for thin and
cache targets and see how this applies to dm-dedup.

Thanks,
Vasily

On Wed, Nov 26, 2014 at 11:47 AM, Mike Snitzer <snitzer@redhat.com> wrote:
> On Wed, Nov 26 2014 at 11:36am -0500,
> Erez Zadok <ezk@fsl.cs.sunysb.edu> wrote:
>
>> Mike, Vivek,
>>
>> Thank you for the effort and especially for adding more man-power to
>> this review.  We know how busy you guys are so it’s understandable
>> that things can take a while to get started.  Either way, I’ve
>> instructed my students to give this project the highest priority,
>> especially once we receive comments from you.
>
> Great.  So along those lines have you guys worked on userspace tools
> that can verify/repair the ondisk metadata?
>
> That will be a prereq for upstream inclusion (at least for dm-dedup to
> become anything but "experimental").
>
> dm-cache and dm-thin targets have these types of tools
> (thin_{check,repair}, cache_{check,repair}, etc).  Upstream repo is here
> (misnamed, gets packaged into device-mapper-persistent-data rpm on
> Fedora, RHEL, CentOS, etc):
> https://github.com/jthornber/thin-provisioning-tools
>
> Mike
>

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

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

* Re: [PATCH RFCv2 01/10] dm-dedup: main data structures
  2014-11-26 18:35               ` Vasily Tarasov
@ 2014-12-04  1:21                 ` Darrick J. Wong
  0 siblings, 0 replies; 10+ messages in thread
From: Darrick J. Wong @ 2014-12-04  1:21 UTC (permalink / raw)
  To: Vasily Tarasov, device-mapper development
  Cc: Joe Thornber, Mike Snitzer, Christoph Hellwig, Shilane Philip,
	Sonam Mandal, Erez Zadok, Vivek Goyal

On Wed, Nov 26, 2014 at 01:35:34PM -0500, Vasily Tarasov wrote:
> Hi Mike, Vivek,
> 
> Sounds good, thanks for looking into this!
> 
> At this point we don't have a dedup_checker. Could you clarify a bit
> on the main use case for a cheker? Sudden power loss or accidental
> corruption of metadata/ data devices?

<shrug> No replies for a week, so I'll wade in.  Keep in mind I'm a FS
developer, so don't take my replies as necessarily matching Mike or
Vivek's goals.

> In dm-dedup, metadata is stored using dm's persistent-data library
> (COW B-trees). Data blocks are written asynchronously with meta-data
> but allocated sequentially. So, theoretically, on a sudden power loss
> the state of a dm-dedup should remain consistent.

Theoretically, yes. :)

> But if somebody corrupts metadata/data devices manually the checker
> will help. Is it the main use case?

Or if the storage corrupts itself and you want/need to run a
consistency checker to scrape the broken crud off the disk so that you
can recover whatever's left.  There are also cases such as recovering
from accidental reformats (if possible); patching things up after the
kernel explodes midway through some operation; fixing up the mess
after your own software bugs out; and recovering when the storage
miswrites blocks to the wrong place.

It would also be useful to verify that a block still matches its
stored hash; that for all LBN->PBN mappings there's also a hash->PBN
mapping; and (optionally) to garbage collect any hash->PBN mappings.
Theoretically you could also defrag the device.  Maybe this can even
be done in a background kernel thread (ha!), since the metadata's
already sitting around in memory.

> We'll definitely take a look into the verifier's code for thin and
> cache targets and see how this applies to dm-dedup.

Looks promising so far, aside from the things I noted in yesterday's
email.  Thanks for contributing all this work!

--D

> 
> Thanks,
> Vasily
> 
> On Wed, Nov 26, 2014 at 11:47 AM, Mike Snitzer <snitzer@redhat.com> wrote:
> > On Wed, Nov 26 2014 at 11:36am -0500,
> > Erez Zadok <ezk@fsl.cs.sunysb.edu> wrote:
> >
> >> Mike, Vivek,
> >>
> >> Thank you for the effort and especially for adding more man-power to
> >> this review.  We know how busy you guys are so it’s understandable
> >> that things can take a while to get started.  Either way, I’ve
> >> instructed my students to give this project the highest priority,
> >> especially once we receive comments from you.
> >
> > Great.  So along those lines have you guys worked on userspace tools
> > that can verify/repair the ondisk metadata?
> >
> > That will be a prereq for upstream inclusion (at least for dm-dedup to
> > become anything but "experimental").
> >
> > dm-cache and dm-thin targets have these types of tools
> > (thin_{check,repair}, cache_{check,repair}, etc).  Upstream repo is here
> > (misnamed, gets packaged into device-mapper-persistent-data rpm on
> > Fedora, RHEL, CentOS, etc):
> > https://github.com/jthornber/thin-provisioning-tools
> >
> > Mike
> >
> 
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

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

end of thread, other threads:[~2014-12-04  1:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-28 21:56 [PATCH RFCv2 01/10] dm-dedup: main data structures Vasily Tarasov
2014-09-26 15:24 ` Mike Snitzer
2014-09-29 13:34   ` Vasily Tarasov
2014-10-17 17:11     ` Vasily Tarasov
2014-10-17 17:42       ` Mike Snitzer
2014-11-26 15:38         ` Mike Snitzer
2014-11-26 16:36           ` Erez Zadok
2014-11-26 16:47             ` Mike Snitzer
2014-11-26 18:35               ` Vasily Tarasov
2014-12-04  1:21                 ` Darrick J. Wong

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.