linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: fsdevel <linux-fsdevel@vger.kernel.org>
Cc: "Darrick J. Wong" <darrick.wong@oracle.com>,
	Christoph Hellwig <hch@infradead.org>,
	linux-xfs <linux-xfs@vger.kernel.org>
Subject: iomap: use SECTOR_SIZE instead of 512 in iomap_page definition
Date: Tue, 15 Oct 2019 10:39:36 -0500	[thread overview]
Message-ID: <123556d7-968c-70a6-1049-38b2f279f5a1@redhat.com> (raw)

iomap_page_create() initializes the uptodate bitmap using the SECTOR_SIZE
macro, so use that in the definition as well, for consistency and safety.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

Last time there was a concern about pulling in blkdev.h just for this,
but that's already been done now, so try again.

diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 7aa5d6117936..9cd1db007a0d 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -139,7 +139,7 @@ loff_t iomap_apply(struct inode *inode, loff_t pos, loff_t length,
 struct iomap_page {
 	atomic_t		read_count;
 	atomic_t		write_count;
-	DECLARE_BITMAP(uptodate, PAGE_SIZE / 512);
+	DECLARE_BITMAP(uptodate, PAGE_SIZE / SECTOR_SIZE);
 };
 
 static inline struct iomap_page *to_iomap_page(struct page *page)


             reply	other threads:[~2019-10-15 15:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 15:39 Eric Sandeen [this message]
2019-10-15 15:52 ` iomap: use SECTOR_SIZE instead of 512 in iomap_page definition Christoph Hellwig
2019-10-15 16:16   ` Matthew Wilcox
2019-10-15 16:19     ` Eric Sandeen

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=123556d7-968c-70a6-1049-38b2f279f5a1@redhat.com \
    --to=sandeen@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /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).