summaryrefslogtreecommitdiffstats
path: root/fs/squashfs
Commit message (Collapse)AuthorAgeFilesLines
* fs: squashfs: Remove unused functionSascha Hauer2019-03-181-108/+0
| | | | | | squashfs_lookup_next() isn't used in the tree. Remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: Drop trivial .lseek() implementaitons in FS driversAndrey Smirnov2019-01-291-6/+0
| | | | | | | | | | | | | | | There are no FS drivers that do not implement .lseek callback in the codebase, so there doesn't seem to exist a use-case where lseek() would return -ENOSYS due to fsdrv->lseek being NULL. At the same time a large number of FS drivers implement only the most basic "always succeeds" custom .lseek() hook. Change the code of lseek() to treat absense of .lseek() to mean that no special actions needs to be taken by FS driver and seek is always successful and drop all of the trivial .lseek() implementations. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: Update FILE position in lseek()Andrey Smirnov2019-01-291-2/+0
| | | | | | | | | | Instead on relying on driver callbacks to update 'pos' in FILE, do it as a part of lseek() code. This allows us to drop a bit of repeating code as well as making lseek() implementation consistent with write() and read(). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: squashfs: Switch to dentry cache implementationSascha Hauer2018-07-139-177/+365
| | | | | | While at it implement symlink support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: dentry cache implementationSascha Hauer2018-07-112-9/+1
| | | | | | | | | | | | | | | | | | | | | | | 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>
* squashfs: Add zstd supportPhilipp Zabel2018-02-056-0/+169
| | | | | | | | | | Based on kernel commit 87bf54bb43dd ("squashfs: Add zstd support"). Creating zstd compressed squashfs images is supported by squashfs-tools newer than commit e38956b92f73 ("squashfs-tools: Add zstd support"). Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: squashfs: fix "no previous prototype for 'squashfs_set_rootarg'" warningAntony Pavlov2017-04-101-1/+2
| | | | | | | | | | | The patch fixes this compiler's warning: fs/squashfs/squashfs.c:115:6: warning: no previous prototype for 'squashfs_set_rootarg' [-Wmissing-prototypes] void squashfs_set_rootarg(struct squashfs_priv *priv, struct fs_device_d *fsdev) ^ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: squashfs: don't reference UBI symbols if UBI isn't compiled inLucas Stach2017-01-091-0/+3
| | | | | | | | There is no point in trying to append a UBI root option, if there is no UBI support in barebox. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: squashfs: Enable squashfs XZ support when XZ is enabledSascha Hauer2016-10-241-10/+7
| | | | | | | | XZ support itself is much more expensive than the squashfs XZ wrapper, so it makes sense to just compile XZ support into barebox when XZ support is available. No need to ask the user for it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: squashfs: append linux rootarg for ubi volumeEnrico Jorns2016-10-241-0/+31
| | | | | | | | | | If squashfs runs from an ubi volume, append appropriate root kernel options. Note that ubiblock support is required in the kernel for that. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add filetype and detection for squashfs imagesEnrico Jorns2016-10-241-0/+1
| | | | | | | | | | | | | | | | | | | This adds `filetype_squashfs` to the list of known filetypes and adds a detection for squashfs files to file_detect_type(). This currently matches on the `hsqs` start sequence of an image file. Additionally, the newly introduced filetype is registered as the type of the squashfs_driver which allows, for example, to mount squashfs without the need to specify a type parameter. This changes enable booting a squashfs with the simple `boot` command pointing to the location (device) that holds the squashfs. Note that booting with blspec is limited as the current squashfs driver is not capable of handling symbolic links. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: squashfs: port zlib compression support from kernelEnrico Jorns2016-10-243-0/+143
| | | | | | | | As this is the default compression method for squashfs, make this the default in kconfig selection, too Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: squashfs: port lz4 compression support from kernelEnrico Jorns2016-10-243-0/+151
| | | | | Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: squashfs: port lzo compression support from kernelEnrico Jorns2016-10-243-0/+140
| | | | | | | | | This ports lzo_wrapper from kernel code and adds some minimal adaptions to make squashfs lzo compression work in barebox. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Tested-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: squashfs: use correct format specifierLucas Stach2016-06-071-1/+1
| | | | | | | | | Fixes: fs/squashfs/inode.c: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long long int' Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fs: add support for SquashFS 4.0Yegor Yefremov2016-03-0222-0/+4133
The driver was imported from Linux 4.4. Current implementation supports only XZ decompressor. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Tested-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>