Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1077278ybi; Fri, 14 Jun 2019 08:15:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRFtznnEgFd2VkhhJaFHoqsHMM9Bp/X6/FzClfa34ywn5b6gCqOFxfn95zAJymUK8AvXV3 X-Received: by 2002:a62:3543:: with SMTP id c64mr16953194pfa.242.1560525302180; Fri, 14 Jun 2019 08:15:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560525302; cv=none; d=google.com; s=arc-20160816; b=GiwWv+9Btu9vfpcRdwDWgmqSXXZKLRXn4wIoJe3Ea5H2WeTFftL8u0rIz355bceQw7 XrbOeIeTn9dQ5K9y+gPCBnnbJrJXdiHUbiFFD64AUD8+dM7Ei/MY/b5ewIxGi8D0jEG6 4pBZ4sKpJAyYNsa/P0RlvuhD04aTEgNuYQC8oK8F+fsjfxC8oJzN01FY2w+fc53bzkc3 TDKN7WEEJAzF1J/1zG63jOt+/ilUaBYafyDP9f0jy/0MQcjfHhF8p0fHkw9CdsJWaCWB 8zJYJp0fhkuQzvoUiakNtkcLUZHyavB5O8qFOfk1f8xBHWO3D4t3a04Lyh7K8tLPfepJ jswQ== 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-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:reply-to:message-id:subject:cc:to:from :date; bh=17oWl4KthdfMIDdlCD3YbU3ra7oeEyYIojwEwZDMKtQ=; b=QfR9JO7PIXrlrcMtaAvYbgcy7hPAbRTfcd1HWiG2/3D1iYnfJvTDLMMnlXlEGS8Gfb W0nGFh+L3iZIPW2qTNcnlH1CDmdKjOet2SeRODxWt6nqk0nTIKC6cuuuzRbVOedkafX6 Vf50n7ShRdQKkgcbeH1hngnpIHVY6ZK+wFqsZafVXBp5Zfn9XR2PVWquw1xtL0aaE3R1 zoG1NwCRRkRnBF0J1gfyfD5jJCWw15k1cyYtVxXwSJmVq/56PW8gA/XtfZgNMaNFRz7m Wm2BjkIfN3NzMRW5pSgf0Na5fonAf+xwwOGbeEFqZDdURHAlrABertWdbt3+qvMC2dBV CLLw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e65si1034657pfe.46.2019.06.14.08.14.46; Fri, 14 Jun 2019 08:15:02 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726283AbfFNPOh (ORCPT + 99 others); Fri, 14 Jun 2019 11:14:37 -0400 Received: from mx2.suse.de ([195.135.220.15]:51726 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725808AbfFNPOh (ORCPT ); Fri, 14 Jun 2019 11:14:37 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 76E96AB42; Fri, 14 Jun 2019 15:14:35 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id AFF59DA8D6; Fri, 14 Jun 2019 17:15:24 +0200 (CEST) Date: Fri, 14 Jun 2019 17:15:24 +0200 From: David Sterba To: Tejun Heo Cc: dsterba@suse.com, clm@fb.com, josef@toxicpanda.com, axboe@kernel.dk, jack@suse.cz, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 7/8] Btrfs: use REQ_CGROUP_PUNT for worker thread submitted bios Message-ID: <20190614151524.GZ3563@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Tejun Heo , dsterba@suse.com, clm@fb.com, josef@toxicpanda.com, axboe@kernel.dk, jack@suse.cz, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, kernel-team@fb.com References: <20190614003350.1178444-1-tj@kernel.org> <20190614003350.1178444-8-tj@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190614003350.1178444-8-tj@kernel.org> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 13, 2019 at 05:33:49PM -0700, Tejun Heo wrote: > @@ -1251,12 +1258,29 @@ static int cow_file_range_async(struct inode *inode, struct page *locked_page, > * to unlock it. > */ > if (locked_page) { > + /* > + * Depending on the compressibility, the pages > + * might or might not go through async. We want > + * all of them to be accounted against @wbc once. > + * Let's do it here before the paths diverge. wbc > + * accounting is used only for foreign writeback > + * detection and doesn't need full accuracy. Just > + * account the whole thing against the first page. > + */ > + wbc_account_io(wbc, locked_page, cur_end - start); > async_chunk[i].locked_page = locked_page; > locked_page = NULL; > } else { > async_chunk[i].locked_page = NULL; > } > > + if (blkcg_css != blkcg_root_css) { > + css_get(blkcg_css); fs/btrfs/inode.c: In function ‘cow_file_range_async’: fs/btrfs/inode.c:1278:4: error: implicit declaration of function ‘css_get’; did you mean ‘css_put’? [-Werror=implicit-function-declaration] 1278 | css_get(blkcg_css); | ^~~~~~~ | css_put I don't have CONFIG_CGROUPS enabled in the testing kernel so this probably needs a wrapper so the ifdef is not in the middle of the function.