From patchwork Tue Oct 6 09:38:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 7334131 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 598D1BEEA4 for ; Tue, 6 Oct 2015 09:40:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9199D2065A for ; Tue, 6 Oct 2015 09:40:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9784820658 for ; Tue, 6 Oct 2015 09:40:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752518AbbJFJkF (ORCPT ); Tue, 6 Oct 2015 05:40:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:36808 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752166AbbJFJjr (ORCPT ); Tue, 6 Oct 2015 05:39:47 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 5406BABDB; Tue, 6 Oct 2015 09:39:45 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id EAE77DAA8E; Tue, 6 Oct 2015 11:38:41 +0200 (CEST) From: David Sterba To: linux-btrfs@vger.kernel.org Cc: David Sterba , Zhao Lei Subject: [PATCH] btrfs-progs: subvol sync: fix reversed condition Date: Tue, 6 Oct 2015 11:38:40 +0200 Message-Id: <1444124320-6132-1-git-send-email-dsterba@suse.com> X-Mailer: git-send-email 2.1.3 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In my local change to 07cc891d1d9819d5cf0628af555e7727d289cf7b ("btrfs-progs: Simplify all-subvolumn-clean condition for wait_for_subvolume_cleaning") that reversed the meaning of the variable dirty -> clean, I made a mistake and broke 'subvol sync' that will not wait as expected and ends prematurely. Zhao Lei's original patch worked. CC: Zhao Lei Signed-off-by: David Sterba --- cmds-subvolume.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds-subvolume.c b/cmds-subvolume.c index 82173c0489a9..6f8675657417 100644 --- a/cmds-subvolume.c +++ b/cmds-subvolume.c @@ -89,7 +89,7 @@ static int wait_for_subvolume_cleaning(int fd, int count, u64 *ids, clean = 0; } } - if (clean == 0) + if (clean == 1) break; sleep(sleep_interval); }