Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9192778rwd; Wed, 21 Jun 2023 04:26:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ74TkQEtP0p6R8KQ/EsBjUWwYRervJoYGaz8C/ORkMcxKNdW104AVQsX18RT2JpsWy4Navk X-Received: by 2002:a05:6808:6d3:b0:396:169f:3660 with SMTP id m19-20020a05680806d300b00396169f3660mr11453430oih.58.1687346774995; Wed, 21 Jun 2023 04:26:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687346774; cv=none; d=google.com; s=arc-20160816; b=r8wOlmFwH0hUziZ+zoyZpFpa+tc6gpHAfH3I8QGuTKqF6xPTDl/Xe5bnRYLtmDh8bn uQ7SlkNTw+j+k27XT2YZBQdz5ezBeMWcbVyoyRejTIFhv8/gFuyuXkA6rPa/kFqKopUU tub7BhKThg1Zlzsa++wOgWVrlAOOfKB/7cFHJoHVKniM4M1iIbxfHXyilfUtNsW0dvww QyWDqk2viYkmWj5tSoyYB1lcemPzmfYqsygQYsChUClg0J0USZD96uf52ugg5FU9UNuc uB5iClVuCiDVc4p2lQJaXxqQKnFzHYzbcPX3YjSX0y3MWCeugf85NQ3MutXPJwkLGFy9 6T9Q== 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=r2n6TaUiDkLeBd2u1AMjUDWTy7hXB70jCq4p4IOtyAI=; b=TfqJZMsBa8TPBsTFK99W/40i7yOsYjWnOzwfsFQn904yOOOVHyBhY9ejL2qOHMNcQg XiW2q6D4vSXnTex0pXWKeQymrxdLn2IaNizdkfXlybm4G+Af5FKgPSWMcCDKTSAcEgn/ r7LEmbJ2Ztdcy+0/ZPoG4xg34eyHEQ1Gnje0gJ04w0yYT/2SRwk8d4Ic0wTtaOK1onI9 i3qect6Qd5+fjquZfKXjq3yjgUsU5NVslpOiYjyZ4ct3GSqszqDIGx0K1c6wPZAcNQUr UFBY/GCcUcBr2ImddA9UFQoIl8zPka1ulf1Jpm69QV49cWbS3baQiTa2bzrJ4GyaFE8n eTBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yandex.ru header.s=mail header.b=W5909DLB; 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 gt2-20020a17090af2c200b002532e1993basi3910718pjb.154.2023.06.21.04.25.57; Wed, 21 Jun 2023 04:26:14 -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=W5909DLB; 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 S232688AbjFULXU (ORCPT + 99 others); Wed, 21 Jun 2023 07:23:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232648AbjFULXS (ORCPT ); Wed, 21 Jun 2023 07:23:18 -0400 Received: from forward502b.mail.yandex.net (forward502b.mail.yandex.net [178.154.239.146]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADF9BE57; Wed, 21 Jun 2023 04:22:53 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-37.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-37.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:601e:0:640:1bb:0]) by forward502b.mail.yandex.net (Yandex) with ESMTP id 9CF145F16A; Wed, 21 Jun 2023 14:22:35 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-37.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id WMgg4Q5DReA0-eGt6VQFN; Wed, 21 Jun 2023 14:22:34 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1687346555; bh=r2n6TaUiDkLeBd2u1AMjUDWTy7hXB70jCq4p4IOtyAI=; h=From:In-Reply-To:Cc:Date:References:To:Subject:Message-ID; b=W5909DLB61vF+amILsR9RXt2gOQ6DXpF0usgLzmBABtAtqpW4lWHJ4EWx0EuLbBgv odGFwtLUda1GAjvPltMBkZCnIvZMPymPcTJdXOjAYPzJ52aZORg5/8MPPMla3A/APN KB2g8yBVziSwegORFD21V7Jgl/epqlgOH0HqjRuU= Authentication-Results: mail-nwsmtp-smtp-production-main-37.myt.yp-c.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <2d9f894c-39aa-ec45-78f7-a11ac980bb62@yandex.ru> Date: Wed, 21 Jun 2023 16:22:32 +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, Matthew Wilcox References: <20230620095507.2677463-1-stsp2@yandex.ru> <20230620095507.2677463-3-stsp2@yandex.ru> <5728ebda22a723b0eb209ae078e8f132d7b4ac7b.camel@kernel.org> <5f644a24-90b5-a02f-b593-49336e8e0f5a@yandex.ru> <2eb8566726e95a01536b61a3b8d0343379092b94.camel@kernel.org> <9c0a7cde-da32-bc09-0724-5b1387909d18@yandex.ru> <26dce201000d32fd3ca1ca5b5f8cd4f5ae0b38b2.camel@kernel.org> <0188af4b-fc74-df61-8e00-5bc81bbcb1cc@yandex.ru> From: stsp In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 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,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 21.06.2023 16:05, Jeff Layton пишет: > Yes. Ambiguous answers are worse than none at all. But same for read locks, when you query them with F_OFD_GETLK. It doesn't sound ambiguous to me, you get the valid owner, and you can iterate them if you kill them in a process (same as for read locks). > What problem are you trying to solve by having F_OFD_GETLK report a pid? Just a way to abruptly kill offending lockers, as that most likely means the process hanged (I have a 3rd party code that drives the locking, so it can't be trusted not to hang). Its not essential though, for sure. Curiosity also plays the role here. :) Though if you don't want, I can as well not add a TODO comment to the code.