Linux Power Management development
 help / color / mirror / Atom feed
From: Arun Rao Balappa <arunraobalappa@gmail.com>
To: linux-pm@vger.kernel.org
Cc: rafael@kernel.org, lenb@kernel.org, pavel@kernel.org,
	linux-kernel@vger.kernel.org,
	Arun Rao Balappa <arunraobalappa@gmail.com>
Subject: [PATCH] docs/power: note Btrfs limitation with FIBMAP for swap file offset
Date: Tue, 12 May 2026 12:07:13 +0530	[thread overview]
Message-ID: <20260512063713.77200-1-arunraobalappa@gmail.com> (raw)

On Btrfs, the FIBMAP ioctl does not return physical block addresses.
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.

Signed-off-by: Arun Rao Balappa <arunraobalappa@gmail.com>
---
 Documentation/power/swsusp-and-swap-files.rst | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Documentation/power/swsusp-and-swap-files.rst b/Documentation/power/swsusp-and-swap-files.rst
index a33a2919d..44ffe02b3 100644
--- a/Documentation/power/swsusp-and-swap-files.rst
+++ b/Documentation/power/swsusp-and-swap-files.rst
@@ -35,6 +35,14 @@ FIBMAP ioctl and determine the location of the file's swap header, as the
 offset, in <PAGE_SIZE> units, from the beginning of the partition which
 holds the swap file.
 
+.. note::
+
+   On Btrfs, the FIBMAP ioctl does not return physical block addresses, so
+   tools such as ``filefrag`` cannot be used to determine the correct offset.
+   On Btrfs, use btrfs-progs instead::
+
+      btrfs inspect-internal map-swapfile -r <swap_file_path>
+
 3) Add the following parameters to the kernel command line::
 
     resume=<swap_file_partition> resume_offset=<swap_file_offset>
-- 
2.53.0


             reply	other threads:[~2026-05-12  6:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12  6:37 Arun Rao Balappa [this message]
2026-05-12  8:01 ` [PATCH] docs/power: note Btrfs limitation with FIBMAP for swap file offset Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2026-05-12  9:42 Arun Rao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260512063713.77200-1-arunraobalappa@gmail.com \
    --to=arunraobalappa@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox