Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp7677951rwd; Tue, 20 Jun 2023 04:55:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6nkRl5GiMEG1TONBtbZSow/e3YU0OUltzXzatFN2nX0jluQlSsTaC5jfuTyCkB4RX04lzb X-Received: by 2002:a05:6a00:acf:b0:653:b76d:4d62 with SMTP id c15-20020a056a000acf00b00653b76d4d62mr10883738pfl.24.1687262154611; Tue, 20 Jun 2023 04:55:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687262154; cv=none; d=google.com; s=arc-20160816; b=cAVg1ZEpqwoFqU/Imrx5CuCR3esd8ePUDjrG3Rn1wvqECtw7AlCX0R3xkoS8vc5wp/ 59wXdrM1hDIM/GkjyzFJ9qG5iqFT0kJIOgnq7xLx+fS4z5UsE4rub/V+KGBwU+0PJ1fy MqSDIm+mfO33LJoYtlDhmeFsfBVPwgI6U2rYNBiwb6eElzdTJ86r/w4tG4UmS0D0nez0 DSgivl7LUm9wWRjmZp0gMEZ1ICnKOFpm4GlqptkPZ5nrqhggIr01GP/lg9iAvORYEUZu wTLpUbAtiA0KPvIEyFOPQIMhWZHd0M1asvj+gSuKllYxnTHIIkF6G+3gd7xMrbZn5mGv j6Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=sy+CJgdIdcZUFxJ4WQL0cSo0CwChT2uhxEUrKoqH9no=; b=xW/uJNhhIVkR4IDdZR0KlBWqOEKmso+iUsga+EkI/dmCWmS+w65xpaFIap7dK07rZ9 8NHdXyxLIqTR5fRYukdJTebP43cCrr7JHhUO59WrW+6O8cEq3FfzIdSeYmD8Ws1A6Nh+ gspIfynJeRw0XqpLwr6xjzP6u4MCawO8pLlrTo7vtavklj0VMHciyIIZva6WK8/uR6u3 agUeEz16e5HIljLrfD/IWYs1V0TJkaKVP+NQdfBzX3Au63BMXT9K/aJV5qjjzERPtyQL WuX3YGDB1JAR/vuLsLRTjO9oHW8XA9voa2j5dZnC5GnNu9Pldt/CcYEQQw28HP62wzMC atFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b=O8MxQZgQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i123-20020a639d81000000b0053fb69a6397si1527358pgd.587.2023.06.20.04.55.40; Tue, 20 Jun 2023 04:55:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b=O8MxQZgQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229933AbjFTLpb (ORCPT + 99 others); Tue, 20 Jun 2023 07:45:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232774AbjFTLp2 (ORCPT ); Tue, 20 Jun 2023 07:45:28 -0400 X-Greylist: delayed 2682 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 20 Jun 2023 04:45:23 PDT Received: from forward502b.mail.yandex.net (forward502b.mail.yandex.net [IPv6:2a02:6b8:c02:900:1:45:d181:d502]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 514B0172E; Tue, 20 Jun 2023 04:45:23 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-84.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-84.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:332f:0:640:4ab4:0]) by forward502b.mail.yandex.net (Yandex) with ESMTP id 4A74C5EED2; Tue, 20 Jun 2023 14:45:19 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-84.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id HjfjJSpWl0U0-wUWdqa9A; Tue, 20 Jun 2023 14:45:18 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1687261518; bh=sy+CJgdIdcZUFxJ4WQL0cSo0CwChT2uhxEUrKoqH9no=; h=From:In-Reply-To:Cc:Date:References:To:Subject:Message-ID; b=O8MxQZgQ7ROlR94lHObblR00iiEZVoP3C9fTG3+2pbFzZWDkmxv/RNXdCB+M63rfi 8+/tgX3nwDpl/9jxNkwbdt/bTekwykh5Gevd8415wKOC08eVVEi/g0H3muo94nMVpW 621INpeHqBHt1054zLsOPhSt+L0EtrMEBQfU7lS4= Authentication-Results: mail-nwsmtp-smtp-production-main-84.iva.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <5f644a24-90b5-a02f-b593-49336e8e0f5a@yandex.ru> Date: Tue, 20 Jun 2023 16:45:16 +0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 2/3] fd/locks: allow get the lock owner by F_OFD_GETLK Content-Language: en-US To: Jeff Layton , linux-kernel@vger.kernel.org Cc: Chuck Lever , Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org References: <20230620095507.2677463-1-stsp2@yandex.ru> <20230620095507.2677463-3-stsp2@yandex.ru> <5728ebda22a723b0eb209ae078e8f132d7b4ac7b.camel@kernel.org> From: stsp In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 20.06.2023 16:12, Jeff Layton пишет: > Multithreaded processes are also a bit of a gray area here: Suppose I > open a file and set an OFD lock on it in one task, and then let that > task exit while the file is still open. What should l_pid say in that > case? If by the "task" you mean a process, then the result should be no lock at all. If you mean the thread exit, then I would expect l_pid to contain tgid, in which case it will still point to the valid pid. Or do you mean l_pid contains tid? Checking... no, l_pid contains tgid. So I don't really see the problem you are pointing with the above example, could you please clarify?