Re: [PATCH stable-5.4 6/6] btrfs: allow btrfs_truncate_block() to fallback to nocow for data space reservation

2020-10-09 Thread Greg KH
On Thu, Oct 08, 2020 at 06:59:54PM +0800, Anand Jain wrote: > From: Qu Wenruo > > commit 6d4572a9d71d5fc2affee0258d8582d39859188c upstream. > > [BUG] > When the data space is exhausted, even if the inode has NOCOW attribute, > we will still refuse to truncate unaligned range due to ENOSPC. > >

[PATCH stable-5.4 6/6] btrfs: allow btrfs_truncate_block() to fallback to nocow for data space reservation

2020-10-08 Thread Anand Jain
From: Qu Wenruo commit 6d4572a9d71d5fc2affee0258d8582d39859188c upstream. [BUG] When the data space is exhausted, even if the inode has NOCOW attribute, we will still refuse to truncate unaligned range due to ENOSPC. The following script can reproduce it pretty easily: #!/bin/bash dev=/dev