From patchwork Wed Mar 14 14:48:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikolay Borisov X-Patchwork-Id: 10282345 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DAFF960211 for ; Wed, 14 Mar 2018 14:48:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBBA9289B1 for ; Wed, 14 Mar 2018 14:48:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C07E4289B4; Wed, 14 Mar 2018 14:48:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D6A7289B1 for ; Wed, 14 Mar 2018 14:48:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751420AbeCNOsp (ORCPT ); Wed, 14 Mar 2018 10:48:45 -0400 Received: from mx2.suse.de ([195.135.220.15]:36728 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751381AbeCNOsp (ORCPT ); Wed, 14 Mar 2018 10:48:45 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B3478ACBB; Wed, 14 Mar 2018 14:48:43 +0000 (UTC) From: Nikolay Borisov To: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org Cc: Nikolay Borisov Subject: [PATCH] generic/015: Issue sync after deleting the fillup file Date: Wed, 14 Mar 2018 16:48:37 +0200 Message-Id: <1521038917-20863-1-git-send-email-nborisov@suse.com> X-Mailer: git-send-email 2.7.4 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This test fails on btrfs due to the presence of delayed processing of file deletes if the file is smaller than 32mb. Initially commit 97575acd7495b412435d06229a6d94ed9a814ada tried to fix a similar failure by bumping the size of the filesystem. However that change had a knock-on effect in that the scratch filesystem created is larger than 100mb and thus not created in mixed mode. This in turn causes the fs to have only 20mb for file data (rest is taken by DUP metadata). Naturally, this leads to file freeing taking up to "transaction commit interval" (default 30 s) time to properly account the freed space. Not standards define when unlink operations should be accounted so btrfs is well within its right to be implemented in that way. So to avoid this edge case just issue a sync before taking the 2nd free space reading. Signed-off-by: Nikolay Borisov --- tests/generic/015 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/generic/015 b/tests/generic/015 index bdae86dd..cb7252b9 100755 --- a/tests/generic/015 +++ b/tests/generic/015 @@ -115,6 +115,8 @@ fi echo "check free space:" +sync + free2=`_free` if [ -z "$free2" ] then