fs: btrfs: add support for readdir
Get series with b4
b4 am [email protected] change-id 20260625-btrfs-readdir-8beac3ac5220Versions newest first
- v2 Latest2 patches 5 repliesIn review
- v12 patches 3 repliesSuperseded
Changes in v2 from the cover letter
- Cache subvolume id and inode number instead of looking them up on every readdir call (thanks Qu)
- Split out the dirent type conversion between btrfs and U-Boot filesystem convention into a helper function (thanks Qu)
- Drop redundant check for XATTR entries in btrfs_next_dir_entry (thanks Qu)
- Remove btrfs_ls and show_dir which nothing calls after the second patch
- Use container_of instead of type-casting struct pointers
- Link to v1: https://patch.msgid.link/[email protected]
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | fs: btrfs: implement opendir(), readdir() and closedir()fs/ fs/ fs/ +2 more | +181 | 3 replies | |
| 2/2 | fs: btrfs: use fs_ls_generic() and drop custom implementationfs/ fs/ fs/ +2 more | +4 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Qu Wenruo |
|---|---|
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/2] fs: btrfs: add support for readdir
Btrfs in U-boot currently uses a custom callback for ls and doesn't expose the standard opendir/readdir/closedir interface, making it harder to use in generic code. One area where this would be useful is in discovering BLS type 1 entries [1] on a Btrfs filesystem.
Add support for the standard interface, and implement ls in terms of it.
[1] https://lore.kernel.org/u-boot/[email protected]/
---
Changes in v2:
- Cache subvolume id and inode number instead of looking them up on every readdir call (thanks Qu)
- Split out the dirent type conversion between btrfs and U-Boot filesystem convention into a helper function (thanks Qu)
- Drop redundant check for XATTR entries in btrfs_next_dir_entry (thanks Qu)
- Remove btrfs_ls and show_dir which nothing calls after the second patch
- Use container_of instead of type-casting struct pointers
- Link to v1: https://patch.msgid.link/[email protected]
To: Qu Wenruo <[email protected]>
To: [email protected]
To: [email protected]
Cc: Marek Behún <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: Alexey Charkov <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Timo tp Preißl <[email protected]>
Cc: Patrice Chotard <[email protected]>
Cc: Yao Zi <[email protected]>
---
Alexey Charkov (2):
fs: btrfs: implement opendir(), readdir() and closedir()
fs: btrfs: use fs_ls_generic() and drop custom implementation
fs/btrfs/btrfs.c | 199 ++++++++++++++++++++++------------------------------ fs/btrfs/ctree.h | 7 +- fs/btrfs/dir-item.c | 76 ++++++++++++-------- fs/fs.c | 6 +- include/btrfs.h | 6 +- 5 files changed, 143 insertions(+), 151 deletions(-)
---
base-commit: 19eafbadf20f56c1a24abe6b5e8774e776894261
change-id: 20260625-btrfs-readdir-8beac3ac5220
Best regards,
Signature · 1 line
Alexey Charkov <[email protected]>