Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp656467pxb; Tue, 3 Nov 2020 09:02:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/8ZfoKQGZQPKQAei7nvGvgWMdy/gv3KMiN8F0zQ0Y5XLHtFgeVPE1Ja1kFuiE7cyEUGfD X-Received: by 2002:a2e:9c85:: with SMTP id x5mr9129199lji.92.1604422962680; Tue, 03 Nov 2020 09:02:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604422962; cv=none; d=google.com; s=arc-20160816; b=C9geD0B9JEKFEgRf2p1rPI/G0dYwC5u4q16pqJPirXl+OURSBK1ZRqf+C0nSFiyi7F 93+1e2TYOy6YX+n/VvVA1jvxFZ7wxSgJufFk+lIdcvmk4O3FqQhIuvz3QkP6i0I1VyoJ PYLuLQblbCbbvfEk2mlEPGJI/l4iT8vONgWn0aB3iYNeuGwckNcfHW866bN66wQ0sj3h M2UC4oSvyB/+igc8q/8MCchqJdtGfHTUi9G/sgXMWWuDV7j6U+DTO9c5fA6OT7eVN7lb pHMqlm30CshjuXMG3ZwuJjdBbcvw8xbatCU0JwJW4LZTuIa9AQII+aR6iHqC3pF/0X5q 56lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=/8vi7jRJwbhvjpq8fe4qrI0UQf91UWAo7nGTwdIMefI=; b=IC76Y9hrWudLknZVeKO92X+89SScten9VPW8CGtPNblJzthzemaB4JV3mgPjh4tHNM W0N3zHTlxlhpdt7vcQNF1GtfO3mkpGzp10wDXNw+g/VxYN9VR/HoprtcQ86AnE6PwcpS FIlH3oCHQRpN+i1Gw24v/aMFiGOiUj8CJocwBw+MScUNJijC1Q9ZF7kQj+hgIH6xF6lN +TSwyplcAgvBxxlz+tsSRi24QMiXqbHHI5slOrrmeF4yveHGJSjJWUhILriTuRUOl+jW 6rfUrWaN1lL5Gt0PCkuIkdalaa4gJ6kW7/yjLWXcAC/NC1Kh+9fgJ01LEDu9TdtPiFYf IadA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u13si8763583lfg.323.2020.11.03.09.02.13; Tue, 03 Nov 2020 09:02:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728415AbgKCRCK (ORCPT + 99 others); Tue, 3 Nov 2020 12:02:10 -0500 Received: from mx2.suse.de ([195.135.220.15]:39158 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728206AbgKCRCK (ORCPT ); Tue, 3 Nov 2020 12:02:10 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 1B44EAD73; Tue, 3 Nov 2020 17:02:09 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 9D1A81E12FB; Tue, 3 Nov 2020 18:02:08 +0100 (CET) Date: Tue, 3 Nov 2020 18:02:08 +0100 From: Jan Kara To: Harshad Shirwadkar Cc: linux-ext4@vger.kernel.org, tytso@mit.edu, jack@suse.cz Subject: Re: [PATCH 10/10] ext4: issue fsdev cache flush before starting fast commit Message-ID: <20201103170208.GN3440@quack2.suse.cz> References: <20201031200518.4178786-1-harshadshirwadkar@gmail.com> <20201031200518.4178786-11-harshadshirwadkar@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201031200518.4178786-11-harshadshirwadkar@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Sat 31-10-20 13:05:18, Harshad Shirwadkar wrote: > If the journal dev is different from fsdev, issue a cache flush before > committing fast commit blocks to disk. > > Suggested-by: Jan Kara > Signed-off-by: Harshad Shirwadkar The patch looks good to me. You can add: Reviewed-by: Jan Kara Honza > --- > fs/ext4/fast_commit.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c > index 9ae8ba213961..facf2f59b895 100644 > --- a/fs/ext4/fast_commit.c > +++ b/fs/ext4/fast_commit.c > @@ -996,6 +996,13 @@ static int ext4_fc_perform_commit(journal_t *journal) > if (ret) > return ret; > > + /* > + * If file system device is different from journal device, issue a cache > + * flush before we start writing fast commit blocks. > + */ > + if (journal->j_fs_dev != journal->j_dev) > + blkdev_issue_flush(journal->j_fs_dev, GFP_NOFS); > + > blk_start_plug(&plug); > if (sbi->s_fc_bytes == 0) { > /* > -- > 2.29.1.341.ge80a0c044ae-goog > -- Jan Kara SUSE Labs, CR