Filipe Manana wrote on Thu, Jun 30, 2022 at 04:10:38PM +0100: > This may prevent the short reads (not tested yet): > > diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c > index 7a54f964ff37..42fb56ed0021 100644 > --- a/fs/btrfs/inode.c > +++ b/fs/btrfs/inode.c > @@ -7684,7 +7684,7 @@ static int btrfs_dio_iomap_begin(struct inode *inode, loff_t start, > if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags) || > em->block_start == EXTENT_MAP_INLINE) { > free_extent_map(em); > - ret = -ENOTBLK; > + ret = (flags & IOMAP_NOWAIT) ? -EAGAIN : -ENOTBLK; > goto unlock_err; > } > > Can you give it a try? This appears to do the trick! I've also removed the first patch and still cannot see any short reads, so this would be enough on its own for my case. -- Dominique