Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3484887imu; Sun, 11 Nov 2018 16:09:38 -0800 (PST) X-Google-Smtp-Source: AJdET5fnafRPIImnIIqA/y3EjN462Y/nVAw552cIiR1FebKIlFeb42gXitcPl0Wmxwt7heZwah4q X-Received: by 2002:a63:3287:: with SMTP id y129mr15721206pgy.337.1541981378257; Sun, 11 Nov 2018 16:09:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981378; cv=none; d=google.com; s=arc-20160816; b=vFY9heIxTV3+NnnF9Do7OTlfZz2BaI3BdmBa6fhgbDuEzF1Lz/838PwH5atHAVU5i7 MO8nz05OxVOqdl2LDi6Zhd3PbD4OoEAeKV0XlXCsEpWButAuVtZ1WeXpeGlmVQNZQ/kx TP9q70HU5uUwy8hVUToB0gg24/fnjpPGChew585qdHxUCbAghlTXYGgA3upKHHhQEtXO Z2oF7BygFx6C1LsM3qSMd4Dkk1ITwCTvRTv9/Kk4tOhAgyCIdq5v1JB3v/+bIp7K75/f x9nnvFB55TRb28eVXPGNqYfsgh1DJS4m8iJP+FejDYYE3fbJlIAls81kt5utyz+Aww0R Mrhw== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Vn/ldsQAoNJVZktKUKg3KlLpQSODWurt9slcDo0nH34=; b=LxEOYAeO7RRl6ai65Yq836nJSi4ltcTC0c41h9BuvK2WkWx7EEYL6E9ESN9eheCRfZ OtCTNRDRVgM1MyU42XO23zEGafCt6H+Mjo49KY5YT4LmoZ0NsCw/PvmpCDMNmQWlcHqk 9P8Vpp9rEGkV2SyucWqCNHvHXAl2V4kvak650lYqzEnz3jmYyOWyJyOyI0L467LMIdOP a94BBZ2BFnjsx+KhoA+KxwkMRDVirbaDMt21FEIH7IHDMAQYAvnj6hxLbRMxIrXlpQ1u sDorWsb9u7+8Hw9LxzweiBApprCHE/R0q7gCtenl25pAOBc0u3sCL5SQbS/usbq2rmvB TDRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gWok8Wzb; 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 b4-v6si17280748pfa.25.2018.11.11.16.09.23; Sun, 11 Nov 2018 16:09:38 -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=pass header.i=@kernel.org header.s=default header.b=gWok8Wzb; 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 S1731564AbeKLIRe (ORCPT + 99 others); Mon, 12 Nov 2018 03:17:34 -0500 Received: from mail.kernel.org ([198.145.29.99]:59904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731484AbeKLIRd (ORCPT ); Mon, 12 Nov 2018 03:17:33 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AC290223CA; Sun, 11 Nov 2018 22:27:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975257; bh=YVcn8po0a9z65pjujyoKQUg33+svZvYoHl2iBPIiD3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gWok8WzbEoFjA77fUMrxAzBorCvsOswSGRhMGGEFIAr1DWf5trXftwrejZol/XdMv nAubdS9W0qLTZ0E5OuPjl7nPhaNU+GYH99vv/QXe0EEgCpZuVxKeA4HsMtQ3vc2PYi HHKAg5psfTENQdIbc8Ps/XY6fLKu5EKj7Lt03HyQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chao Yu , Jaegeuk Kim , Sasha Levin Subject: [PATCH 4.19 133/361] f2fs: fix to account IO correctly for cgroup writeback Date: Sun, 11 Nov 2018 14:18:00 -0800 Message-Id: <20181111221639.014555185@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Chao Yu [ Upstream commit 78efac537de33faab9a4302cc05a70bb4a8b3b63 ] Now, we have supported cgroup writeback, it depends on correctly IO account of specified filesystem. But in commit d1b3e72d5490 ("f2fs: submit bio of in-place-update pages"), we split write paths from f2fs_submit_page_mbio() to two: - f2fs_submit_page_bio() for IPU path - f2fs_submit_page_bio() for OPU path But still we account write IO only in f2fs_submit_page_mbio(), result in incorrect IO account, fix it by adding missing IO account in IPU path. Fixes: d1b3e72d5490 ("f2fs: submit bio of in-place-update pages") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- fs/f2fs/data.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -456,6 +456,10 @@ int f2fs_submit_page_bio(struct f2fs_io_ bio_put(bio); return -EFAULT; } + + if (fio->io_wbc && !is_read_io(fio->op)) + wbc_account_io(fio->io_wbc, page, PAGE_SIZE); + bio_set_op_attrs(bio, fio->op, fio->op_flags); __submit_bio(fio->sbi, bio, fio->type);