On 12/11/19 10:19 AM, Matthew Wilcox wrote: > On Wed, Dec 11, 2019 at 08:29:43AM -0700, Jens Axboe wrote: >> @@ -670,9 +675,14 @@ iomap_write_begin(struct inode *inode, loff_t pos, unsigned len, unsigned flags, >> iomap_read_inline_data(inode, page, srcmap); >> else if (iomap->flags & IOMAP_F_BUFFER_HEAD) >> status = __block_write_begin_int(page, pos, len, NULL, srcmap); >> - else >> - status = __iomap_write_begin(inode, pos, len, flags, page, >> + else { >> + unsigned wb_flags = 0; >> + >> + if (flags & IOMAP_UNCACHED) >> + wb_flags = IOMAP_WRITE_F_UNCACHED; >> + status = __iomap_write_begin(inode, pos, len, wb_flags, page, >> srcmap); > > I think if you do an uncached write to a currently shared extent, you > just lost the IOMAP_WRITE_F_UNSHARE flag? Oops good catch, I'll fix that up. -- Jens Axboe