Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3944426imm; Mon, 18 Jun 2018 06:46:06 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ1bb4KHAq8Iin0MBnLY4dQyO3r0u/DwrgW6bhk8rc4z09g2KwbW7vQJO56GIuGyrz26x52 X-Received: by 2002:a63:7419:: with SMTP id p25-v6mr11343841pgc.24.1529329566508; Mon, 18 Jun 2018 06:46:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529329566; cv=none; d=google.com; s=arc-20160816; b=Sury8irgBjmvSroLJz67jsZm2geTvIkQXAfqBGSPLKYgeLb0PWKoKprqgMLFYRbbeU yGSPah7gyDx3A/BOqI4Pw5Q71lAi/lUDUzfAUhqf2klNqMj3CKTOj0YioKr8C5+AorDo GWufeBxKhhHYzBe7a4rbi+luPCaDZx8m9higuxoQKUxnNZRQsuAW+xjM5yFR8jPfS2Cp 6nDVBVn1SW94/8lb8hgG8UOy5AQiMIjQZ8M2cjZDLm7LTKI0DGfvT7D9iGKJjzTsR2RA cplZlnUIeS/e5gXfuq6cHGEGWdg9wRZYbLGqpppmmGtPDeftl2UyblgrNomtZddoJHOo pECQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=wKUX94HoMFCia65YMRlOEOxaXjXg5s8tcHuEh2qVToc=; b=NFz8wwyqeHacbE9/E73+AN1KMpeY+yXLeBr08WDBEL5J8Mz6mJnC8KWSEHGV8z0EVg iBXB3Q8MdsI3JOnDmvN7kfDlTzgH3W0gAaT53CqroBgaOX4oBzeAPons9X0x6va68Bcj bYu2MtKlOTEHHe6WehQ1ZHT/nWykXrBfspKDeecvBWt2QnYywPHwc3UQ8jSXwP54y6m2 HZuiaaFQYaRe09Uss9AEEEenOY40AYyxKQ0N+yr3onJyTD7wBvzlnd+JzIDbBQEdQ4Gt 6SAA0Dkj+m6uEhZlKJiDBavdSPqTbp98BXidXL8q8Irlou57FUATZcf8l7NscsxPM2EM 6c4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b1-v6si14462148pld.323.2018.06.18.06.45.52; Mon, 18 Jun 2018 06:46:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934471AbeFRNo5 (ORCPT + 99 others); Mon, 18 Jun 2018 09:44:57 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:56932 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754091AbeFRNoz (ORCPT ); Mon, 18 Jun 2018 09:44:55 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0B6C7402178A; Mon, 18 Jun 2018 13:44:55 +0000 (UTC) Received: from localhost (unknown [10.18.25.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B99A52026D68; Mon, 18 Jun 2018 13:44:54 +0000 (UTC) Date: Mon, 18 Jun 2018 09:44:54 -0400 From: Mike Snitzer To: Andy Shevchenko Cc: Alasdair Kergon , dm-devel@redhat.com, Shaohua Li , linux-raid@vger.kernel.org, Dmitry Torokhov , linux-input@vger.kernel.org, Andrew Morton , Yury Norov , linux-kernel@vger.kernel.org, mika.westerberg@linux.intel.com, Joe Perches Subject: Re: [PATCH v3 1/5] md: Avoid namespace collision with bitmap API Message-ID: <20180618134454.GA25547@redhat.com> References: <20180618131003.88110-1-andriy.shevchenko@linux.intel.com> <20180618131003.88110-2-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180618131003.88110-2-andriy.shevchenko@linux.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 18 Jun 2018 13:44:55 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 18 Jun 2018 13:44:55 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'msnitzer@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 18 2018 at 9:09am -0400, Andy Shevchenko wrote: > bitmap API (include/linux/bitmap.h) has 'bitmap' prefix for its methods. > > On the other hand MD bitmap API is special case. > Adding 'md' prefix to it to avoid name space collision. > > No functional changes intended. > > Signed-off-by: Andy Shevchenko > --- > drivers/md/dm-raid.c | 6 +- > drivers/md/md-bitmap.c | 301 +++++++++--------- > drivers/md/md-bitmap.h | 46 +-- > drivers/md/md-cluster.c | 16 +- > drivers/md/md.c | 44 +-- > .../md/persistent-data/dm-space-map-common.c | 12 +- > drivers/md/raid1.c | 20 +- > drivers/md/raid10.c | 26 +- > drivers/md/raid5-cache.c | 2 +- > drivers/md/raid5.c | 24 +- > 10 files changed, 244 insertions(+), 253 deletions(-) Seems my previous mail just missed your v3 cutoff but... All of these drivers/md/persistent-data/dm-space-map-common.c renames are wrong. DM is the only consumer (it is confusing because all DM and MD code lives in drivers/md/ despite only sharing a bit of MD code). Anyway, please rename bitmap methods in this file to have a "dm_bitmap" prefix instead. Thanks. Mike > diff --git a/drivers/md/persistent-data/dm-space-map-common.c b/drivers/md/persistent-data/dm-space-map-common.c > index 829b4ce057d8..049e999fc6c4 100644 > --- a/drivers/md/persistent-data/dm-space-map-common.c > +++ b/drivers/md/persistent-data/dm-space-map-common.c > @@ -69,7 +69,7 @@ static struct dm_block_validator index_validator = { > */ > #define BITMAP_CSUM_XOR 240779 > > -static void bitmap_prepare_for_write(struct dm_block_validator *v, > +static void md_bitmap_prepare_for_write(struct dm_block_validator *v, > struct dm_block *b, > size_t block_size) > { > @@ -81,7 +81,7 @@ static void bitmap_prepare_for_write(struct dm_block_validator *v, > BITMAP_CSUM_XOR)); > } > > -static int bitmap_check(struct dm_block_validator *v, > +static int md_bitmap_check(struct dm_block_validator *v, > struct dm_block *b, > size_t block_size) > { > @@ -108,8 +108,8 @@ static int bitmap_check(struct dm_block_validator *v, > > static struct dm_block_validator dm_sm_bitmap_validator = { > .name = "sm_bitmap", > - .prepare_for_write = bitmap_prepare_for_write, > - .check = bitmap_check > + .prepare_for_write = md_bitmap_prepare_for_write, > + .check = md_bitmap_check, > }; > > /*----------------------------------------------------------------*/ > @@ -124,7 +124,7 @@ static void *dm_bitmap_data(struct dm_block *b) > > #define WORD_MASK_HIGH 0xAAAAAAAAAAAAAAAAULL > > -static unsigned bitmap_word_used(void *addr, unsigned b) > +static unsigned md_bitmap_word_used(void *addr, unsigned b) > { > __le64 *words_le = addr; > __le64 *w_le = words_le + (b >> ENTRIES_SHIFT); > @@ -170,7 +170,7 @@ static int sm_find_free(void *addr, unsigned begin, unsigned end, > { > while (begin < end) { > if (!(begin & (ENTRIES_PER_WORD - 1)) && > - bitmap_word_used(addr, begin)) { > + md_bitmap_word_used(addr, begin)) { > begin += ENTRIES_PER_WORD; > continue; > }