Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp280877imm; Thu, 7 Jun 2018 18:37:13 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI1qdr9ANPY77jscqgFmwg7RVzyq+d+36rEaK4R21JDyABlh5GZupLWGaxVgBThutpHD8fr X-Received: by 2002:a17:902:24e:: with SMTP id 72-v6mr4244900plc.87.1528421833554; Thu, 07 Jun 2018 18:37:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528421833; cv=none; d=google.com; s=arc-20160816; b=FE2+BdBFG84SAZmc9MqKAF5/dZUKlDF0RjOoOaPFvTI+M3xDOITGq84ZKFPqERh5aI nzVLJRObutCZ9GIUF+RF62foghXOcoff0Z/n3LlDO8sMVtX2EFODbTQIuaxVfuR66WQX ztGq+r2ihsVe+Z+9JGgWtadIqvpNAosTPL2CPqgSyBEYDbQdFNRm8hNsRqt5vsxuhowI h9R8F7x6yflktOL+KeoHtqope+sR8TT4t5LKkMsBBAdAKfmVE+foX7ZHW8Bn6WUoP+xo y0soOA3IG/kG5zHOmCEkbuojEs+/8HQ0skGy4+2bRfezrWgmihXoGFfwdMkeTPpCSm1F 5HEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature :arc-authentication-results; bh=LPMdK0z3b+tS1na3nB6YdVX/8ynulUVDdyaDiFOMruo=; b=gU7VfvyyCmGqI698Y9pPbNprlLcF52xs2xPsagh7yWDEiAp8njj1FGFKlAqRV21Zha Ia+NEyBlAviyPnAKD2QXNNVLch0I7D2Hw00n/Y7nk2+imuTQhaXALAoydjjYVCLJKMX0 /yTy1ySYoZG7t1zxVmjZyavzPUHMd3vcTzpMphgyggrhorG7vWN4P/FNhP70Cc0jgrhz QXzOzoFiegNYCaqqi/4eZNZ7Os03pV7j9LPYwna9588RjegU/vDo+ROhPf/oByTN0HBZ p0UCHCjahzSWuH0urR+GL9XSUHD512HFJ6AaLBUsRl1n8UK9JMTTvr5NRZEOirnXGBT0 gdeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=pZRaqhye; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a6-v6si3202125plz.351.2018.06.07.18.36.59; Thu, 07 Jun 2018 18:37:13 -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; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=pZRaqhye; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752667AbeFHBgc (ORCPT + 99 others); Thu, 7 Jun 2018 21:36:32 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:42217 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752434AbeFHBga (ORCPT ); Thu, 7 Jun 2018 21:36:30 -0400 Received: by mail-io0-f193.google.com with SMTP id r24-v6so14083482ioh.9 for ; Thu, 07 Jun 2018 18:36:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=LPMdK0z3b+tS1na3nB6YdVX/8ynulUVDdyaDiFOMruo=; b=pZRaqhyeGcdiRU+Iy9WETCrCgtZOEFbfmA3zF9q6oWABj+79KWK2DnE8g5hNTLIOv2 f2Ds0/Yev5NQZd7uR3dyC8yZdRtKuEhLzHP0OIDq8gj9dLZvlwUBWshWbS8xS0V4tbiA zEzidsnJonkNogs3bcVid7EJKvEaJhYDajd7LzeGPz9xS13qcC3RxCE1doi6uVRBq/8q Yd6sz0a1boxdrCaZxXnA1AiLUjnokG7p4pXBAvK/HZWZ9mp/9xMV8inDvfGRUuGNa8L6 gjMHgA/YapFeTS90HRLW7pufrxFrdYt3mDeNONrL1X/HOqOis4ajwjzmIyBTdWoFiT20 EXDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LPMdK0z3b+tS1na3nB6YdVX/8ynulUVDdyaDiFOMruo=; b=mYrggkSio+O2ryCY/GN/xhrJIKvQzxH+ui5tVupubMFSOU6oY0eLPHUqXc35VjbrYZ HF1xjWuU6ulYVv/6fQ0Hjq1YBS4cCsIAdOZ8ol52plunp7pNDA8ln8XSg9g9OH6mzqmw z7H8bY7MsGfvjFSE9POgktvY7DCKSY4uVD2NXQ+DwuaATS9qsc69eViZxqSu+2/8CZ+7 ItCnzKDfbe3zwX2WGP4+LEN3gcttra4o4Nhr2g3MHwHDu8UngmJhBSwRD0IyasuuwSXh T68xd+gDdEqyvf1ehZNZxWaqWn1l5ZDqAiQjAGQcP/fZJ1seasluTQcg4/SVSlGxADFj M55w== X-Gm-Message-State: APt69E0gyVPly/ZMtcbaZ2O8WvQ4AoG206CMKAOMjx/+aIzWIYd22AgP e6r5gz6MLIiOsdaBoTy5uM4JCg== X-Received: by 2002:a6b:ef02:: with SMTP id k2-v6mr3543645ioh.136.1528421790188; Thu, 07 Jun 2018 18:36:30 -0700 (PDT) Received: from [192.168.1.212] (107.191.0.158.static.utbb.net. [107.191.0.158]) by smtp.gmail.com with ESMTPSA id t123-v6sm200709itb.20.2018.06.07.18.36.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 18:36:28 -0700 (PDT) Subject: Re: [PATCH] md: Unify mddev destruction paths To: Kent Overstreet , shli@kernel.org, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org References: <20180608005254.6692-1-kent.overstreet@gmail.com> From: Jens Axboe Message-ID: <82fb97f6-b41b-37cf-b4fd-51e20dc4b4d3@kernel.dk> Date: Thu, 7 Jun 2018 19:36:27 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180608005254.6692-1-kent.overstreet@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/7/18 6:52 PM, Kent Overstreet wrote: > Previously, mddev_put() had a couple different paths for freeing a > mddev, due to the fact that the kobject wasn't initialized when the > mddev was first allocated. If we move the kobject_init() to when it's > first allocated and just use kobject_add() later, we can clean all this > up. > > This also removes a hack in mddev_put() to avoid freeing biosets under a > spinlock, which involved copying biosets on the stack after the reset > bioset_init() changes. Looks good to me, much nicer than the previous hack. -- Jens Axboe