From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934306AbdAIPdI (ORCPT ); Mon, 9 Jan 2017 10:33:08 -0500 Received: from mail-pg0-f44.google.com ([74.125.83.44]:32886 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933257AbdAIPc5 (ORCPT ); Mon, 9 Jan 2017 10:32:57 -0500 Subject: Re: [PATCH] do_direct_IO: Use inode->i_blkbits to compute block count to be cleaned To: Chandan Rajendra , jack@suse.cz References: <1483886830-23878-1-git-send-email-chandan@linux.vnet.ibm.com> Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, anton@samba.org, linuxppc-dev@lists.ozlabs.org From: Jens Axboe Message-ID: <25f09398-7750-19ce-8fa9-15e229aad498@kernel.dk> Date: Mon, 9 Jan 2017 08:32:55 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1483886830-23878-1-git-send-email-chandan@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/08/2017 07:47 AM, Chandan Rajendra wrote: > The code currently uses sdio->blkbits to compute the number of blocks to > be cleaned. However sdio->blkbits is derived from the logical block size > of the underlying block device (Refer to the definition of > do_blockdev_direct_IO()). Due to this, generic/299 test would rarely > fail when executed on an ext4 filesystem with 64k as the block size and > when using a virtio based disk (having 512 byte as the logical block > size) inside a kvm guest. > > This commit fixes the bug by using inode->i_blkbits to compute the > number of blocks to be cleaned. Thanks, added for 4.10. -- Jens Axboe