Re: [PATCH] docs/power: note Btrfs limitation with FIBMAP for swap file offset

From: Christoph Hellwig

Date: Tue May 12 2026 - 04:02:36 EST


On Tue, May 12, 2026 at 12:07:13PM +0530, Arun Rao Balappa wrote:
> On Btrfs, the FIBMAP ioctl does not return physical block addresses.

On btrfs, and on anything that writes out of place or uses multiple
devices for that matter, FIBMAP is not implemented.

> Tools such as filefrag therefore cannot determine the correct swap file
> offset for use as resume_offset. Document the correct btrfs-progs
> command to use instead.

All of this is inherently unsafe. File systems and do move file data
without notifying users. This document is a really bad idea and
should be removed as we should not encourage users to rely on these
kinds of hacks.