From: Goldwyn Rodrigues <rgoldwyn@suse.de>
To: linux-btrfs@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org, hch@lst.de,
darrick.wong@oracle.com, david@fromorbit.com,
Goldwyn Rodrigues <rgoldwyn@suse.com>
Subject: [PATCH 3/6] iomap: Check iblocksize before transforming page->private
Date: Fri, 21 Jun 2019 14:28:25 -0500 [thread overview]
Message-ID: <20190621192828.28900-4-rgoldwyn@suse.de> (raw)
In-Reply-To: <20190621192828.28900-1-rgoldwyn@suse.de>
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
btrfs uses page->private as well to store extent_buffer. Make
the check stricter to make sure we are using page->private for iop by
comparing iblocksize < PAGE_SIZE.
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
---
include/linux/iomap.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index f49767c7fd83..6511124e58b6 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -128,7 +128,8 @@ struct iomap_page {
static inline struct iomap_page *to_iomap_page(struct page *page)
{
- if (page_has_private(page))
+ if (i_blocksize(page->mapping->host) < PAGE_SIZE &&
+ page_has_private(page))
return (struct iomap_page *)page_private(page);
return NULL;
}
--
2.16.4
next prev parent reply other threads:[~2019-06-21 19:28 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-21 19:28 [PATCH 0/6] Btrfs iomap Goldwyn Rodrigues
2019-06-21 19:28 ` [PATCH 1/6] iomap: Use a IOMAP_COW/srcmap for a read-modify-write I/O Goldwyn Rodrigues
2019-06-22 0:46 ` Darrick J. Wong
2019-06-25 19:17 ` Goldwyn Rodrigues
2019-06-26 6:21 ` Christoph Hellwig
2019-06-24 7:07 ` Christoph Hellwig
2019-06-25 19:14 ` Goldwyn Rodrigues
2019-06-26 1:36 ` Shiyang Ruan
2019-06-26 6:39 ` Christoph Hellwig
2019-06-26 16:10 ` Goldwyn Rodrigues
2019-06-26 17:34 ` Darrick J. Wong
2019-06-26 18:00 ` Darrick J. Wong
2019-06-26 18:42 ` Goldwyn Rodrigues
2019-06-21 19:28 ` [PATCH 2/6] iomap: Read page from srcmap for IOMAP_COW Goldwyn Rodrigues
2019-06-22 0:41 ` Darrick J. Wong
2019-06-21 19:28 ` Goldwyn Rodrigues [this message]
2019-06-22 0:21 ` [PATCH 3/6] iomap: Check iblocksize before transforming page->private Darrick J. Wong
2019-06-25 19:22 ` Goldwyn Rodrigues
2019-06-24 7:05 ` Christoph Hellwig
2019-06-25 18:56 ` Goldwyn Rodrigues
2019-06-25 20:04 ` Filipe Manana
2019-06-26 3:03 ` Goldwyn Rodrigues
2019-06-26 6:42 ` Nikolay Borisov
2019-06-26 6:16 ` Christoph Hellwig
2019-06-21 19:28 ` [PATCH 4/6] btrfs: Add a simple buffered iomap write Goldwyn Rodrigues
2019-06-21 19:28 ` [PATCH 5/6] btrfs: Add CoW in iomap based writes Goldwyn Rodrigues
2019-06-21 19:28 ` [PATCH 6/6] btrfs: remove buffered write code made unnecessary Goldwyn Rodrigues
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190621192828.28900-4-rgoldwyn@suse.de \
--to=rgoldwyn@suse.de \
--cc=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=hch@lst.de \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=rgoldwyn@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).