From patchwork Wed May 30 09:58:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10438151 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 82741601E9 for ; Wed, 30 May 2018 09:58:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 722192818E for ; Wed, 30 May 2018 09:58:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 66844288E8; Wed, 30 May 2018 09:58:51 +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=ham 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 C3A852818E for ; Wed, 30 May 2018 09:58:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B58D16B026C; Wed, 30 May 2018 05:58:48 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id B07AC6B026D; Wed, 30 May 2018 05:58:48 -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 9F74F6B026E; Wed, 30 May 2018 05:58:48 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg0-f70.google.com (mail-pg0-f70.google.com [74.125.83.70]) by kanga.kvack.org (Postfix) with ESMTP id 59C466B026C for ; Wed, 30 May 2018 05:58:48 -0400 (EDT) Received: by mail-pg0-f70.google.com with SMTP id r9-v6so4937431pgp.12 for ; Wed, 30 May 2018 02:58:48 -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=tVr4pna9kGGBUGHJMUOiEMUxwKcDmhj1vDgphuqAfE0=; b=pdry2wj62gHgeHxybMX6mcpUypH44Px+bgyBQseYCdxNQVG1Baz5R5Nt1HUF4t04CY sYdmXHZuZJuYxozp4Rdys10uYrlcy57ls+dCbj1wgtJFB0DEMf4GTSUXtA4jg5+fqk0M L/B3Ex2x+QSC3dU9cjz3OE8Y4gt/AL2lYgtJvaDERjKhKq+eQkbjK9Q/lvLOIw0DDhlT AnNXTDYfsltJjgECY2DwGBoZlJ7dnNhRhMwtCeLvkvDOJbiopgnhK82aaLV+dvZ9gGuR QVw9/3krG5PYZGys1tCZBm56tLQBti/CZg67rFPNULPwjNyyeDSBRbFJFvrUGgbRi6Gr kcwQ== X-Gm-Message-State: ALKqPwfCAc/lO3SV+619BxKR2jFaU1Iy85vnyx8crCKZ95WWbMcpPPOE hrJ/Xua4fEcEUDNvFlaGUTt+iQGZBoESQT+JqfUYLzdKUoOA8dM8zDctGcY4SP0gUUKSeyVDgnT KG6h2WtIHFgfE6FASvFtwjBgYVHNDNu5aiOg9qyVptR3wmLVYKwvvf5kKvPlpEOA= X-Received: by 2002:a63:9c01:: with SMTP id f1-v6mr1726698pge.223.1527674328040; Wed, 30 May 2018 02:58:48 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIUyCixpOgOMVKkKD1hGTWbRpv8vjcbBqfRvUq6VZlKGIqoUB2PfRtIv0xC+bUZbl6MeIvw X-Received: by 2002:a63:9c01:: with SMTP id f1-v6mr1726666pge.223.1527674327332; Wed, 30 May 2018 02:58:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527674327; cv=none; d=google.com; s=arc-20160816; b=YuUco9ROhQQXolihjBqVFI+jJzdGBVN015d320oppo5ziHR534DnvjOxY3UzIa6LDS fwBSn4dNkB7q3jZ09AeoZJK9IXW1L9SPh5cscf6ZtX0bVm5zrjbM551fkspjMdGUrbcC mR/FYiSAtln0dk25qRrPMVloZyWCaM9cPQ+j31tgxhijDBwcFGubNyfpt9T7qHmYd1A7 LwSrAsHaXjSo13Z2waK/WUYViq2WvTc7JdwSkcCGVfvAFb0Q8aYNOveaHZDm3LPM9Wqb nLuIapucsH8Kf8ZpQmuM4qgHujTKQaAXX9Dmu/rAx/ZhdfAlwHWqrs1JXND55mfIzXSt snIQ== 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=tVr4pna9kGGBUGHJMUOiEMUxwKcDmhj1vDgphuqAfE0=; b=Aj3o1jAOCPHwcJ3O1j/UKuc71Soq3h8Qr/CEzACb2s6LkdPk/VoidSDGBIFuwMIogn 359XzgELO3Xsjw96vaIURoOTNwk3ougiT3kFhX9mmdeZgP+HtA+w67mGW9NrxNXemEtx DWytB8amWjAeg7qnKxo8TIpxujvT1ltohkvCB1Fl8hlygRRKmDpAwtv/j0axgjjLvJT/ 5uYWPnQ2NtDTvLerkM6L6NqFvgtH9UwF4FtxGA7yu8m6H3xt1Rj+KZWyXx8dHg5oYFrj RREsavf3NZL8vTHG1gByM1IG0rCyPPdsxyCMhX51iJJHqu0lHtweWQVn5vYy1GOPoxpm ohcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=uy1JGshp; spf=pass (google.com: best guess record for domain of batv+1f4557cc97fec8e307c5+5393+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+1f4557cc97fec8e307c5+5393+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 z16-v6si33608947plo.5.2018.05.30.02.58.47 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 May 2018 02:58:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of batv+1f4557cc97fec8e307c5+5393+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=uy1JGshp; spf=pass (google.com: best guess record for domain of batv+1f4557cc97fec8e307c5+5393+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+1f4557cc97fec8e307c5+5393+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=tVr4pna9kGGBUGHJMUOiEMUxwKcDmhj1vDgphuqAfE0=; b=uy1JGshpglmwSTMo+ajsjgN7c fu7sniNd6MZ2SP1UPDrMoistz6++2yH6geSVljT3Rtr1RyiUXs6e1naly1tC8YhZYfW5YUECeJqPf 3iX0Vvb/VtVbXBQFBYoNFzqMSP+gYsb6TXbYJlgCe7ByXkAUfeGk6ru+JOa4AWIRKaRfeGwaXgC9Y zvm1UoJC2qvIJyAG2FP5CSiKu1rjg7mnBswPj/MhZricKKvHa7NgAgKbuXw+TaqZT/uqgUDyvlZXY /dns0b6qvE1zXo0EtTI8WqP3rRkzpMjIZCLwSe/uJ14avnn5SlIhuaWJ9sydBKTjReGQS9y0r+Wne bKuOAn1wg==; 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 1fNxsU-0006WK-6I; Wed, 30 May 2018 09:58:46 +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: Wed, 30 May 2018 11:58:07 +0200 Message-Id: <20180530095813.31245-8-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180530095813.31245-1-hch@lst.de> References: <20180530095813.31245-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 Reviewed-by: Dave Chinner --- 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: */