mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v2 00/10] dentry cache support
@ 2018-05-31 15:04 Sascha Hauer
  2018-05-31 15:04 ` [PATCH 01/10] fs: dentry cache implementation Sascha Hauer
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Sascha Hauer @ 2018-05-31 15:04 UTC (permalink / raw)
  To: Barebox List

This series adds the Linux dcache implementation to barebox.

Until now every filesystem driver resolves the full path to a file for
itself. This leads to code duplication and is error prone since
resolving paths is a complicated task. Also it can narrow down the
lookup performance since barebox only knows ASCII paths and has no way
of caching lookups. Since with this barebox provides a interface to
dentries much like the Linux Kernel does it gets easier to share
filesystem code between barebox and Linux.

With this series we get the Linux dcache implementation. The path
resolving code from fs/namei.c is nearly taken as-is, minus the RCU and
locking code. Dcaching is made simple as of now: We simply cache
everything and never release any dentries. Although we do reference
counting for inodes and dentries it is effectively not used yet.  We
never free anything until a fs is unmounted in which case we free
everything no matter if references are taken or not.

To still support filesystems with the old API I now introduced a wrapper
layer which binds between the new dentry cache API and old filesystems.
Hopefully this can go away soon once all filesystems are converted.

Changes since v1:

- introduce wrapper layer so we do not have to mark any FS as broken
  anymore
  - change squashfs and cramfs to the new API
  - let tftp return FILESIZE_MAX as inode size as Philipp suggested
  - lots of small changes

Sascha Hauer (10):
  fs: dentry cache implementation
  fs: ramfs: Switch to dentry cache implementation
  fs: devfs: Switch to dentry cache implementation
  fs: ext4: Switch to dentry cache implementation
  fs: ubifs: Switch to dentry cache implementation
  fs: nfs: Switch to dentry cache implementation
  fs: tftp: Switch to dentry cache implementation
  fs: cramfs: Switch to dentry cache implementation
  fs: squashfs: Switch to dentry cache implementation
  block: Adjust cache sizes

 common/block.c         |    4 +-
 fs/Kconfig             |   18 +
 fs/Makefile            |    3 +-
 fs/cramfs/cramfs.c     |  523 +++---
 fs/devfs.c             |  150 +-
 fs/ext4/ext_barebox.c  |  279 +--
 fs/ext4/ext_common.h   |    3 +
 fs/fat/Kconfig         |    1 +
 fs/fs.c                | 3632 ++++++++++++++++++++++++++--------------
 fs/legacy.c            |  315 ++++
 fs/libfs.c             |   97 ++
 fs/nfs.c               |  542 +++---
 fs/pstore/Kconfig      |    1 +
 fs/ramfs.c             |  401 ++---
 fs/squashfs/Makefile   |    2 +
 fs/squashfs/dir.c      |  232 +++
 fs/squashfs/inode.c    |    9 +
 fs/squashfs/namei.c    |   17 +-
 fs/squashfs/squashfs.c |  186 +-
 fs/squashfs/squashfs.h |    9 +-
 fs/squashfs/super.c    |   13 +-
 fs/squashfs/symlink.c  |   82 +
 fs/tftp.c              |   97 +-
 fs/ubifs/Makefile      |    2 +-
 fs/ubifs/dir.c         |  410 +++++
 fs/ubifs/super.c       |  153 +-
 fs/ubifs/ubifs.c       |  341 +---
 fs/ubifs/ubifs.h       |    7 +-
 include/dirent.h       |    3 +
 include/fs.h           |   38 +-
 include/linux/dcache.h |  109 +-
 include/linux/fs.h     |  131 +-
 include/linux/mount.h  |    3 +
 include/linux/namei.h  |   52 +
 include/linux/stat.h   |    2 +
 35 files changed, 4832 insertions(+), 3035 deletions(-)
 create mode 100644 fs/legacy.c
 create mode 100644 fs/libfs.c
 create mode 100644 fs/squashfs/dir.c
 create mode 100644 fs/squashfs/symlink.c
 create mode 100644 fs/ubifs/dir.c
 create mode 100644 include/linux/namei.h

-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2018-05-31 15:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-31 15:04 [PATCH v2 00/10] dentry cache support Sascha Hauer
2018-05-31 15:04 ` [PATCH 01/10] fs: dentry cache implementation Sascha Hauer
2018-05-31 15:04 ` [PATCH 02/10] fs: ramfs: Switch to " Sascha Hauer
2018-05-31 15:04 ` [PATCH 03/10] fs: devfs: " Sascha Hauer
2018-05-31 15:04 ` [PATCH 04/10] fs: ext4: " Sascha Hauer
2018-05-31 15:04 ` [PATCH 05/10] fs: ubifs: " Sascha Hauer
2018-05-31 15:04 ` [PATCH 06/10] fs: nfs: " Sascha Hauer
2018-05-31 15:04 ` [PATCH 07/10] fs: tftp: " Sascha Hauer
2018-05-31 15:04 ` [PATCH 08/10] fs: cramfs: " Sascha Hauer
2018-05-31 15:04 ` [PATCH 09/10] fs: squashfs: " Sascha Hauer
2018-05-31 15:04 ` [PATCH 10/10] block: Adjust cache sizes Sascha Hauer

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