From patchwork Thu Dec 22 20:00:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9485527 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 5CE26600BA for ; Thu, 22 Dec 2016 20:00:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E3A728454 for ; Thu, 22 Dec 2016 20:00:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 535AA2845B; Thu, 22 Dec 2016 20:00:39 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 E9F0128454 for ; Thu, 22 Dec 2016 20:00:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966817AbcLVUAd (ORCPT ); Thu, 22 Dec 2016 15:00:33 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:50676 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966324AbcLVUAc (ORCPT ); Thu, 22 Dec 2016 15:00:32 -0500 Received: from p3ee3fc9f.dip0.t-ipconnect.de ([62.227.252.159] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.85_2 #1 (Red Hat Linux)) id 1cK9XT-0001an-Il; Thu, 22 Dec 2016 20:00:32 +0000 From: Christoph Hellwig To: linux-xfs@vger.kernel.org Cc: eguan@redhat.com, darrick.wong@oracle.com Subject: [PATCH 2/5] xfs: fix the alignment fallback in xfs_bmap_btalloc Date: Thu, 22 Dec 2016 21:00:19 +0100 Message-Id: <1482436822-31546-3-git-send-email-hch@lst.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1482436822-31546-1-git-send-email-hch@lst.de> References: <1482436822-31546-1-git-send-email-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 The way the alignment field is used the minimum possible alignment is 1. By setting it to 0 we'll mess up calculations that rely on this. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster --- fs/xfs/libxfs/xfs_bmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 2760bc3..19c05e9 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -3796,7 +3796,7 @@ xfs_bmap_btalloc( */ args.type = atype; args.fsbno = ap->blkno; - args.alignment = 0; + args.alignment = 1; if ((error = xfs_alloc_vextent(&args))) return error; }