Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp2010953lqe; Tue, 9 Apr 2024 07:16:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU0Vdf8/OSB7ykqnZGGMbkVO9tf8bq7bQyCermMP8KBbGVCxULB/EQgC3W8BxtB4mz2kMof94Y5k74VQyhGRprY2PjS5uYDqf8QurszVA== X-Google-Smtp-Source: AGHT+IFW3omUU+ZwAabKecvKdExMjaybtFxbpAOPibDnzZFbUi3n/uEYZGGd1b0cshuknF31wZ2E X-Received: by 2002:a50:8e5b:0:b0:56e:23e3:bdc3 with SMTP id 27-20020a508e5b000000b0056e23e3bdc3mr8026484edx.16.1712672180025; Tue, 09 Apr 2024 07:16:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712672180; cv=pass; d=google.com; s=arc-20160816; b=W70jT0onhNa2LqR70pzEQza7dniE49Tg9TrKvDJ9yqQF1KGJELrluN2gziIM/x6osT gUDh3lkLZr02YvKuKyusO3NRArM9gR1hf/zrCxd932TDmkgmVPDXKI+afG6AM9iErLwb zObqPmeavdjzn5KGkYYuGZzRB4joTtgos18MqY6tYkOTMothQwgJuBX2bt0IwuNSJ02j LdRU5JV3xuWW9NItMFMU8aLpvCqmr6TCOG+EIpb/zEH4fbw4Q0OctbsJZGs7j/XLiF4d u13/yD4d2KFgfLauLZGDkFQzSOTluSnNKhah6mcywM6uflBByfFctgwydY31OPFfHNds tHeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=0BsXbvuU8i3nc4Xyk+rI76L4okRIZsk0UGdjG0VnQUM=; fh=fyhjTue2Ri3Kfd3S3xTJIlmMYdtLR9/znJpkAQyMUIo=; b=AduT+u5Evo87ttWPikj3aDDSnbaW1F1iLCfNAOa/Hfe/Z+BqN3/x/hnFq0fvApZI2d obeFlSoA73b0uv3j+jkAF8rHts1DuaUG8MCMQNhKiwhlLAEsNuAVxeCxADdbej0kxK+w ybSsQpqVtB6vrgoMTDzApN9jn7Ey3PAn87w5zwX+L9TMAU2LAeOFHqsH/nvSXKvjoj54 M8U22RC9Tt5T3KSXbqG15C60pkU5aPsBlXxKteDhhRCTyYsfm/bNrOwD8taXjhKBSn9q ft4tm1i5/MPR+w/aeO4ZJerjfzPk9UqapUknkCe2O0pVZ5FH1Xp9TTTGra4hdpLZw71C tb+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-137073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137073-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q18-20020a50aa92000000b0056c3b60243bsi4728441edc.308.2024.04.09.07.16.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 07:16:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=lst.de); spf=pass (google.com: domain of linux-kernel+bounces-137073-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137073-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id B89041F21CE2 for ; Tue, 9 Apr 2024 14:16:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB59012FF6D; Tue, 9 Apr 2024 14:15:38 +0000 (UTC) Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (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 E887112FB0F; Tue, 9 Apr 2024 14:15:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712672138; cv=none; b=bGLUHZXtvOM4NVFcZZbEh9eIaabcbI4KJkV2xO2oGjQbTrmPMj15EvHGJyoDgumliJGxvqk9N8e/RLl2Amy3OHLKJmS9XWCjjVs+6SK9p9ihPGTwXIxnlHI2zhvsqHUwhtFXLEsEgrUJbh/B7as8rxB6xbd7F/L+ogwmyGAEv4s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712672138; c=relaxed/simple; bh=1Hvn0UUQi7daY6MeWzk+embfXVjNT5NRKIlTZP6dTWo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VM30V1E9KCYCvnUFUQVKk3uq335eW1DXoTlnxs8OTyjFak6mhRCMeQqFuOY0MuCLAbxO5OaMCD3IIJCx4nKPSmi6b3uY+0dgMU9k7F2OOj8gL9zNfYa5HxTHBpwgJGm+wJAPaGCQJs7wF0MOrEogA9B90M3d4HJ2RydsF3RmzvQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 65FB468B05; Tue, 9 Apr 2024 16:15:32 +0200 (CEST) Date: Tue, 9 Apr 2024 16:15:31 +0200 From: Christoph Hellwig To: Lennart Poettering Cc: Keith Busch , Linux regressions mailing list , Christoph Hellwig , linux-block@vger.kernel.org, LKML , Jens Axboe Subject: Re: API break, sysfs "capability" file Message-ID: <20240409141531.GB21514@lst.de> References: <54e3c969-3ee8-40d8-91d9-9b9402001d27@leemhuis.info> 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: User-Agent: Mutt/1.5.17 (2007-11-01) 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. > I think it would be nice if the "capabilities" thing would be brought > back in a limited form. For example, if it would be changed to start > to return 0x200|0x1000 for part scanning is off, 0x1000 when it is on. > > That would then mean we return to compatibility with Linux <= 5.15, > but the new 0x1000 bit would tell us that the information is > reliable. i.e. if userspace sees 0x1000 being set we know that the > 0x200 bit is definitely correct. That would then just mean that > kernels >= 5.16 until today are left in the cold... At this point we're just better off with a clean new interface. And you can use the old hack for < 5.15 if you care strongly enough or just talk distros into backporting it to make their lives easier.