Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3540055imu; Fri, 30 Nov 2018 01:56:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/W8Xy+M3SaWxdwfM4LwyakcueNPYWAdYeCUkMv9dLnbZUgLtH0B9SMfTl0BusMfyL4/mtUd X-Received: by 2002:a17:902:e08b:: with SMTP id cb11mr5073346plb.263.1543571800091; Fri, 30 Nov 2018 01:56:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543571800; cv=none; d=google.com; s=arc-20160816; b=XfB7UHvOOXIL9Sn4cdb7RirQ8CTqM/oAXF5Vm0X/tbBt2VzprbEzW+L2uoeldXjaap TkBFOgAAKP18n2sbk5++l+LyPvcO6O21nt2dmY8iAUopvuKCc3CKSoxEt2Up2HSNl0Ua bp79W3rr3xNpZfXf1RNrYOSDCtEtCWw/KDyz5SIuyGhal+dKl1VIF2XsviyNL9Y2qNp+ ed9eKi5gaGMngxoNj7F4qsVKFYJpEcC3rvf6CmDw1AqJYpBlu577uQZtFh9gTBrGw1g5 uGv6qgcWOvYTnimmd1MZStp2errAoI1Yk+hSNIxhU+c8eYV2EBFxPuTLTZq1FbaqQ7S2 tspA== 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:dkim-signature; bh=p6IDe3bNmVkdaqZzqzDEjWVzPy/63DcTYLmFYB4F5G0=; b=YDa4XboQbjTkWfIg1+Lacd6kGnt1/zNjPZrxaUFzXxWmlLyesGrka/5Xnyx5ODvXXS cgp40/s7aLbeFqiFIAMr4vIsC7Jzs5cxl3cpcB5y6lwNrC597/bEbk3z1E6ILGhQD3Om 7/A9dRsk+nHo2fiu0Xhy82tBt39GvZefuYWPt+K/MByVQwloh+1125FV+/OakOAoVCdE QZfYquZSQ8EXiE/E/sCZ+9giPmmjfX4AGugEspExcOl8Op6QDt+PS4wjGdPzUeSHzYQb GmLn0FneN+zL5jh35LyteoPPosNvHZ0KoCWg18nviBIpO0DwbLxzPa2hRc6zSyAJ5cD4 wkKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SceZ3EYk; 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 e7si5094557pfh.147.2018.11.30.01.56.09; Fri, 30 Nov 2018 01:56:40 -0800 (PST) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SceZ3EYk; 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 S1726585AbeK3VDM (ORCPT + 99 others); Fri, 30 Nov 2018 16:03:12 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:53474 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726499AbeK3VDM (ORCPT ); Fri, 30 Nov 2018 16:03:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=p6IDe3bNmVkdaqZzqzDEjWVzPy/63DcTYLmFYB4F5G0=; b=SceZ3EYkvE8T71CX9GkyfDZS4 otcQyrPL1cYn89V2MIKJAD8qdIX8lhfrBtcd9ddngw4Yos8ezI6xzzUcXOi1J/qXlH5GzNYcEuSs6 ESpF1WyHF3HFmgCHjz5Z3nqHa0mP4n14lC23NTGuarFdjFOxfo4kebs+trm9SfIF1LzCR/XOXjuzL C0hwMQJHHBgxP8ynhAA93j2tMrGSnnxB/qpCvsQlCC2ZqqBVwJK5eRBJDyJRcxFgPkzWe2dHYx89V XGRCRR/dJ5NhIbOMbbaFTFt/Pkv1befuvT9WTQPLRyHzdIKFHhZfafqI7OsGrtSPuJinKua9tByPb 9aBtDJfcw==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSfVC-0006ap-Kg; Fri, 30 Nov 2018 09:54:26 +0000 Date: Fri, 30 Nov 2018 01:54:26 -0800 From: Christoph Hellwig To: Dennis Zhou Cc: Jens Axboe , Tejun Heo , Johannes Weiner , Josef Bacik , kernel-team@fb.com, linux-block@vger.kernel.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 05/13] blkcg: associate blkg when associating a device Message-ID: <20181130095426.GB17103@infradead.org> References: <20181126211946.77067-1-dennis@kernel.org> <20181126211946.77067-6-dennis@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181126211946.77067-6-dennis@kernel.org> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > diff --git a/include/linux/bio.h b/include/linux/bio.h > index 62715a5a4f32..8bc9d9b29fd3 100644 > --- a/include/linux/bio.h > +++ b/include/linux/bio.h > @@ -486,6 +486,12 @@ extern unsigned int bvec_nr_vecs(unsigned short idx); > extern const char *bio_devname(struct bio *bio, char *buffer); > > #define bio_set_dev(bio, bdev) \ > +do { \ > + bio_set_dev_only(bio, bdev); \ > + bio_associate_blkg(bio); \ > +} while (0) > + > +#define bio_set_dev_only(bio, bdev) \ This lacks any explanation on when you would use bio_set_dev_only or bio_set_dev. Please document why we need both and why you'd choose or the other.