Hi, On Tue, Aug 25, 2020 at 11:20 AM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote: > > On Tue, Aug 25, 2020 at 10:26:14AM +0100, Yuxuan Shui wrote: > > Hi, > > > > Do we actually want to fix this bug or not? There are a number of > > people actually seeing this bug. > > bmap should not succeed for unwritten extents. Why not? Unwritten extents are still allocated extents. > > > If you think this is not the right fix, what do you think we should > > do? If the correct fix is to make ext4 use iomap_swapfile_activate, > > maybe we should CC the ext4 people too? > > Yes, ext4 should use iomap_swapfile_activate. OK, let me CC the ext4 people. Context: https://bugzilla.kernel.org/show_bug.cgi?id=207585 > commit ac58e4fb03f9d111d733a4ad379d06eef3a24705 moved ext4_bmap from > generic_block_bmap to iomap_bmap, this introduced a regression which > prevents some user from using previously working swapfiles. The kernel > will complain about holes while there are none. > What is happening here is that the swapfile has unwritten mappings, > which is rejected by iomap_bmap, but was accepted by ext4_get_block. -- Regards Yuxuan Shui