iomap: Support arbitrarily many blocks per page
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 21 Sep 2020 15:58:40 +0000 (08:58 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 21 Sep 2020 15:59:26 +0000 (08:59 -0700)
commit0a195b91e8991367a94ee199f3af7faa7607e7db
tree25e7c055e0621e64a0e09479cd505dd1a6083168
parentb21866f514cb50bd75614851a8d066398a114cab
iomap: Support arbitrarily many blocks per page

Size the uptodate array dynamically to support larger pages in the
page cache.  With a 64kB page, we're only saving 8 bytes per page today,
but with a 2MB maximum page size, we'd have to allocate more than 4kB
per page.  Add a few debugging assertions.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/iomap/buffered-io.c