From patchwork Tue Mar 13 14:35:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10279189 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8C83A602BD for ; Tue, 13 Mar 2018 14:36:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CDC5287E3 for ; Tue, 13 Mar 2018 14:36:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71F0E29029; Tue, 13 Mar 2018 14:36:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E52C287E3 for ; Tue, 13 Mar 2018 14:36:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932331AbeCMOgL (ORCPT ); Tue, 13 Mar 2018 10:36:11 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:60950 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932094AbeCMOgL (ORCPT ); Tue, 13 Mar 2018 10:36:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:To:From:Sender:Reply-To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MG/qi9OCoqnnGhfo5o9QnqkZXnkd5FNcuofjlhmhpTA=; b=XWPNENOep6IRg/YLXReRrdng+ cYFpk0QCDIUM/osYvpj3lGkY1/Upj5bRFdHQlgJoO2Q6MlHYGT7kgJKQ7Yn6Je5bCH39FTQyBdi0N /gQbK3EiqCMWcRq+qRfFifUcK1zoqUntNUHmJ75czZWzQ4rn876tuL180cYqB1fqMW/Mj9wE5O+L7 c2TCpu/M2dWvvAKUt6Cq2h8BXCQ/7SgSXwx0u+Tj+ktY8Avh96D92lu3ExQeeM95UicNIxBmZf2jL S60rT+uRqxsJOhKYK6wzHaPYjM7ov036Y13l7+mDoUuVRKpj7HdvkBEEB6a4mEYiqvOUvflMVnpgf 09cZgGbKw==; Received: from 77.117.139.172.wireless.dyn.drei.com ([77.117.139.172] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1evl2A-0004Zs-AR for linux-xfs@vger.kernel.org; Tue, 13 Mar 2018 14:36:10 +0000 From: Christoph Hellwig To: linux-xfs@vger.kernel.org Subject: [PATCH 2/8] xfs: don't use XFS_BMAPI_ENTRIRE in xfs_get_blocks Date: Tue, 13 Mar 2018 15:35:55 +0100 Message-Id: <20180313143601.30028-3-hch@lst.de> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180313143601.30028-1-hch@lst.de> References: <20180313143601.30028-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no reason to get a mapping bigger than what we were asked for. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_aops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index a0afb6411417..c79a3ca20ef8 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -1331,8 +1331,8 @@ xfs_get_blocks( end_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)offset + size); offset_fsb = XFS_B_TO_FSBT(mp, offset); - error = xfs_bmapi_read(ip, offset_fsb, end_fsb - offset_fsb, - &imap, &nimaps, XFS_BMAPI_ENTIRE); + error = xfs_bmapi_read(ip, offset_fsb, end_fsb - offset_fsb, &imap, + &nimaps, 0); if (error) goto out_unlock;