Skip to content

RFC Add subcommand that dumps file extents

Sidong Yang linux-btrfs 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 RFC Latest2 patches 0 repliesNew
  2. v42 patches 9 repliesSuperseded
  3. v32 patches 4 repliesSuperseded

Changes in v5 from the cover letter

- Supports json format
- Print hole type by checking disk_bytenr
---

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs-progs: export util functions about file extent itemskernel-shared/print-tree.c kernel-shared/print-tree.h+14 -90 replies
2/2btrfs-progs: cmds: Add subcommand that dumps file extentsMakefile cmds/commands.h cmds/inspect-dump-file-extents.c +1 more+164 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [RFC PATCH v5 0/2] Add subcommand that dumps file extents

Hi, I'm want to print which device has the file_extent. but I don't know how. Maybe it could be found by find block group in extent tree and find devid in chunk tree again. I don't know it's good way to find it. is there any good way to find devid?

This patch series add an subcommand in inspect-internal. It dumps file extents of the file that user provided. For avoiding duplicated code, the patch that export functions is in this series.

Sidong Yang (2):
btrfs-progs: export util functions about file extent items
btrfs-progs: cmds: Add subcommand that dumps file extents

---
v2:
- Prints type and compression
- Use the terms from file_extents_item like disk_bytenr not like "physical"
v3:
- export util functions for removing duplication
- change the way to loop with search ioctl
v4:
- export COMPRESS_STR_LEN for using function safely
v5:
- Supports json format
- Print hole type by checking disk_bytenr
---

 Makefile                         |   2 +-
 cmds/commands.h                  |   2 +-
 cmds/inspect-dump-file-extents.c | 161 +++++++++++++++++++++++++++++++
 cmds/inspect.c                   |   1 +
 kernel-shared/print-tree.c       |  18 ++--
 kernel-shared/print-tree.h       |   5 +
 6 files changed, 178 insertions(+), 11 deletions(-)
 create mode 100644 cmds/inspect-dump-file-extents.c
Signature · 1 line
2.25.1