Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp38045lqb; Tue, 16 Apr 2024 08:12:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2Y+drY0oLLRWQCrX8sosu7JnsHtq52uGKF4Rmn/Lp0uoFvSSGxFrfSP8/XQLPgb3XZeOEtvi6kaNjhEJLYZi8Vu6YqXWm2eY3idN5uQ== X-Google-Smtp-Source: AGHT+IGaquzzVFe3by4HjXr+rkGWBD4f8FlvVGeHz51Z5KR7CX01dTSnNUy6R7nBZJhypzcnQ8C8 X-Received: by 2002:a05:6a20:96c6:b0:1a9:56f0:3fe6 with SMTP id hq6-20020a056a2096c600b001a956f03fe6mr13656260pzc.33.1713280340278; Tue, 16 Apr 2024 08:12:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713280340; cv=pass; d=google.com; s=arc-20160816; b=FI7RJEoUmnyU6L7fpv9WVCx5W6QYLT+bvNNqR6SW4feRczM+vlDg28YcwCXUb9yaS/ Td9wGmG9wLATGcewuMQgRE+xFGxyB5U2Ld04NLNYBDrnIuvaaeEZVjrEG8CTa4iFvJqv XbrK0ITqxkmB3v9QHjj3DNTQum3bZWTVj+T7PyYNWX28StptOhP1Rx/XAW59VzRvEl6k Y8IIRuwd52hGeEQsYMOSYs72QY5SWdlkD47zgv6Fen2rgGwmGXa2n7Oj+a35SXaiLDNv o+88jb4jkorEoyngNWxAG0B2zc4jbLrWwntEdZ7cFy+c66DQbz3UwSmLHb93rKN3d23k Lo8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=T+0iWWB4YV2CB/MD0NwXB2t5H4DsIGuuuu3TInbRpFk=; fh=pELrJhE77N/Tdc3sxfeFbUXLGEzm7/jVw37Jc4RXOQw=; b=P34LdT9xYJto55xYDbLg0rhlSHQMovyD6qMFHcZ0VPSViflL+nql2gih8jUSmdQaKo Zkmh2KbM9O1hK290Z+PSGkzuct8WAWgFU6YatkF8ITzBDT93V1ltDaj5+cQNifJRGKdW rLKK/AYwFuXL+T1VIsBpSgZdjMLKi3qwdQjFqV+3TVy9kRFl01pCJJmSfC0CPbtvL32V tR1fPOBpgrbJ0681bMZMhtlBp86LQ03kbtYeTw+Y8bkQpZm+j134YTLl4fNPe1/7vf7C HfNf/syh6+mEnHBAx72e6Ke/9+l8kuiAi3FyTloOaJXeDQxYeZE/+BSkictjH802hXs6 LkUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dsMLJDN7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-147049-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147049-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y9-20020a63ce09000000b005cd8486d5ccsi10117580pgf.65.2024.04.16.08.12.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 08:12:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-147049-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dsMLJDN7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-147049-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-147049-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A8B2FB22628 for ; Tue, 16 Apr 2024 14:45:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1ACFA12F58A; Tue, 16 Apr 2024 14:45:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dsMLJDN7" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3AFF612DDAE; Tue, 16 Apr 2024 14:44:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713278699; cv=none; b=VICOpnNeJGMctGrfrAfUAw7zn1Zhr+ws5Csd4kdb3HsE9jI8gkMra8q/MlPqAtAfQAKfq4RF0Dy6vmAEdgSVKfzbNBbvaaYsltwe9h/Q01BDDN5F5gLCr4jRSk9Ug6ZZVzfjyOrxF88oeyMGluBGnXiZvY+/Yz7LAuxyV+BNgTQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713278699; c=relaxed/simple; bh=RsDtzCi/AC/WSg7s2RwFMDLB7cfQ+Jn7MP8sUhas0/s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=A4L+A9MScEqRSIQKlKDv3TZjk3v4vWi7+flrfNIXn5vt+w68qMbx/3QXRzvCahGapf7ErhkC8UGuA0/NjcW1wtSjaNDrTdu+4eKSyjbv5fNm8JXbSQ9bphCpaN2y6UH9YodB4cD0gjS0RrtEj7TsmIvOD8GT07uECzHannFDsnE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dsMLJDN7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 515E5C113CE; Tue, 16 Apr 2024 14:44:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713278698; bh=RsDtzCi/AC/WSg7s2RwFMDLB7cfQ+Jn7MP8sUhas0/s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dsMLJDN7maRAxcb09mjajne7GLFzZEMR7vrx8x6Ba3SC23G8CuNg3qVDsmGfAcJdq Ou/Tf+uCqkBveUDsaf+0s81sEJNMZKvLVqzAn4UiVI2b+Iy53V4uHOq+1lpSBciuhd R6IFI98ogEHxf8bYS6xrdQR+CWah8hja17628/4rZT9tDmEujDm/w1XjTliqeyYmzn yIaTl5QHtKOIULhyFgETY/9tHp9WzR/Qew6aUGQgCJiOD5r3yU0legUw8TCrzkas70 J8jlJLkSUVNVGiKbzHs/pomYtn98llYwdOO5D/m9QQUp5bfZJUzRPTRx+rE/whm/SQ iPK6AD3TLzTQg== Date: Tue, 16 Apr 2024 08:44:55 -0600 From: Keith Busch To: Lennart Poettering Cc: Christoph Hellwig , Linux regressions mailing list , linux-block@vger.kernel.org, LKML , Jens Axboe Subject: Re: API break, sysfs "capability" file Message-ID: References: <54e3c969-3ee8-40d8-91d9-9b9402001d27@leemhuis.info> <20240409141531.GB21514@lst.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Apr 16, 2024 at 04:23:43PM +0200, Lennart Poettering wrote: > On Di, 09.04.24 16:15, Christoph Hellwig (hch@lst.de) wrote: > 11;rgb:1717/1414/2121 > > On Tue, Apr 09, 2024 at 10:19:09AM +0200, Lennart Poettering wrote: > > > All I am looking for is a very simple test that returns me a boolean: > > > is there kernel-level partition scanning enabled on this device or > > > not. > > > > And we can add a trivial sysfs attribute for that. > > > > > At this point it's not clear to me if I can write this at all in > > > a way that works reasonably correctly on any kernel since let's say > > > 4.15 (which is systemd's "recommended baseline" right now). > > > > > > I am really not sure how to salvage this mess at all. AFAICS there's > > > currently no way to write such a test correctly. > > > > You can't. Maybe that's a lesson to not depend on undocumented internal > > flags exposed by accident by a weirdo interface. Just talk to > > people. > > Undocumented? Internal? > > It's was actually one of the *best* documented kernel *public* APIs I > ever came across: > > https://www.kernel.org/doc/html/v5.16/block/capability.html > > So much detail, I love it! > > I mean, you did good work here, documented it, with all flags in all > details. I think that's great work! You should take pride in this, not > try to deny its existance! The patch that introduced this was submitted not because the API was stable; it was committed to encourage developers to update it as it changed because it is *not* stable. That's not the kind of interface you want exported for users to rely on, but no one should have to search commit logs to understand why the doc exists, so I think exporting it was just a mistake on the kernel side. To say this doc is "good" misunderstands what it was trying to accomplish, and what it ultimately created instead: technical debt. The block interfaces documented in Documetation/ABI/stable/ are reliably stable, though.