Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp584034lqp; Wed, 22 May 2024 13:06:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV/QfkKDe78sqY0kruP7ZG9dLXpJVu8ZaDhWFiNx3mcjwBmg/nc66cvzHqqtKt+ri/teyJ1f77iZpl6KZUgp90ZNT7xqvLLHsl6hSlYmA== X-Google-Smtp-Source: AGHT+IE0yTwq5VsyKYaxc//+d+iMBBgoQWQIeHwwk6bs5f8rcYjJEpr2qc9SS+00vImR8pCZHvWj X-Received: by 2002:a05:6a20:3d91:b0:1b0:c1:d8be with SMTP id adf61e73a8af0-1b205c7e7aamr295636637.1.1716408402958; Wed, 22 May 2024 13:06:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716408402; cv=pass; d=google.com; s=arc-20160816; b=Tx++m/4Hm7C2X4E1oWewR7/o58bdxctUD0AAe9QkrWjJgCeNLLuY8m+n698LgSdl/Y nOAoxCBDBA1dUVdhkVCuNgJoI1DNBfwb76BFXl2ZBQOXUss1BJE8JBRWl7vIJUFaAtRr uV1nUr9kERfy47v7B1Vl7bDCYVK3TYO+gwZ+KZyZjWVSW7dGZyxpqGf55OsvH+KiLzaI 8Vr77HYzJYAueqpEFlcdr0eJN2bCu6iF9GbzVJgy5iQB41/Eok3ze7Z0FnsFM8KMy8xB UB6x48CorW0gGGdEoZIAWg9TiDVd/JDUK2zKxRPEpAnuvNC811H5DL1/clncM2MzhDEO G+LQ== 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=u2+ROOHYbkCaIa0leCLabsPb6B7hDNDjI6pFITeWd6A=; fh=BieM3MCue6ZR+QPY3hZQhHE0R5klKh/pClw8HyIPZdM=; b=Q3UCMlcIYgNM/vh89WFzfhdyvCZ0wD4iFyB5N4QWUaM7soLIY7+cDCkGhA7ilA1Cbb k76qwGsu6/3IL59NcruSus+awsSwGoNBN+YTQhamoBG1PLi8++x+bKtv5XiHI5N/Tpfw 6FbgH9rKSPoY/GPWOA1sJxgP/HvX0TZu6dEYk6iFEaOh+vt2zEUhTSqQRGMJA5Cuq95k GFofJ5Hs7X2g0rR2+3TXCrcNUpPL+bgZU0pv6I7yqXM1+Z+ZD5+LE67PLC9PlYTFCtim Vex9/0U90NyWG1PfAarKT7lhN74Mmb+bF8Y1kt56yqWMnYsNnjQvV8iwBsUP82ja0umR VZOg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ca4A5aCk; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-186395-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186395-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-677e8c21bebsi302190a12.125.2024.05.22.13.06.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 13:06:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186395-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=ca4A5aCk; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-186395-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186395-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 3E64CB211A6 for ; Wed, 22 May 2024 14:59:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E9DBF224D2; Wed, 22 May 2024 14:59:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ca4A5aCk" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 3A83B22EE5; Wed, 22 May 2024 14:59:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716389980; cv=none; b=foVdCoM1HzEobhvsifF8LGpggeWVaj9700vLp0Wu6MXooeQ0G28WteRVdqOYGjheN72CEV0r8FsJ4JjAYwmhpaTj9a/dmmKbHupaNC1faeOOU/VUWw1kmzz9KS7ygfKv3nylJn5Fu1PtFwMbakoY6ZrD6wbSqeKORrGiNgiYiYY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716389980; c=relaxed/simple; bh=taK1R5jKS6B4fCGxzFCLE434wCi1GNNxDNuMK1l5sRc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GZ5TqbvvZre2XyErXHcCO0nc87fHKvCD+zZIRbCUnpYZzVeVruwCo61iL2WrK8/sEReZKaFJESSdU66fMUttlnqyqKSrWj1odfryvnTcP0CAbkO2scv9U4rb9xmz1AUlYY8YvmtOG+TIH5vPGduk6IjrDqjdz/Yr15kf6dloqHM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=ca4A5aCk; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=u2+ROOHYbkCaIa0leCLabsPb6B7hDNDjI6pFITeWd6A=; b=ca4A5aCkkcOqMvTo1iBrEAKAXC vnzUjoJj7fWA/n0wodKzJBZCYbq+MYO67wUupXdDXIQwTHOihB6Mt+QASIv+pbZqLNFRcMESZSZZb YQEHw+V49/xvQrVphkrS4SqABj0isfUUQ0RpfXZ5LY/U0dXm7E/5iph8ts8gyzWOT2vZbS19Kovd0 X7/qpW7dQQpTmj889a02Ln4UDGMe4y+ywMvX2H5s9gaHNRqKKOzfrKAEFLabt3+UWjlrfZxqbvYRK EsbdR+n2SH/LLoyufLZteCHHjwgWnKwO4YaSlFescAXX0As4V4EtheQ6jIHtaSare6t3sNFqxo9bI qOoh2p+g==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1s9nRH-00000003Hvb-2vFW; Wed, 22 May 2024 14:59:35 +0000 Date: Wed, 22 May 2024 07:59:35 -0700 From: Christoph Hellwig To: "Darrick J. Wong" Cc: Sukrit Bhatnagar , "Rafael J. Wysocki" , Pavel Machek , Christian Brauner , Andrew Morton , linux-xfs@vger.kernel.org, linux-pm@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 2/2] mm: swap: print starting physical block offset in swapon Message-ID: References: <20240522074658.2420468-1-Sukrit.Bhatnagar@sony.com> <20240522074658.2420468-3-Sukrit.Bhatnagar@sony.com> <20240522145637.GV25518@frogsfrogsfrogs> 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: <20240522145637.GV25518@frogsfrogsfrogs> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Wed, May 22, 2024 at 07:56:37AM -0700, Darrick J. Wong wrote: > On Wed, May 22, 2024 at 04:46:58PM +0900, Sukrit Bhatnagar wrote: > > When a swapfile is created for hibernation purposes, we always need > > the starting physical block offset, which is usually determined using > > userspace commands such as filefrag. > > If you always need this value, then shouldn't it be exported via sysfs > or somewhere so that you can always get to it? The kernel ringbuffer > can overwrite log messages, swapfiles can get disabled, etc. Scraping a block address from anything is just broken. Wher is the code using this? It needs a proper kernel interface. Same about the warning crap in patch 1.