From patchwork Thu Aug 23 17:35:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Pittman X-Patchwork-Id: 10574483 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D182C920 for ; Thu, 23 Aug 2018 17:36:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3B632C282 for ; Thu, 23 Aug 2018 17:36:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A64632C575; Thu, 23 Aug 2018 17:36:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5FD152C282 for ; Thu, 23 Aug 2018 17:36:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 36AD68CCF; Thu, 23 Aug 2018 17:36:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7AD1918B5E; Thu, 23 Aug 2018 17:36:46 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 271D94BB75; Thu, 23 Aug 2018 17:36:43 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w7NHaB2n011085 for ; Thu, 23 Aug 2018 13:36:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8C40D10F1C1D; Thu, 23 Aug 2018 17:36:11 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from localhost.localdomain.com (ovpn-120-97.rdu2.redhat.com [10.10.120.97]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9C83C112D189; Thu, 23 Aug 2018 17:36:07 +0000 (UTC) From: John Pittman To: snitzer@redhat.com Date: Thu, 23 Aug 2018 13:35:54 -0400 Message-Id: <20180823173557.19665-1-jpittman@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com Subject: [dm-devel] [PATCH 0/3] dm: replace atomic_t reference counters with refcount_t X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 23 Aug 2018 17:36:49 +0000 (UTC) X-Virus-Scanned: ClamAV using ClamSMTP This series of patches further integrates the refcount_t API into the device-mapper layer. The refcount_t API works to prevent counter overflows and use-after-free bugs, so should make the mechanism more robust, and make troubleshooting easier. Adding here to dm-thin and dm-zoned. Refcounters changed listed below: struct thin_c -> refcount struct dmz_bioctx -> ref struct dm_chunk_work -> refcount struct dmz_mblock -> ref struct dm_zone -> refcount John Pittman (3): dm thin: use refcount_t for thin_c reference counting dm zoned: metadata: use refcount_t for dm zoned reference dm zoned: target: use refcount_t for dm zoned reference drivers/md/dm-thin.c | 8 ++++---- drivers/md/dm-zoned-metadata.c | 25 +++++++++++++------------ drivers/md/dm-zoned.h | 2 +- drivers/md/dm-zoned-target.c | 20 ++++++++++---------- Best Regards, John Pittman Customer Engagement and Experience Red Hat Inc. --- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel