Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp421667ybe; Wed, 4 Sep 2019 01:44:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxiLWf3GBM77D0OcgvoQuQYbBgIBDfhUgb0/H2fUzryEP2VBgJ7X5R31fmJT/2XcnsJydZm X-Received: by 2002:a62:2d3:: with SMTP id 202mr32126895pfc.141.1567586642828; Wed, 04 Sep 2019 01:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567586642; cv=none; d=google.com; s=arc-20160816; b=q5TQMh7NHzyRK+U4GER7OnQNDG8fjSaXsYPD+WlcSefhCfEJXuPPPtylVd3xGXoxWL HJ4Xb3ypkLhy91LTcQ3hTCwdw/tDS84vD5XX47RFAvI7Nz6LslGbXjWSD+6FMlGZz03G uq/hoiyvuFGTjpVSkEOxrvK3NljKo2KE2PoeV19EmVvp2+hxmoJZvI6SKf2o/vWvMgLt HSnAw/uZzYI65LV6tpWI26iv8dQvlbc18STxGZETUWMgIZ6HHXpTD/yLQoWoJNhb6jQ3 3bu/voLahc/kUwfwCVPxWQpTbp2+uzs73J75JSvJgL0UM/llbL52a8v6JaygQUK+50Rv sdsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:cc:references:to:subject; bh=l955UG57RcRzZn5YuPRx2C7ey91tMiw9aGhthKsUd74=; b=rQhhRuHzZj+z8U38ml1OQCKbK/zSj1BQqNjOHI7R0AROGgxvtj5dE2BVRr4BPYpMeC Y9Pf+xhYsqUQMg9iOv0xPc+4I+G579GAasjGK4i0AolDFRu+0fBb8utfcGr3gxw9g6Ak 8m0ebx2a6HMI0L7Wv0/TacCQQwK7w2bERxZu94VPm5bbWIF4sIhQ4AbhWBZLvI0DqAGm zJ+JOhxWLfAXnqbUm3+6m9w+W6MlTt7LPmXQ+lpx6jcimZYv8ukfoFoJ7oX6it8asGaC 2qg8N80rMnAEAIghvPJSTGuqJVU0F2USG6pIP/GLXtC9Jo8T9xWZtob1hdsxWm5lcAwj w8Ow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s3si16472625pgq.392.2019.09.04.01.43.47; Wed, 04 Sep 2019 01:44:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729129AbfIDIlL (ORCPT + 99 others); Wed, 4 Sep 2019 04:41:11 -0400 Received: from mail5.windriver.com ([192.103.53.11]:45074 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728598AbfIDIlL (ORCPT ); Wed, 4 Sep 2019 04:41:11 -0400 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id x848dwSc017399 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 4 Sep 2019 01:40:25 -0700 Received: from [128.224.162.188] (128.224.162.188) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.3.468.0; Wed, 4 Sep 2019 01:39:52 -0700 Subject: Re: Bug?: unlink cause btrfs error but other fs don't To: , , Nikolay Borisov References: <49edadc4-9191-da89-3e3b-ca495f582a4d@windriver.com> CC: From: "Hongzhi, Song" Message-ID: Date: Wed, 4 Sep 2019 16:39:49 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <49edadc4-9191-da89-3e3b-ca495f582a4d@windriver.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [128.224.162.188] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Nikolay, > There were multiple fixes from Josef recently improving btrfs enospc handling with tiny filesystems (which is generally not the targeted use case of btrfs). The code lives in https://github.com/kdave/btrfs-devel/commits/misc-next should you want to test it. Otherwise re-test after next merge windows when those patches are supposed to be merged for 5.4 > Thank for your reply, I will keep eyes on the branch. ps: this email is my simply testcase from ltp --Hongzhi On 9/4/19 4:02 PM, Hongzhi, Song wrote: > Hi , > > > *Kernel:* > >     After v5.2-rc1, qemux86-64 > >     make -j40 ARCH=x86_64 CROSS_COMPILE=x86-64-gcc >     use qemu to bootup kernel > > > *Reproduce:* > >     There is a test case failed on btrfs but success on other > fs(ext4,ext3), see attachment. > > >     Download attachments: > >         gcc test.c -o myout -Wall -lpthread > >         copy myout and run.sh to your qemu same directory. > >         on qemu: > >             ./run.sh > > >     I found the block device size with btrfs set 512M will cause the > error. >     256M and 1G all success. > > > *Error info:* > >     "BTRFS warning (device loop0): could not allocate space for a > delete; will truncate on mount" > > > *Related patch:* > >     I use git bisect to find the following patch introduces the issue. > >     commit c8eaeac7b734347c3afba7008b7af62f37b9c140 >     Author: Josef Bacik >     Date:   Wed Apr 10 15:56:10 2019 -0400 > >         btrfs: reserve delalloc metadata differently >         ... > > > Anyone's reply will be appreciated. > > --Hongzhi >