From patchwork Wed May 23 14:43:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10421537 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 C9FDA60327 for ; Wed, 23 May 2018 14:44:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB1DE26E82 for ; Wed, 23 May 2018 14:44:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFB41287E9; Wed, 23 May 2018 14:44:53 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D78026E82 for ; Wed, 23 May 2018 14:44:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E67D66B026E; Wed, 23 May 2018 10:44:37 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id DC7ED6B0270; Wed, 23 May 2018 10:44:37 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B81D66B0271; Wed, 23 May 2018 10:44:37 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f70.google.com (mail-pl0-f70.google.com [209.85.160.70]) by kanga.kvack.org (Postfix) with ESMTP id 655496B026E for ; Wed, 23 May 2018 10:44:37 -0400 (EDT) Received: by mail-pl0-f70.google.com with SMTP id f10-v6so14222096pln.21 for ; Wed, 23 May 2018 07:44:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=R3ZkyZnV5VAO4NcYPhPYcA6UHDK7/6mS6WJJ8httF1g=; b=b5MYoI2jRg/8A/6H8z0P5KJCL1JRcGfvyuMW/IdJDPXtcS3RiY713lV72/a0cSUL3D pQRV88DU2baKvkkpfHw39jNzKL2qfAZtp9oihiiOn/Mwwuui9kfLc+V3aaOtHVJYiiHk sVxTcZYnBpoGrnVwHPrzvcXylgAsorRUarWyFUD5ChzOC131l0RpS00F8KSbWBWZ+069 Sx3fXdN8lVVQE9GgZe0tK5aPg6GeNAbHI2/PtuUXDk5v+8+4ocfM82fWBDwJlBXCVegZ hYDv1rXqYktE8l6Rdv9kmomKtJE85dPoEaxvwEfZU9ICasjVwqVEltST28awpgYCig/h TQ+g== X-Gm-Message-State: ALKqPwc8puDuPEhTgbK2RkaCCywjhnmckpA27zSSFw9P7EEIouxvIjOV w8U4kLwiYD0vMbpoTy0yicpVCtdxUu+kMhkdM/wAxmkRf9p4LCfnUATHvwn5yBRRBLgG7gVSoRq kA6xiF+cSlxB5QF11NzH31hS8jzja6mHNFKuOB6PNuFWOmzYPlBHsXTwHu3hXEYg= X-Received: by 2002:a17:902:2c83:: with SMTP id n3-v6mr3182695plb.211.1527086677106; Wed, 23 May 2018 07:44:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo4iMyE9O0Hrx8X9tpV1DlKQMZVTlw86uxMa3XEBDCd8rqyKSZHWhF+ODlfwnm4hh4oEfz+ X-Received: by 2002:a17:902:2c83:: with SMTP id n3-v6mr3182662plb.211.1527086676249; Wed, 23 May 2018 07:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527086676; cv=none; d=google.com; s=arc-20160816; b=kzeVz8q8URs3+I/Lr4dchjjcz96sl77MAHALP7RwE7iQKMJoHS8vAA5wXOxB4jkn9D rPrQ9eFZBX+kliFnqUdIoCX/IbiiSYxxw+IXIJ3c/+Z1mtYwy2D0P/PpjUf81IMRCcug xiu4qxtXKBUyMWZML5fd6gpzMP1ITOlG6DbstkW0xIF+iqH++dd5GRPGhEkkyI8ma3nc BM7eBewth35K6YOaVEIauT5sMWmGTx6IxsRH+nkdmNvUDcHX7xEpqyUzdKlLJBLWevDu oXU2JQmvayBnayzH0Z3qKiME3UpIJI45/Tr01Y1MbarKUqO4hx4wxyp6w9bQ0207+ju0 TEwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=R3ZkyZnV5VAO4NcYPhPYcA6UHDK7/6mS6WJJ8httF1g=; b=MwWUS/kOBk2gfXPFZsNAdV8g0K9T1vwZbQzAkjh6q54PgLrmIeol17MpivvOSUusPL GfbWfXyAWP73QLJKslfsBaV2j9DwlNHCsSXi6lsutpUg6u56/YoQIbVqjCQpFBwnLcx1 GFmsNwCwElgsyhUOjbh0ee1QmlCkppoVlHjncEncR6k0bXymrFuewQyJruTHuIvKEWva X31rqLc7iHRgjwOSfXKpr5r4UI9zpvkQBVLv3XZxoLxLIHOtLZ93Mt1roWCZOkCh05Z1 3rRDLJdkJnUTahCrSvrXWSKHnNeFTcOTYvMcX52b+aDKyBz+8CpUSHb1mox+ooJcWY7T eHDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=ues0evdK; spf=pass (google.com: best guess record for domain of batv+df5a2477ff0fa86e9985+5386+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+df5a2477ff0fa86e9985+5386+infradead.org+hch@bombadil.srs.infradead.org Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id q4-v6si19396517pll.10.2018.05.23.07.44.36 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 07:44:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of batv+df5a2477ff0fa86e9985+5386+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=ues0evdK; spf=pass (google.com: best guess record for domain of batv+df5a2477ff0fa86e9985+5386+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+df5a2477ff0fa86e9985+5386+infradead.org+hch@bombadil.srs.infradead.org 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:Cc:To:From:Sender:Reply-To: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=R3ZkyZnV5VAO4NcYPhPYcA6UHDK7/6mS6WJJ8httF1g=; b=ues0evdKWHCRPJmtrfNvBu6AA gK/Yy3KyTOO/ieQbpFAlw9KGAxWpgx279Um44y/ktA7Je2ti3DyRONIITN6YqzEeO5y/SXLgeOujj Oivu2JMmi9APPJtVG1ozeKmzk9WBSczLi4TfmXXLKp4pQgVx0sJbRaX5/bW9AhRIgk+uRYmwrlBti YPO+3NyDkiRy7xbYvDFIYN7+y+W9joY/HzqSLlwIYkChdcVQxlccn1XXN8i5CQvjQmvUiCfrMmwBr uFtjYUsXBA2LyRBv6PDwRFgN2Z2oD0zeFCtvKXmZNQgwPatfAfCl/EvesSoj+XSLbX1NgOM9OjAtS e+M+ZyoKw==; Received: from 089144199016.atnat0008.highway.a1.net ([89.144.199.16] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLV0E-0000MF-HL; Wed, 23 May 2018 14:44:35 +0000 From: Christoph Hellwig To: linux-xfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 11/34] iomap: move IOMAP_F_BOUNDARY to gfs2 Date: Wed, 23 May 2018 16:43:34 +0200 Message-Id: <20180523144357.18985-12-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180523144357.18985-1-hch@lst.de> References: <20180523144357.18985-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Just define a range of fs specific flags and use that in gfs2 instead of exposing this internal flag flobally. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- fs/gfs2/bmap.c | 8 +++++--- include/linux/iomap.h | 9 +++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index cbeedd3cfb36..8efa6297e19c 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -683,6 +683,8 @@ static void gfs2_stuffed_iomap(struct inode *inode, struct iomap *iomap) iomap->type = IOMAP_INLINE; } +#define IOMAP_F_GFS2_BOUNDARY IOMAP_F_PRIVATE + /** * gfs2_iomap_begin - Map blocks from an inode to disk blocks * @inode: The inode @@ -774,7 +776,7 @@ int gfs2_iomap_begin(struct inode *inode, loff_t pos, loff_t length, bh = mp.mp_bh[ip->i_height - 1]; len = gfs2_extent_length(bh->b_data, bh->b_size, ptr, lend - lblock, &eob); if (eob) - iomap->flags |= IOMAP_F_BOUNDARY; + iomap->flags |= IOMAP_F_GFS2_BOUNDARY; iomap->length = (u64)len << inode->i_blkbits; out_release: @@ -846,12 +848,12 @@ int gfs2_block_map(struct inode *inode, sector_t lblock, if (iomap.length > bh_map->b_size) { iomap.length = bh_map->b_size; - iomap.flags &= ~IOMAP_F_BOUNDARY; + iomap.flags &= ~IOMAP_F_GFS2_BOUNDARY; } if (iomap.addr != IOMAP_NULL_ADDR) map_bh(bh_map, inode->i_sb, iomap.addr >> inode->i_blkbits); bh_map->b_size = iomap.length; - if (iomap.flags & IOMAP_F_BOUNDARY) + if (iomap.flags & IOMAP_F_GFS2_BOUNDARY) set_buffer_boundary(bh_map); if (iomap.flags & IOMAP_F_NEW) set_buffer_new(bh_map); diff --git a/include/linux/iomap.h b/include/linux/iomap.h index 13d19b4c29a9..819e0cd2a950 100644 --- a/include/linux/iomap.h +++ b/include/linux/iomap.h @@ -27,8 +27,7 @@ struct vm_fault; * written data and requires fdatasync to commit them to persistent storage. */ #define IOMAP_F_NEW 0x01 /* blocks have been newly allocated */ -#define IOMAP_F_BOUNDARY 0x02 /* mapping ends at metadata boundary */ -#define IOMAP_F_DIRTY 0x04 /* uncommitted metadata */ +#define IOMAP_F_DIRTY 0x02 /* uncommitted metadata */ /* * Flags that only need to be reported for IOMAP_REPORT requests: @@ -36,6 +35,12 @@ struct vm_fault; #define IOMAP_F_MERGED 0x10 /* contains multiple blocks/extents */ #define IOMAP_F_SHARED 0x20 /* block shared with another file */ +/* + * Flags from 0x1000 up are for file system specific usage: + */ +#define IOMAP_F_PRIVATE 0x1000 + + /* * Magic value for addr: */