public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] create simple libfs directory iterator and make efivarfs use it
@ 2025-03-18 19:41 James Bottomley
  2025-03-18 19:41 ` [RFC PATCH 1/3] libfs: rework dcache_readdir to use an internal function with callback James Bottomley
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: James Bottomley @ 2025-03-18 19:41 UTC (permalink / raw)
  To: linux-efi, linux-fsdevel; +Cc: Ard Biesheuvel, Christian Brauner, Al Viro

[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(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-03-19 18:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-18 19:41 [RFC PATCH 0/3] create simple libfs directory iterator and make efivarfs use it James Bottomley
2025-03-18 19:41 ` [RFC PATCH 1/3] libfs: rework dcache_readdir to use an internal function with callback James Bottomley
2025-03-18 21:32   ` Ard Biesheuvel
2025-03-18 21:49     ` James Bottomley
2025-03-18 19:41 ` [RFC PATCH 2/3] libfs: add simple directory iteration " James Bottomley
2025-03-18 21:33   ` Ard Biesheuvel
2025-03-18 21:50     ` James Bottomley
2025-03-18 19:41 ` [RFC PATCH 3/3] efivarfs: replace iterate_dir with libfs function simple_iterate_call James Bottomley
2025-03-18 21:34   ` Ard Biesheuvel
2025-03-18 23:45 ` [RFC PATCH 0/3] create simple libfs directory iterator and make efivarfs use it Al Viro
2025-03-18 23:49   ` Al Viro
2025-03-19 16:46   ` James Bottomley
2025-03-19 18:45     ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox