Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2015950pxb; Thu, 11 Feb 2021 01:58:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4ChePN+S4El/MrX1BV1gWfG3pGUag3afYbE310eSaxOmucopHJ5gcEYJ7lLXwrKIm5vaT X-Received: by 2002:a17:906:24d1:: with SMTP id f17mr7657024ejb.503.1613037485698; Thu, 11 Feb 2021 01:58:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613037485; cv=none; d=google.com; s=arc-20160816; b=kBK2V9CXAyXK636bdy0dEWktDzdLIc8SkmeYD/2hvqcDPosIPtj56WrPC6++UqIPe4 OTQGQuCzVJxB1VnsnuD8JtfdDGF10/cO+9NM9zU8slHIyGlHg1LClssrRgx2c2R4DizP eqvST6otlhNM2z4Rd6vB0br99l0wAmXZ6wOsaB8dTyw+6tC8NkZulrkIbd1wl2mHcwBZ 3kTg5zOncaLukLgSEq+UAzStQ5IDhoCE0C83Mr5LB71It0YnvACZKACxtMcmC2Tvaek6 X1mMcWA8ttoi9L2izvuGWGyhF0RtnvaWZFngsdnqhsTUiuxk9eWWD7S2kTkNL03cJnlM +alA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=k1lKjOaScuAwaUYe8IkB+BsOLS/2K8xbt39F9+wHb+g=; b=GoQYepjCXLNJWSCzZnzg50h7cfXtDI7Yn8r4IlBDJklslXH5RHUkTJ4G0i2cHZs/nu kXIOJSzmz6RfvVQ7DstrQQkDzs53Khbz6r2Bmwe8XRXsB3U0Z8ndBdpCwnlSxEQOm63i IRYHKNtWM+oAX7MrxuhT8Jf534g+Lz9WQAbxAlTx6+3WPxghT92I/ilbVHKPO3aWrvuw vcYRs/90tCzlIWKRrgAX2D5XcIpjY/APFegxKlY8CAmFBBzmnnsIfnfntnYIO8hOexOM ZHh+P1rM810tuOd849k0tnfrv4xoOdCMN0XhF9KHNWoRPt9Pm2JT6upAGHoDFkLaV/Qv khow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@tu-dortmund.de header.s=unimail header.b=dTBbDs5s; 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 q17si3451648eja.654.2021.02.11.01.57.41; Thu, 11 Feb 2021 01:58:05 -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; dkim=fail header.i=@tu-dortmund.de header.s=unimail header.b=dTBbDs5s; 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 S230106AbhBKJ5M (ORCPT + 99 others); Thu, 11 Feb 2021 04:57:12 -0500 Received: from mx1.hrz.uni-dortmund.de ([129.217.128.51]:36104 "EHLO unimail.uni-dortmund.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230144AbhBKJzL (ORCPT ); Thu, 11 Feb 2021 04:55:11 -0500 Received: from [192.168.111.113] (p4fd971d4.dip0.t-ipconnect.de [79.217.113.212]) (authenticated bits=0) by unimail.uni-dortmund.de (8.16.1/8.16.1) with ESMTPSA id 11B9rpY7010928 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT); Thu, 11 Feb 2021 10:53:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tu-dortmund.de; s=unimail; t=1613037232; bh=hEny8mHNdB5omE4FqgLpGkOemODjAlaz9MQDbNDOuec=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=dTBbDs5s2y2XfvCMZ+7qGnOL17EizipLyeD3HGWiyD3ozTYJHTdVO+ZBBnXpslzpg wKfAdlkMhLMfP29RU2Q2RQgukK5276up5IrV+wdZUTmOZ8z94kSI4YC4yQwrAFKrGc KK1rk0SjCG878UEMgR/924yv/PJUxPvZ2G5zf6XE= Subject: Re: [PATCH 1/2] Updated locking documentation for transaction_t To: Jan Kara Cc: Horst Schirmeier , "Theodore Ts'o" , Jan Kara , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210210095740.54881-1-alexander.lochmann@tu-dortmund.de> <20210210095740.54881-2-alexander.lochmann@tu-dortmund.de> <20210211093027.GI19070@quack2.suse.cz> From: Alexander Lochmann Message-ID: <1803ac43-d6fc-4de8-78a0-7fc807f9c036@tu-dortmund.de> Date: Thu, 11 Feb 2021 10:53:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210211093027.GI19070@quack2.suse.cz> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xR6At3BscXEfQMytnEQ6uJIgWbuzasC1X" Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xR6At3BscXEfQMytnEQ6uJIgWbuzasC1X Content-Type: multipart/mixed; boundary="b63HI2vDGUjw0rmQ83RumwUtZ7tnYQBbd"; protected-headers="v1" From: Alexander Lochmann To: Jan Kara Cc: Horst Schirmeier , Theodore Ts'o , Jan Kara , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <1803ac43-d6fc-4de8-78a0-7fc807f9c036@tu-dortmund.de> Subject: Re: [PATCH 1/2] Updated locking documentation for transaction_t References: <20210210095740.54881-1-alexander.lochmann@tu-dortmund.de> <20210210095740.54881-2-alexander.lochmann@tu-dortmund.de> <20210211093027.GI19070@quack2.suse.cz> In-Reply-To: <20210211093027.GI19070@quack2.suse.cz> --b63HI2vDGUjw0rmQ83RumwUtZ7tnYQBbd Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: quoted-printable On 11.02.21 10:30, Jan Kara wrote: >> */ >> unsigned long t_log_start; >> =20 >> - /* Number of buffers on the t_buffers list [j_list_lock] */ >> + /* Number of buffers on the t_buffers list [j_list_lock, no lock for= quick racy checks] */ >> int t_nr_buffers; >=20 > So this case is actually somewhat different now that I audited the uses= =2E > There are two types of users - commit code (fs/jbd2/commit.c) and other= s. > Other users properly use j_list_lock to access t_nr_buffers. Commit cod= e > does not use any locks because committing transaction is fully in > ownership of the jbd2 thread and all other users need to check & wait f= or > commit to be finished before doing anything with the transaction's buff= ers. Mhm I see. What about '[..., no locks needed for jbd2 thread]'? How do the others wait for the commit to be finished? - Alex --=20 Technische Universit=C3=A4t Dortmund Alexander Lochmann PGP key: 0xBC3EF6FD Otto-Hahn-Str. 16 phone: +49.231.7556141 D-44227 Dortmund fax: +49.231.7556116 http://ess.cs.tu-dortmund.de/Staff/al --b63HI2vDGUjw0rmQ83RumwUtZ7tnYQBbd-- --xR6At3BscXEfQMytnEQ6uJIgWbuzasC1X Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEElhZsUHzVP0dbkjCRWT7tBbw+9v0FAmAk/q8FAwAAAAAACgkQWT7tBbw+9v3Z ChAAhoUoJXxPDqGorG3wSL5TocAPktm+zk4lWB1iSWFFSnIW9tHPIt3BU3TU/3WNP59XGRPy52Qv uPY16Es7Newbojhiay3+ImfAJjWjepm6+F0On4QHzQO/vMw+1n8s03V32V6fVB10EbV59rsjD9TJ uDtSSNaogT8E9q5dQe/xDlmmPQGrN/J35YdPowYC7qof1gRQLBJfpHyQyzWb06lvt6mBNg75fC7l 7LfMnn6EqM5RdNva4DyfHPY7JaEkE9ktG3YnuPU5F3KvpE74luogqz5fC/CdZ7Kdv0Jv1Wi2X7AA /8dYb+d/zSLxtkndHKoCaXfWfL0A2X4hw2Nnpd+2C8nnRIO1q2CV8r+FILgatIPq1wgvovskmhQA fbGm4vh0Bw2gfMGGVtjGGgoLzT93XUMWQ7uD9VstQvchOB0vKfKy/Nzv4LLPRFS4lTWtVvZtJfQR rwD6KHQn7thgiVjgEoh9LAdtg7/FsvznOjcuOL+fPYA6acMkF+5aCemtel/fkrrbPP8QZk+eJj/O DkRSjSfBmnw6RSPkrolZ3y9kVzZFjqO7sUGCTVtey/URABPQb+VjtLS+1mJ7+QvnMSuDpd5aKAJH azfVgwCPrcopu+i7KYsTWzKpR4eENDmOWhUvzFvoko4dUVvU/N90H7Aelp/k1CUfvYEgJ4TlhJ/G CWc= =hu8m -----END PGP SIGNATURE----- --xR6At3BscXEfQMytnEQ6uJIgWbuzasC1X--