From patchwork Thu May 31 18:06:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10441685 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 685C4602BF for ; Thu, 31 May 2018 18:06:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55D1A28F25 for ; Thu, 31 May 2018 18:06:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A62B28F91; Thu, 31 May 2018 18:06:52 +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 CE78928F92 for ; Thu, 31 May 2018 18:06:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EFE486B026C; Thu, 31 May 2018 14:06:44 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id EB0466B026D; Thu, 31 May 2018 14:06:44 -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 D534C6B026E; Thu, 31 May 2018 14:06:44 -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 8A6146B026C for ; Thu, 31 May 2018 14:06:44 -0400 (EDT) Received: by mail-pl0-f70.google.com with SMTP id 89-v6so13760956plc.1 for ; Thu, 31 May 2018 11:06:44 -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=VJz6Nb0sg2bW4PT+EpfT6kTBexVgQ7jxN2zROZJ3C1I=; b=dbWh3A/CTjdbsZHUXknr2uhJiX+/mckvuNJjUTN858zdSLlqvdFKfcDDeNNdKR1gYI 09m8GCjCGWr9F7+n1ZTNUcf7lme4vleyTlytmc8nRfxuyrr0kKR0+AqXqjUZER+V/b8D zJREro/I33DO0WfuuSP8JEfX0KqI0srI+dYcVAw9TY6lRgNLJf3R0GIyNNqCKFSF4ejI H5HR6x1Zza2yx0xJJc82BSf8oKNFTzZVK09vi1/3vX0xLp30vfz5UQbcNPrmREASyg8C Sp0zenoEQ4EYn5kwP8jqEg61A8PRJsFspl6nNoOHDFy/XDzmvBL9sOGpJB2gqymrXW6v Gqnw== X-Gm-Message-State: ALKqPwcqif99dW7ACoa54L1xoUG4g0GmoYKkB1uY8BU/FH8ipI4lMGWX BCEq26fqXRuofLM1NxRzUTRNyzJO+Vk7nJrDNEGanKFjhcS1KN04xTO2rMn//QkjOHnkDBvY+gB xgM4hS68RXsJO1oswxRW7cXdb+vSkL2Rlga6xSMqtvygZOfk5Sb/oV73QwuqmW7I= X-Received: by 2002:a17:902:8bc6:: with SMTP id r6-v6mr8039322plo.257.1527790004225; Thu, 31 May 2018 11:06:44 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKFXqzjbFJNQx7ou1Eb8+nOoYLSB/68wnNpDtf8Y7suXFkPFdNATk1H2+rxVKtW3ZHYaUAm X-Received: by 2002:a17:902:8bc6:: with SMTP id r6-v6mr8039274plo.257.1527790003303; Thu, 31 May 2018 11:06:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527790003; cv=none; d=google.com; s=arc-20160816; b=ogg5XoJJDILnxr5r0TqCXbdbR2bGZ+P7ptd4dfQ/nRXmC8UwfKLwwLBG4Dp7DFumNd NPFhOcaB/I+HwBuUz3nFKj6vD6zz/Cok7ypHspGSTMJqVjS33qC3PaU15/V5grXlZFLV dF8pK1O/lK4uET76NmaTfHUuDAaZmlKHHMgu/dF9KGomfb1O3uekfL3BJbSxZCzmImY8 Vv6hMfq/HqwVxCk5/c7ef18ZUCkAyHQwq+6/d4iAWPDuST1W0DmMKROgWhchLDh9GjtK rToZQ7sAflGc3wjqrJP2qxyl06BGapTPQuzlVpIFer+L3thMC+oY9keD4R+wOsOyl3SS rOtA== 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=VJz6Nb0sg2bW4PT+EpfT6kTBexVgQ7jxN2zROZJ3C1I=; b=kjUoUjmUGDCtV+GtIDoHNi065EE5+5sT/ZIt+biKokOs4RWRqtqLfl/U0o1pIyI/ag cHaus4U5S/6e7D+vPF5S4pmfelNr3a0Xi4f1kF0k3ZrZ9cjJyK3IOB9oAO4iKlVvezqz RhBJP8ABYvaOvXlVU16481VdIOdHnvyE4psH4mgzAtgu0LzOxVCRoJiBxmOdogyUE3Cm 6EKamwekQoqLJ1zZV11k/laJHoogPKExxza9a0F7TKor5tf1JO/H+jTEO7sv6SVayYLV 27C4dFIRDYYIwEjeogw9hLtNvVddmKTyzwsnViAbCZ09i2jGzmZWIvBKKzcL8/JSxdyC WA9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=bOFlG51U; spf=pass (google.com: best guess record for domain of batv+67dfbb8f664e29ec4bbc+5394+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+67dfbb8f664e29ec4bbc+5394+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 s187-v6si13033347pgc.447.2018.05.31.11.06.43 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 May 2018 11:06:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of batv+67dfbb8f664e29ec4bbc+5394+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=bOFlG51U; spf=pass (google.com: best guess record for domain of batv+67dfbb8f664e29ec4bbc+5394+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+67dfbb8f664e29ec4bbc+5394+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=VJz6Nb0sg2bW4PT+EpfT6kTBexVgQ7jxN2zROZJ3C1I=; b=bOFlG51UgtDFc45tD09NaQiLN SHs3b3xQ/p1/Zg7N/2/uIJk6J2yHJ/jrbuFu/IYjH9fu+ovbpW6A56zb/K6PKapx9AIZz4LbXhogX u5RV0ylbBFuAA1ItF3sqY9ZrvlNRcjOYJc+l12Enx0xRqFSxkiUbbzA5D5+Zvv0MjUePtytOntSVM xTSVFTrfC060PMI7S1KaLpdK6EIboQMlzbt6YApr3rpEoEFqjmTrG7zP/U+j71eELEXwOQE8Qc6am HKAuk9gwUITBB2ev/jMayH52AkydJ5JvHC+a9lUOn2g/pZmOedh5ts9x2bwPtlWVnVGNSKwzfEA+s sbZsw1aWg==; Received: from 213-225-38-123.nat.highway.a1.net ([213.225.38.123] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fORyD-0003Mv-A1; Thu, 31 May 2018 18:06:41 +0000 From: Christoph Hellwig To: linux-xfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 07/13] iomap: move IOMAP_F_BOUNDARY to gfs2 Date: Thu, 31 May 2018 20:06:08 +0200 Message-Id: <20180531180614.21506-8-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180531180614.21506-1-hch@lst.de> References: <20180531180614.21506-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 globally. Signed-off-by: Christoph Hellwig Reviewed-by: Dave Chinner 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: */