2018-11-09 |
Merge branch 'for-next/net-switch-mv88e6xxx'
Sascha Hauer
committed
on 9 Nov 2018
|
Merge branch 'for-next/missing-prototypes'
Sascha Hauer
committed
on 9 Nov 2018
|
2018-10-29 |
fs: devfs: implement d_revalidate hook
...
The files in devfs can change withouut the fs layer noticing, so we
have to revalidate dentries before using them.
A failure could be triggered with:
ls /dev/nand0.root.ubi; ubiattach /dev/nand0.root; ls /dev/nand0.root.ubi
The first 'ls' would create a dentry for nand0.root.ubi with no inode
associated since it does not yet exist. 'ubiattach' then creates that
file, but the second 'ls' does not show it since the dentry is not
revalidated and thus no inode is added to that dentry. This patch
fixes this and also the opposite case when a file is removed (for
example with ubidetach).
Reported-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 29 Oct 2018
|
fs: implement d_revalidate
...
d_revalidate is useful when filesystems change under the hood of the
fs layer. This can happen with network filesystems or with devfs.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 29 Oct 2018
|
2018-10-19 |
fs: Make locally used functions static
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 19 Oct 2018
|
2018-10-18 |
drivers: Introduce dev_set_name()
...
Introduce dev_set_name() in order to hide implementation details of
setting device's name so it'd be easier to change it.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Andrey Smirnov
authored
on 16 Oct 2018
Sascha Hauer
committed
on 18 Oct 2018
|
2018-10-09 |
Merge branch 'for-next/ubifs'
Sascha Hauer
committed
on 9 Oct 2018
|
Merge branch 'for-next/fs'
Sascha Hauer
committed
on 9 Oct 2018
|
2018-10-08 |
fs: improve ramfs_truncate speed
...
During sequential writes into single file, fs layer is consequently
calling ramfs_truncate() function. When file size grows
ramfs_truncate() takes more and more time to complete, due to
interations through all already written data chunks. As an example
loading ~450M image using usb fastboot protocol took over 500s to
complete.
Use ramfs_find_chunk() function to search for last chunk of data in
ramfs_truncate() implementation, which saves a lot of loop
iterations. As a result loading ~450M image using usb fastboot
protocol takes around 25s now.
Tested-by: Maciej Zagrabski <m.zagrabski@grinn-global.com>
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Marcin Niestroj
authored
on 26 Sep 2018
Sascha Hauer
committed
on 8 Oct 2018
|
fs: ubifs: optionally allow to mount UBIFS images with encrypted files
...
Currently we do not support the UBIFS file encryption feature.
Nevertheless we can allow read clear files from UBIFS to be
able to boot an unencrypted kernel. This differs from the Kernel
behaviour, so add a globalvar to make that configurable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Oct 2018
|
ubifs: Update to v4.18-rc6
...
This syncs the UBIFS code with Linux-4.19-rc6.
There are many functions in the Linux UBIFS codebase that we do not need
for a readonly implementation. These are missing here, but all removed
functions are annotated as such so it should be relatively easy to copy
a newer codebase over the current one and to see which functions shall
be removed from the newer version.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Oct 2018
|
fs: ubifs: remove not needed code
...
This patch aggressively removes stuff that we do not need in a readonly
implementation:
- write buffering support
- lpt/ltab code
- garbage collector
- everything under #ifndef __BAREBOX__
This decreases the binary size by about 5k on ARM, but the main reason
for doing this is the idea that things that are not there don't need to
be synced with upstream ubifs code.
The __BAREBOX__ ifdeffery makes the code very hard to read and is a
maintenance burden by itself, so it is removed here aswell.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Oct 2018
|
fs: implement clear_nlink and set_nlink
...
Implement clear_nlink and set_nlink and remove the private versions
from UBIFS.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Oct 2018
|
fs: implement iget_locked and iget_failed
...
Implement in fs core rather than using a private version in UBIFS.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Oct 2018
|
fs: implement file_inode
...
To ease code porting from Linux
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Oct 2018
|
Add more mutex no-ops
...
Add mutex_lock_nested, mutex_unlock_nested and mutex_is_locked to
include/linux/mutex.h and remove them from UBIFS.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Oct 2018
|
Add kmemdup
...
We have kmemdup as a UBIFS specific variant, put it into the correct
header files. Instead of reimplementing it just use memdup we already
have.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Oct 2018
|
Add linux/slab.h
...
Move stuff we already have in include/linux/barebox-wrapper.h that
really belongs to include/linux/slab.h to there. Also add kmem_cache_*
functions. UBIFS uses them in there own implementation, so we have to
remove it there.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Oct 2018
|
2018-09-28 |
fs: ubifs: Do not free memory not allocated by ubifs
...
Since the switch to dentry cache implementation we no longer allocate
the super block, so we must not free it in the error path.
Fixes: ("4d2b23bcf9 fs: ubifs: Switch to dentry cache implementation")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 28 Sep 2018
|
2018-09-27 |
fs: ramfs: make chunk counting in truncate() better readable
...
In ramfs_truncate() "newchunks" denotes the number of chunks we
want to have after the call. We decrease that number while iterating
over the existing chunks and decrease it further with every newly
allocated chunk until "newchunks" is zero.
This is a bit hard to read. Instead we drop the decreasing while
iterating over existing chunks and increase "oldchunks" while allocating
until it reaches "newchunks".
This is mainly done to make the next patch easier.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 27 Sep 2018
|
2018-09-26 |
fs: stat: Do not forget to set errno
...
stat() needs to set errno correctly when returning with an error.
Fixes: b3fbfad7ae ("fs: dentry cache implementation")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 26 Sep 2018
|
fs: open: Do not forget to set errno
...
When the initial lookup fails in open we have to go to the error path
which sets errno correctly rather than returning directly.
Fixes: b3fbfad7ae ("fs: dentry cache implementation")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 26 Sep 2018
|
fs: ramfs: Free data when file is unlinked
...
Since the switch to dentry cache implementation the memory is no
longer freed when a file in ramfs is deleted. Fix this.
Fixes: b283b72639 ("fs: ramfs: Switch to dentry cache implementation")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 26 Sep 2018
|
2018-09-17 |
fs: devfs: fix r/w permissions
...
The real r/w flags were lost in the switch to dentry cache
implementation. Restore them.
Fixes: 9137c41915 ("fs: devfs: Switch to dentry cache implementation")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 17 Sep 2018
|
fs: devfs: Create device files as character devices
...
Without this files in /dev/ appear as regular files. copy_file()
stumbles upon this as it tries a truncate() on that files which
then fails. Create the files as character devices so that copy_file()
works as expected.
Fixes: 9137c41915 ("fs: devfs: Switch to dentry cache implementation")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Giorgio Dal Molin <giorgio.nicole@arcor.de>
Sascha Hauer
committed
on 17 Sep 2018
|
2018-09-10 |
fs: tftp: Use pr_debug for errors
...
This has been debug output before for good reasons. The users will
usually print the error messages when they want to.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 10 Sep 2018
|
2018-08-30 |
fs: tftp: improve file size handling
...
Previously we used FILE_SIZE_STREAM unconditionally. Instead, fill the
inode size with a valid filesize if we have one and only if not fall
back to FILE_SIZE_STREAM.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 30 Aug 2018
|
fs: tftp: hide files which are actually not present on the server
...
In tftp_lookup we claimed that every desired file is there. This leads
to problems when a user only tests if a file is present and makes
decisions upon this information. Rather than claiming that all files
are present do a tftp_do_open() on the files and see if it is really
there.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 30 Aug 2018
|
fs: tftp: fix return value
...
When tftp_get_inode() fails it is a sign for a out of memory situtation
rather than an indicator for no space left on the filesystem, so return
-ENOMEM.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 30 Aug 2018
|
fs: tftp: fix memory hole
...
dpath() returns a pointer to an allocated string, so we have to free it.
Put the pointer into our file private data and free it on close time.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 30 Aug 2018
|