Received: by 10.223.185.116 with SMTP id b49csp5466169wrg; Wed, 7 Mar 2018 12:14:30 -0800 (PST) X-Google-Smtp-Source: AG47ELt7KL6wSQ/prfAPMTvoklymR+eOAEXGfmyNGQrkqzldenz5QNq6iNoO2ZeUhpbj6fk37dNu X-Received: by 2002:a17:902:9686:: with SMTP id n6-v6mr13679382plp.331.1520453670286; Wed, 07 Mar 2018 12:14:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520453670; cv=none; d=google.com; s=arc-20160816; b=wxMSmZENDgvL5csYq6kCWmectyH3kEaG+KTDVPwoKNxtXYDlvyNC2yoNTLdCq2CVfz tI5gOs8NajsRDlyMI8J5ZqRMcvqbaOzHL8/1IkqPPUUaeb3xk0v6t3Ic7YSIuu0EzuXg NT9oI83YnNnifq2BVAZtUL5Gx7XVA9XtOGBt/wFkYXB+TQBigk0zOZIfjP2gJh+Y/2Tw obfqZegNIcnkKKKJkiDJ+wwik00CD9LBzVLx1oV+dDTt/AgCFBfnq2AJvkG7wOvVzxSb o+20OPw6pTYCX9gZRuvxXBjg8SCZJl3jkeJSc87H6fJaTTfae1wQxPS+9C5UobrpqJ6D Ol4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=v/DPd072h6iAIwkb4GxnEYm6+isM+El+B8pdPrg5vUk=; b=OJegmwLtYdN4Tvcxdq85G0hFnWr4Q0MBAmAHRTQG/SW2vEjhd4r4969WziYHVKHPpX W+Wx5nMncqiRgIHhh+IG3yfSZpSX3gdL9/iWeBuaZpzlM7i9PBKTXkfXesymdsLhDA8v OJBaT8TueYRR5E/TqpEJDl+W4EO2cAxXNhn8fL6LQcNaJO34nKNAN4rU6+EHX8QQBXr8 Yy8cQK/Y66ayMih/6g84+cPFRA6Dj6y5jr+hNvkmQ8Gc82evMPi55CA4GzDQlnv1M6YY yL54D04TD9mCxu7gEI4ts9rKHlsBXXGfFu51LmMrp6SAcOJPmjbCS9QSoz1u38fKVVFV 8EZg== 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 w24-v6si13110229plq.553.2018.03.07.12.14.15; Wed, 07 Mar 2018 12:14:30 -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; 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 S965249AbeCGTpK (ORCPT + 99 others); Wed, 7 Mar 2018 14:45:10 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:44036 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965234AbeCGTpH (ORCPT ); Wed, 7 Mar 2018 14:45:07 -0500 Received: from localhost (unknown [185.236.200.248]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 52FBFF1E; Wed, 7 Mar 2018 19:45:06 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Omar Sandoval , Christoph Hellwig , Jiufei Xue , Jens Axboe Subject: [PATCH 4.14 025/110] block: fix the count of PGPGOUT for WRITE_SAME Date: Wed, 7 Mar 2018 11:38:08 -0800 Message-Id: <20180307191042.938315225@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180307191039.748351103@linuxfoundation.org> References: <20180307191039.748351103@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jiufei Xue commit 7c5a0dcf557c6511a61e092ba887de28882fe857 upstream. The vm counters is counted in sectors, so we should do the conversation in submit_bio. Fixes: 74d46992e0d9 ("block: replace bi_bdev with a gendisk pointer and partitions index") Cc: stable@vger.kernel.org Reviewed-by: Omar Sandoval Reviewed-by: Christoph Hellwig Signed-off-by: Jiufei Xue Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- block/blk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/block/blk-core.c +++ b/block/blk-core.c @@ -2277,7 +2277,7 @@ blk_qc_t submit_bio(struct bio *bio) unsigned int count; if (unlikely(bio_op(bio) == REQ_OP_WRITE_SAME)) - count = queue_logical_block_size(bio->bi_disk->queue); + count = queue_logical_block_size(bio->bi_disk->queue) >> 9; else count = bio_sectors(bio);