* iomap: use SECTOR_SIZE instead of 512 in iomap_page definition
@ 2019-10-15 15:39 Eric Sandeen
2019-10-15 15:52 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2019-10-15 15:39 UTC (permalink / raw)
To: fsdevel; +Cc: Darrick J. Wong, Christoph Hellwig, linux-xfs
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)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: iomap: use SECTOR_SIZE instead of 512 in iomap_page definition
2019-10-15 15:39 iomap: use SECTOR_SIZE instead of 512 in iomap_page definition Eric Sandeen
@ 2019-10-15 15:52 ` Christoph Hellwig
2019-10-15 16:16 ` Matthew Wilcox
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2019-10-15 15:52 UTC (permalink / raw)
To: Eric Sandeen; +Cc: fsdevel, Darrick J. Wong, Christoph Hellwig, linux-xfs
On Tue, Oct 15, 2019 at 10:39:36AM -0500, Eric Sandeen wrote:
> 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.
Note that the iomap writepage series, which is hopefully about to be
merged moves this declaration around.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: iomap: use SECTOR_SIZE instead of 512 in iomap_page definition
2019-10-15 15:52 ` Christoph Hellwig
@ 2019-10-15 16:16 ` Matthew Wilcox
2019-10-15 16:19 ` Eric Sandeen
0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2019-10-15 16:16 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Eric Sandeen, fsdevel, Darrick J. Wong, linux-xfs
On Tue, Oct 15, 2019 at 08:52:24AM -0700, Christoph Hellwig wrote:
> On Tue, Oct 15, 2019 at 10:39:36AM -0500, Eric Sandeen wrote:
> > 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.
>
> Note that the iomap writepage series, which is hopefully about to be
> merged moves this declaration around.
... and the support-multiple-page-sizes patches make it dynamically
allocated ;-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: iomap: use SECTOR_SIZE instead of 512 in iomap_page definition
2019-10-15 16:16 ` Matthew Wilcox
@ 2019-10-15 16:19 ` Eric Sandeen
0 siblings, 0 replies; 4+ messages in thread
From: Eric Sandeen @ 2019-10-15 16:19 UTC (permalink / raw)
To: Matthew Wilcox, Christoph Hellwig
Cc: Eric Sandeen, fsdevel, Darrick J. Wong, linux-xfs
On 10/15/19 11:16 AM, Matthew Wilcox wrote:
> On Tue, Oct 15, 2019 at 08:52:24AM -0700, Christoph Hellwig wrote:
>> On Tue, Oct 15, 2019 at 10:39:36AM -0500, Eric Sandeen wrote:
>>> 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.
>>
>> Note that the iomap writepage series, which is hopefully about to be
>> merged moves this declaration around.
>
> ... and the support-multiple-page-sizes patches make it dynamically
> allocated ;-)
>
*sigh* obviously I'm not keeping up.
Thanks,
-Eric
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-15 16:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-15 15:39 iomap: use SECTOR_SIZE instead of 512 in iomap_page definition Eric Sandeen
2019-10-15 15:52 ` Christoph Hellwig
2019-10-15 16:16 ` Matthew Wilcox
2019-10-15 16:19 ` Eric Sandeen
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).