2018-09-18 |
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 18 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 18 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
|
fs: tftp: overhaul debugging
...
- use pr_* instead of debug()
- use pr_vdebug for the less interesting messages
- use pr_err for error messages
- print state as clear text and not as number
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 30 Aug 2018
|
2018-08-13 |
Merge branch 'for-next/memcmds'
Sascha Hauer
committed
on 13 Aug 2018
|
2018-08-10 |
fs: ramfs: get chunks zero initialized
...
Initialize new chunks to zero, otherwise a ->truncate call may
result in uninitialized data in files.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 10 Aug 2018
|
2018-07-13 |
fs: squashfs: Switch to dentry cache implementation
...
While at it implement symlink support.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 13 Jul 2018
|
fs: cramfs: Switch to dentry cache implementation
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 13 Jul 2018
|
fs: tftp: Switch to dentry cache implementation
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 13 Jul 2018
|
fs: nfs: Switch to dentry cache implementation
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 13 Jul 2018
|
fs: ubifs: Switch to dentry cache implementation
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 13 Jul 2018
|
2018-07-11 |
fs: ext4: Switch to dentry cache implementation
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 11 Jul 2018
|
fs: devfs: Switch to dentry cache implementation
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 11 Jul 2018
|
fs: ramfs: Switch to dentry cache implementation
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 11 Jul 2018
|
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>
Sascha Hauer
committed
on 11 Jul 2018
|
2018-06-25 |
fs: devfs-core: Make use of devpath_to_name()
...
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Andrey Smirnov
authored
on 24 Jun 2018
Sascha Hauer
committed
on 25 Jun 2018
|
2018-06-14 |
fs: fix memory access via /dev/mem for MIPS64
...
lseek checks for non-negative in-memory offsets (addresses), failing otherwise.
However negative address 0xffffffffXXXXXXXX is a valid MIPS64 virtual address.
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Peter Mamonov
authored
on 13 Jun 2018
Sascha Hauer
committed
on 14 Jun 2018
|
2018-04-06 |
fs: Fix finding correct directory for mkdir/rmdir
...
When there are links in the path mkdir/rmdir are called with then
canonicalize_path is needed which resolves the links.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 6 Apr 2018
|
fs: Cleanup whitespace damage
...
fs.c has some whitespaces where there should be tabs. Fix it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 6 Apr 2018
|
fs: Move mem_write/mem_read to devfs-core
...
fs.c is already heavily filled with code. Move mem_write/mem_read
to devfs-core where it fits better.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 6 Apr 2018
|
fs: Add super_operations
...
Add a struct super_operations we can use later when we get a fs
implementation closer to Linux. Only add the functions we'll likely
need though.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 6 Apr 2018
|
ubifs: remove dead code
...
Remove code that was added to UBIFS for U-Boot but that is not needed
for barebox.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 6 Apr 2018
|
ubifs: Remove Linux struct definitions we already have
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 6 Apr 2018
|
ubifs: remove dead code
...
Remove stuff that was added to UBIFS for U-Boot which we do not need
because we already have it in the Linux header files.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 6 Apr 2018
|
rename file_operations -> cdev_operations
...
Linux also has struct file_operations which are something different.
Rename our file_operations to cdev_operations which better matches
what we have.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 6 Apr 2018
|
2018-03-19 |
fs: check pointer returned by get_fsdevice_by_path before dereferencing
...
In __canonicalize_path() we dereference the pointer returned by
get_fsdevice_by_path() without checking if the pointer is NULL or not.
When the pointer is NULL it leads to an Ooops.
Ooops, address error on load or ifetch!
$ 0 : 00000000 00000001 a0000026 a0811c10
$ 4 : a0402e60 a0402e48 a0811c00 a0402e58
$ 8 : 00000001 00000000 0000005a 00000023
$12 : 00000000 00000002 00601021 00000000
$16 : a0402e60 a0402e50 a0402e39 a0810000
$20 : a0402e38 a0811420 a0811424 00000000
$24 : 00000000 a080de10
$28 : 87f87d40 a03ffa68 a0810000 a080ce30
Hi : 00000002
Lo : 00000000
epc : a080ce34
ra : a080ce30
Status: 00000006
Cause : 40008010
Config: 80040483
### ERROR ### Please RESET the board ###
Fixes: d79a81736 fs: Don't bother filesystems without link support with additional stat() calls
Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Gaël PORTAY
authored
on 18 Mar 2018
Sascha Hauer
committed
on 19 Mar 2018
|