Skip to content

Commit 8e1bcef

Browse files
Andreas GruenbacherDarrick J. Wong
authored andcommitted
iomap: Permit pages without an iop to enter writeback
Create an iop in the writeback path if one doesn't exist. This allows us to avoid creating the iop in some cases. We'll initially do that for pages with inline data, but it can be extended to pages which are entirely within an extent. It also allows for an iop to be removed from pages in the future (eg page split). Co-developed-by: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent 49694d1 commit 8e1bcef

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/iomap/buffered-io.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,14 +1304,13 @@ iomap_writepage_map(struct iomap_writepage_ctx *wpc,
13041304
struct writeback_control *wbc, struct inode *inode,
13051305
struct page *page, u64 end_offset)
13061306
{
1307-
struct iomap_page *iop = to_iomap_page(page);
1307+
struct iomap_page *iop = iomap_page_create(inode, page);
13081308
struct iomap_ioend *ioend, *next;
13091309
unsigned len = i_blocksize(inode);
13101310
u64 file_offset; /* file offset of page */
13111311
int error = 0, count = 0, i;
13121312
LIST_HEAD(submit_list);
13131313

1314-
WARN_ON_ONCE(i_blocks_per_page(inode, page) > 1 && !iop);
13151314
WARN_ON_ONCE(iop && atomic_read(&iop->write_bytes_pending) != 0);
13161315

13171316
/*

0 commit comments

Comments
 (0)