On 2018/11/5 上午1:00, Sebastian Ochmann wrote:
> Thank you very much for the quick reply.
> 
> On 04.11.18 14:37, Qu Wenruo wrote:
>>
>>
>> On 2018/11/4 下午9:15, Sebastian Ochmann wrote:
>>> Hello,
>>>
>>> I have a btrfs filesystem on a single encrypted (LUKS) 10 TB drive which
>>> stopped working correctly. The drive is used as a backup drive with zstd
>>> compression to which I regularly rsync and make daily snapshots. After I
>>> routinely removed a bunch of snapshots (about 20), I noticed later that
>>> the machine would hang when trying to unmount the filesystem. The
>>> current state is that I'm able to mount the filesystem without errors
>>> and I can view (ls) files in the root level, but trying to view contents
>>> of directories contained therein hangs just like when trying to unmount
>>> the filesystem. I have not yet tried to run check, repair, etc. Do you
>>> have any advice what I should try next?
>>
>> Could you please run "btrfs check" on the umounted fs?
> 
> I ran btrfs check on the unmounted fs and it reported no errors.

Great, then it's completely free space cache causing the problem.

You could use -o nospace_cache mount option to avoid the problem as a
workaround.

Free space cache only speed up free extent search, it doesn't has extra
effect on the fs (except the bug).
So you could disable free space cache without problem.

Thanks,
Qu
> 
[snip]
>> This looks pretty like this bug which should be fixed by the following
>> patch:
>>
>> https://patchwork.kernel.org/patch/10654433/
>>
>> If previous "btrfs check" shows no error, would you please try apply
>> that patch and try again?
> 
> I tried applying the patch to the 4.18.16 kernel I was running and it
> didn't apply cleanly, so I thought maybe I'd update to 4.19.0 first
> (which is already in the Arch testing repos) and then try applying the
> patch to that.
> 
> However, as it turns out, the fs now works again just by using 4.19.0
> even though I think the patch is not even in 4.19 yet (?). I'm able to
> navigate the directories and unmounting also works fine. Even after
> downgrading to 4.18.16, the fs still works.
> 
> So, thanks again for the quick reply, and "sorry" for not being able to
> test this particular patch now, but I guess the problem has been resolved.
> 
>> Thanks,
>> Qu
>>
> 
> Thanks,
> Ochi

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to