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.