Skip to content

RFC create simple libfs directory iterator and make efivarfs use it

James Bottomley linux-efi linux-fsdevel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3libfs: rework dcache_readdir to use an internal function with callbackfs/libfs.c+29 -122 replies
2/3libfs: add simple directory iteration function with callbackfs/libfs.c include/linux/fs.h+35 -02 replies
3/3efivarfs: replace iterate_dir with libfs function simple_iterate_callfs/efivarfs/super.c+7 -961 reply

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchArd Biesheuvel
1/3
2/3
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/3] create simple libfs directory iterator and make efivarfs use it

[Note this is built on top of the previous patch to populate path.mnt]

This turned out to be much simpler than I feared. The first patch breaks out the core of the current dcache_readdir() into an internal function with a callback (there should be no functional change). The second adds a new API, simple_iterate_call(), which loops over the dentries in the next level and executes a callback for each one and the third which removes all the efivarfs superblock and mnt crud and replaces it with this simple callback interface. I think the diffstats of the third patch demonstrate how much nicer it is for us:

 1 file changed, 7 insertions(+), 96 deletions(-)

Regards,

James

---

James Bottomley (3):
libfs: rework dcache_readdir to use an internal function with callback
libfs: add simple directory iteration function with callback
efivarfs: replace iterate_dir with libfs function simple_iterate_call

 fs/efivarfs/super.c | 103 +++-----------------------------------------
 fs/libfs.c          |  74 +++++++++++++++++++++++++------
 include/linux/fs.h  |   2 +
 3 files changed, 71 insertions(+), 108 deletions(-)
Signature · 1 line
2.43.0