Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1229994ybl; Tue, 3 Dec 2019 03:59:15 -0800 (PST) X-Google-Smtp-Source: APXvYqwBu5zVv7H90UujMi1QobFWQg5DxuLNIRTQPm2Fs/ugYKw6iEiQcFO2SuuYDmZn7cVA1F59 X-Received: by 2002:a05:6808:2d0:: with SMTP id a16mr3024406oid.149.1575374355035; Tue, 03 Dec 2019 03:59:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575374355; cv=none; d=google.com; s=arc-20160816; b=kj9D1dRrv69Hj72C1cJ5rPLmlM83wTRmVAr3EDo8TOfuBZ4pWHa3/N/ewMRH/L2kMS or6sp72h+Kzt5QF6s+GQBxWi+nOXHDK90RsdXilYa8vGNefLFZMbapSU9Rr4179CCU9X ZUXnBVGbX68uBw92tOnLUMn9edvm2V0zQ3+X2RGEMEqa7PaGBlrggTnmAyXvBVelY6in OQcWNPWLwhdtCIpWWDtKEu/QGQ8Ba2ZwYRFE48VlkxVE63dw7iiFCEEQS28fxGwualVC VsbMOdevMiYWh6Fg5rFPhdVJNYGkui6PSxqcfT8fdlMipXT+MII/B+965Dy+Qdp5NtDB 4zFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=d1qis7+JcAmtFy8uj81iDKwC6qrzHXC6vH/8HNEYBMQ=; b=iN+BQIInOqWf6WDY8TFnBADdRNktnRNJKCEECdbOV7aaOUkbW0+/Eb3sXAuu3sCXXj fnMxAjzFPE4MaS1KMAcCw2tpM6BWiE81l65ygJsdQa0DTsWROmrJPQUAnSKgXsNNtx/H i7TOzGqlwhzcjrIhoHPXOpEzRoKIKZgv6Q+RIVIQbiKp+LJpJi8nEsdPLoAYb3P7o6Vm 46WKDLiupkgPHuP2/LbN4lY8BuLCV2cMJXMPnRlL406ICV1J6g9VbqO/jrv4rKa7/KBR l4MT9W12NMa3xruVTsZHa328eJUW85wi2THhSidnfObQm9oM1VEgA7Lf9UIliJBvqLol HVxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 z17si1110587oih.192.2019.12.03.03.59.02; Tue, 03 Dec 2019 03:59:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725997AbfLCL7C (ORCPT + 99 others); Tue, 3 Dec 2019 06:59:02 -0500 Received: from mx2.suse.de ([195.135.220.15]:57426 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725773AbfLCL7C (ORCPT ); Tue, 3 Dec 2019 06:59:02 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 616E9AC93; Tue, 3 Dec 2019 11:59:00 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id ECCD41E0B7B; Tue, 3 Dec 2019 12:58:59 +0100 (CET) Date: Tue, 3 Dec 2019 12:58:59 +0100 From: Jan Kara To: "zhangyi (F)" Cc: linux-ext4@vger.kernel.org, jack@suse.com, tytso@mit.edu, adilger.kernel@dilger.ca, liangyun2@huawei.com, luoshijie1@huawei.com Subject: Re: [PATCH v2 1/4] jbd2: switch to use jbd2_journal_abort() when failed to submit the commit record Message-ID: <20191203115859.GB8206@quack2.suse.cz> References: <20191203092756.26129-1-yi.zhang@huawei.com> <20191203092756.26129-2-yi.zhang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191203092756.26129-2-yi.zhang@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue 03-12-19 17:27:53, zhangyi (F) wrote: > We invloke jbd2_journal_abort() to abort the journal and record errno > in the jbd2 superblock when committing journal transaction besides the > failure on submitting the commit record. But there is no need for the > case and we can also invloke jbd2_journal_abort() instead of ^^^ invoke > __jbd2_journal_abort_hard(). > > Fixes: 818d276ceb83a ("ext4: Add the journal checksum feature") > Signed-off-by: zhangyi (F) Besides the spelling fix the patch looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > fs/jbd2/commit.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c > index 132fb92098c7..87b88d910306 100644 > --- a/fs/jbd2/commit.c > +++ b/fs/jbd2/commit.c > @@ -785,7 +785,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) > err = journal_submit_commit_record(journal, commit_transaction, > &cbh, crc32_sum); > if (err) > - __jbd2_journal_abort_hard(journal); > + jbd2_journal_abort(journal, err); > } > > blk_finish_plug(&plug); > @@ -876,7 +876,7 @@ void jbd2_journal_commit_transaction(journal_t *journal) > err = journal_submit_commit_record(journal, commit_transaction, > &cbh, crc32_sum); > if (err) > - __jbd2_journal_abort_hard(journal); > + jbd2_journal_abort(journal, err); > } > if (cbh) > err = journal_wait_on_commit_record(journal, cbh); > -- > 2.17.2 > -- Jan Kara SUSE Labs, CR