From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Mon, 1 Jul 2019 23:54:28 +0200 Subject: [Cluster-devel] [PATCH 04/15] iomap: warn on inline maps iomap_writepage_map In-Reply-To: <20190701215439.19162-1-hch@lst.de> References: <20190701215439.19162-1-hch@lst.de> Message-ID: <20190701215439.19162-5-hch@lst.de> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit And inline mapping should never mark the page dirty and thus never end up in writepages. Add a check for that condition and warn if it happens. Signed-off-by: Christoph Hellwig --- fs/iomap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/iomap.c b/fs/iomap.c index 0a86aaee961f..ea5b8e7c8903 100644 --- a/fs/iomap.c +++ b/fs/iomap.c @@ -2541,6 +2541,8 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc, error = wpc->ops->map_blocks(wpc, inode, file_offset); if (error) break; + if (WARN_ON_ONCE(wpc->iomap.type == IOMAP_INLINE)) + continue; if (wpc->iomap.type == IOMAP_HOLE) continue; iomap_add_to_ioend(inode, file_offset, page, iop, wpc, wbc, -- 2.20.1