From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AG47ELvE29w9HeKJrwiyb//5Du3pUtEmuoPQewLIQ0xHpa8Sb6i8YS02GkBVakMNuMwtAA6kFWSs ARC-Seal: i=1; a=rsa-sha256; t=1520451908; cv=none; d=google.com; s=arc-20160816; b=XQ8wVMtVHQJFXYqXUYG68ooIxQOPl4sqiTuf0xSoUM9418KgVQ46k46l2Yv5eLLHpA Xbs3sIzUz0FqPYXbKBqfnEaAwazkxHdPYtPg70vDM1/psDxmjn0Z2UKQUgbS2j1RXnDy wgLFmldBhjugYTLaHAhjr2s1NCUo0SNIb2fQx9tQSYWGUy3upSh6M5eBWt1ybZjiifHT ZjKy3NcNHcBhh1XEkMO7u/t1P+5wYlAOcKpiIOskspt2fO+fXIVVmrLW1lww2alibn6W GomCJkusdDnfi1NreQxbnFak9YcwMYGE3C1dBIvosHI7iRQrn01RDLaurzceQYHuQJAe 30WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=zVQnJ02CwCtXNpnkhUvX8oC67oJxMA+dlCHG/mojpFbDZqtBuFz8Tk9jA8m9YB5e68 LAh6oztoEUJcSIneQBL02bCKSr6GjjZvX3OQ+STpgY4VAbg5FEeUVh88IMVWuNTRHURM bbdwfyJ1GmZZ0LDPUj21FVe/EoYwKBCfO9M+RAoRyhYBiGLCn//DCBz5rlPPcmc7MuYY zER7UHi+NbiDwVwMeWP9bG1VtKHYPhiW5qvQI16zbkZw0IThdsv/nbgGRwJHpCzxIUr5 VID4iaXsEJ8v35UF4+Tehxvp1793kyIMuJmhtmDISxNII6VX3bV9llhvJejaPE0bs3Se 2A/A== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 185.236.200.248 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 185.236.200.248 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1594309092397136741?= X-GMAIL-MSGID: =?utf-8?q?1594309380373882093?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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);