diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-03-29 13:47:12 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-07-11 09:58:38 +0200 |
commit | b3fbfad7aeaf8ee36216e1d14b5d7be27ba612de (patch) | |
tree | 61299cecd2c49902ff831813daa81926bacd69db /fs/Kconfig | |
parent | 4c7b877a5c90bcf80d42086d246981f0686d1e27 (diff) | |
download | barebox-b3fbfad7aeaf8ee36216e1d14b5d7be27ba612de.tar.gz barebox-b3fbfad7aeaf8ee36216e1d14b5d7be27ba612de.tar.xz |
fs: dentry cache implementation
This adds the Linux dentry cache 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.
With this patch 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.
This patch also contains a wrapper in fs/legacy.c to support
filesystems with the old API.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'fs/Kconfig')
-rw-r--r-- | fs/Kconfig | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/Kconfig b/fs/Kconfig index 3512000556..b60314b1ec 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -6,12 +6,24 @@ config FS default y select FILETYPE +config FS_LEGACY + bool + help + invisible option selected by filesystem drivers which haven't + been ported to dentry cache. + +if FS_LEGACY +comment "Some selected filesystems still use the legacy FS API." +comment "Consider updating them." +endif + config FS_AUTOMOUNT bool config FS_CRAMFS bool select ZLIB + select FS_LEGACY prompt "cramfs support" source fs/ext4/Kconfig @@ -19,15 +31,18 @@ source fs/ext4/Kconfig config FS_RAMFS bool default y + select FS_LEGACY prompt "ramfs support" config FS_DEVFS bool default y + select FS_LEGACY prompt "devfs support" config FS_TFTP bool + select FS_LEGACY prompt "tftp support" depends on NET @@ -35,14 +50,17 @@ config FS_OMAP4_USBBOOT bool prompt "Filesystem over usb boot" depends on OMAP4_USBBOOT + select FS_LEGACY config FS_NFS depends on NET + select FS_LEGACY bool prompt "nfs support" config FS_EFI depends on EFI_BOOTUP + select FS_LEGACY bool prompt "EFI filesystem support" help @@ -51,6 +69,7 @@ config FS_EFI config FS_EFIVARFS depends on EFI_BOOTUP + select FS_LEGACY bool prompt "EFI variable filesystem support (efivarfs)" help @@ -62,6 +81,7 @@ source fs/ubifs/Kconfig config FS_BPKFS bool select CRC32 + select FS_LEGACY prompt "BPKFS support" help Simple update file format developed for Somfy, tools and library are @@ -78,10 +98,12 @@ config FS_BPKFS config FS_UIMAGEFS bool select CRC32 + select FS_LEGACY prompt "uImage FS support" config FS_SMHFS depends on ARM_SEMIHOSTING + select FS_LEGACY bool prompt "Semihosting FS support" help @@ -95,6 +117,7 @@ source fs/squashfs/Kconfig config FS_RATP bool depends on RATP + select FS_LEGACY prompt "RATP filesystem support" help This enables support for transferring files over RATP. A host can |