Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp21876ybl; Mon, 12 Aug 2019 11:02:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxl+hYr19m/GcMoxX7/zN+eo2P7yVOnOMac9U3fm368SzlydjaC35NJYOYgCedO6Q740/1X X-Received: by 2002:a17:902:449:: with SMTP id 67mr34953778ple.105.1565632928949; Mon, 12 Aug 2019 11:02:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565632928; cv=none; d=google.com; s=arc-20160816; b=ftFeFNSsGOsAHg1PXKhH3kdxVn4hYeZUBdnf+vHvS+GCiNz4YoZnipG/kFR8wBNCwV Vw8IHXZKZTbfAPo9m6tPm1vXIG7VzWfQpDvGGJT4ZTXB0sj6kS/kEYoyw+Ur/OL3c/Q1 3ZkbiBPYH2pwyRoVoDBUKL1cGRsLCzJfTFIF0JP3k2vPpp+tlekO47ocj78BprnnFDvF O6ECdlhThRR7YXWDqH3g61/UN4cie2cx/qfW0uO+m4IRjbEvtQ416NzMr0qJKNIMLm8B QC/ZgdfXDqYoxUcYeVJ4Sr/v/+RR7mEWU1txDIV3NXoIHu39hfsOj3SWNh95Kuzj5Qt3 Ka/A== 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=SpR33d2xzwUDdFWQxivcf8j1puHm0/0KgNGZt/ohDRw=; b=K7vU2Yaei/BBb/n1ld2Aj91R5xgVsPDdDrLfrLOXehu4TuZ/NdUYFYTG/YeJN+Ghev UAc5lTRpG5O+eibRsqDzC5WIDHHViCxfbVVYJRXcWjDHICpOjV8clYmAo1uMhRXWPs71 8qRfjPdFpa+Ih8EWeKmfVW3c60keE3Nt8P2DCCUbMQOUpjpVB72Z3nRt4osQBCDrEDqS 0KYm5OL8yT+uIKIXrXROAEAKzYpS1sqQrU/4z8eqkUkYzUPrsgoZStJ9K34xGWmI+bQY ktw6VScUAxrdb1zyCq12HpR2I/DJPptOUVbqpXT6XIYkZicYDkxgde0DWjZ0ydS6lOqc m7IQ== 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 h17si4742155pfo.210.2019.08.12.11.01.54; Mon, 12 Aug 2019 11:02:08 -0700 (PDT) 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 S1726527AbfHLSBN (ORCPT + 99 others); Mon, 12 Aug 2019 14:01:13 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:49625 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726219AbfHLSBN (ORCPT ); Mon, 12 Aug 2019 14:01:13 -0400 Received: from callcc.thunk.org (guestnat-104-133-9-109.corp.google.com [104.133.9.109] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x7CI16QP027591 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 12 Aug 2019 14:01:08 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 6C9184218EF; Mon, 12 Aug 2019 14:01:06 -0400 (EDT) Date: Mon, 12 Aug 2019 14:01:06 -0400 From: "Theodore Y. Ts'o" To: harshad shirwadkar Cc: Andreas Dilger , Ext4 Developers List Subject: Re: [PATCH v2 05/12] jbd2: fast-commit commit path new APIs Message-ID: <20190812180106.GB28705@mit.edu> References: <20190809034552.148629-1-harshadshirwadkar@gmail.com> <20190809034552.148629-6-harshadshirwadkar@gmail.com> <20190812160445.GA28705@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Mon, Aug 12, 2019 at 10:41:48AM -0700, harshad shirwadkar wrote: > I see, so you mean each fsync() call will result in exactly one inode > to be committed (the inode on which fsync was called), right? I agree > this doesn't need to go through JBD2 but we need a mechanism to inform > JBD2 about this fast commit since JBD2 maintains sub-transaction ID. > JBD2 will in turn need to make sure that a subtid was allocated for > such a fast commit and it was incremented once the fast commit was > successful as well. Why does JBD2 need to maintain the sub-transaction ID? We can only have a single fast commit happening at a time, and while a fast commit is happening we can't allow a full commit from happening (or vice versa). So we need a mutex which enforces this, the transaction id can just be a field in the transaction structure. Cheers, - Ted