| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Script does what is expected and tries to do it as
smartly as possible.
+ remove occurrences of two blank comment lines
next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
contain CVS Ids
+ If the processing left a blank line at the top of
a file, it was removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fat_file_datasync() read every cluster of the file into the cache
and then synchronized it step-by-step. For unmodified buffers this is a
non-operation. For modified buffers this will wake-up the swapout task
which performs then a single buffer write operation. This is usually
quite inefficient. Firstly we do single buffer writes, secondly we
may perform a lot of unnecessary read operations (for huge files this is
really bad), and thirdly this leads likely to cache evictions.
The synchronization procedure is replaced by a simple
rtems_bdbuf_sync_dev(). This has the side-effect that also buffers not
related to the file are synchronized, but since the modified list is
normally short this should be acceptable.
|
|
|
|
|
| |
Space that grows due to truncate or write offsets beyond the current
file size must be zero filled.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to POSIX the lseek() function shall not, by itself, extend the
size of a file.
Remove the size field of rtems_libio_t. A file has only one size but
may have multiple open file descriptors. Thus a file size field in the
file descriptor may lead to inconsistencies.
New default handlers rtems_filesystem_default_lseek_file() and
rtems_filesystem_default_lseek_directory().
|
|
|
|
|
| |
See http://www.rtems.org/pipermail/rtems-devel/2012-May/001006.html
for details.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Update the assert macro to the new IMFS_jnode_t.
|
|
|
|
| |
Use UID and GID of the NFS handle for node and symbolic link creation.
|
|
|
|
|
| |
According to POSIX the read() call should return the maximum number of
bytes available for regular files.
|
|
|
|
|
|
|
| |
In case rtems_bdbuf_read() returns an error status, the block device
buffer pointer will be set to NULL. In RFS the chain node of the block
device buffer will be used for RFS purposes. We must not do this after
an erroneous read.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The functions
o rtems_bdbuf_get(),
o rtems_bdbuf_read(),
o rtems_bdbuf_syncdev(), and
o rtems_bdbuf_purge_dev(),
use now the disk device instead of the device identifier. This makes
bdbuf independent of rtems_disk_obtain() and rtems_disk_release(). It
is the responsiblity of the file system to obtain the disk device. This
also reduces the overhead to get a buffer.
The key for the AVL tree uses now the disk device instead of the device
identifier. The pointer is interpreted as an unsigned integer. This
reduces the memory overhead and makes the comparison operation a bit
faster.
Removed function rtems_bdbuf_purge_major(). This function was too
destructive and could have unpredictable side effects.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Generic nodes are an alternative to standard drivers in RTEMS. The
handlers of a generic node are called with less overhead compared to the
standard driver operations. The usage of file system node handlers
enable more features like support for fsync() and fdatasync(). The
generic nodes use the reference counting of the IMFS. This provides
automatic node destruction when the last reference vanishes.
Extend type IMFS_types_union by new type IMFS_generic_t.
Extend enum IMFS_jnode_types_t by IMFS_GENERIC.
Add functions
o IMFS_make_generic_node(),
o IMFS_is_imfs_instance(),
o IMFS_generic_get_context_by_node(),
o IMFS_generic_get_context_by_location(), and
o IMFS_generic_get_context_by_iop().
New test fstests/fsimfsgeneric01.
|
|
|
|
|
|
| |
Add and use structure IMFS_node_control with support functions. This
helps to make high level functions independent of the node type and
reduces the number of branches in the code.
|
|
|
|
| |
Add and use IMFS_type() and IMFS_is_directory().
|
| |
|
|
|
|
|
| |
The introduction of reference counting of nodes avoids the removal of
open nodes and potential usage of freed memory.
|
|
|
|
|
| |
Directory entry add or removal operations are protected by the file
system instance lock. There is no need for protected chain operations.
|
|
|
|
|
| |
Other threads may add or remove directory entries during a read of the
directory. Use the file system instance lock for protection.
|
|
|
|
|
| |
Allow creation of nodes with an unsupported type. Later the usage of
such nodes will return an error status.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o Removed RTEMS_LIBIO_PERMS_SEARCH.
o Renamed RTEMS_LIBIO_PERMS_READ in RTEMS_FS_PERMS_READ.
o Renamed RTEMS_LIBIO_PERMS_WRITE in RTEMS_FS_PERMS_WRITE.
o Renamed RTEMS_LIBIO_PERMS_EXEC in RTEMS_FS_PERMS_EXEC.
o Renamed RTEMS_LIBIO_FOLLOW_HARD_LINK in RTEMS_FS_FOLLOW_HARD_LINK.
o Renamed RTEMS_LIBIO_FOLLOW_SYM_LINK in RTEMS_FS_FOLLOW_SYM_LINK.
o Renamed RTEMS_LIBIO_MAKE in RTEMS_FS_MAKE.
o Renamed RTEMS_LIBIO_EXCLUSIVE in RTEMS_FS_EXCLUSIVE.
o Renamed RTEMS_LIBIO_ACCEPT_RESIDUAL_DELIMITERS in
RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS.
o Renamed RTEMS_LIBIO_REJECT_TERMINAL_DOT in
RTEMS_FS_REJECT_TERMINAL_DOT.
|
|
|
|
|
|
|
| |
New defaults rtems_filesystem_default_fsync_or_fdatasync() and
rtems_filesystem_default_fsync_or_fdatasync_success() for fsync_h and
fdatasync_h. The rtems_filesystem_default_fsync_or_fdatasync() sets now
errno to EINVAL according to POSIX.
|
|
|
|
| |
Change error indication to ESPIPE in rtems_filesystem_default_lseek().
|
|
|
|
| |
New function rtems_filesystem_default_lseek_success().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o A new data structure rtems_filesystem_global_location_t was
introduced to be used for
o the mount point location in the mount table entry,
o the file system root location in the mount table entry,
o the root directory location in the user environment, and
o the current directory location in the user environment.
During the path evaluation global start locations are obtained to
ensure that the current file system instance will be not unmounted in
the meantime.
o The user environment uses now reference counting and is protected
from concurrent access.
o The path evaluation process was completely rewritten and simplified.
The IMFS, RFS, NFS, and DOSFS use now a generic path evaluation
method. Recursive calls in the path evaluation have been replaced
with iteration to avoid stack overflows. Only the evaluation of
symbolic links is recursive. No dynamic memory allocations and
intermediate buffers are used in the high level path evaluation. No
global locks are held during the file system instance specific path
evaluation process.
o Recursive symbolic link evaluation is now limited by
RTEMS_FILESYSTEM_SYMLOOP_MAX. Applications can retrieve this value
via sysconf().
o The device file system (devFS) uses now no global variables and
allocation from the workspace. Node names are allocated from the
heap.
o The upper layer lseek() performs now some parameter checks.
o The upper layer ftruncate() performs now some parameter checks.
o unmask() is now restricted to the RWX flags and protected from
concurrent access.
o The fchmod_h and rmnod_h file system node handlers are now a file
system operation.
o The unlink_h operation has been removed. All nodes are now destroyed
with the rmnod_h operation.
o New lock_h, unlock_h, clonenod_h, and are_nodes_equal_h file system
operations.
o The path evaluation and file system operations are now protected by
per file system instance lock and unlock operations.
o Fix and test file descriptor duplicate in fcntl().
o New test fstests/fsnofs01.
|
|
|
|
|
| |
Semaphores of type RTEMS_SIMPLE_BINARY_SEMAPHORE are not suitable for a
mutex. Use RTEMS_BINARY_SEMAPHORE with RTEMS_INHERIT_PRIORITY instead.
|
| |
|
| |
|
|
|
|
|
| |
For symbolic links, the length in bytes of the pathname contained in the
symbolic link should be returned in st_size.
|
|
|
|
| |
There existed no calling function for this handler.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
PR 1968/filesystem
* libfs/src/rfs/rtems-rfs-file.c: Fix to the seek bug where a seek
to 0 after reading the end of the file did not point to the
correct block.
* libfs/src/rfs/rtems-rfs-rtems.h,
libfs/src/rfs/rtems-rfs-trace.c: Fix the trace flags. Used to fix
the bug.
|
|
|
|
| |
* libfs/src/pipe/pipe.c: Include <rtems/pipe.h> (Missing prototype).
|
|
|
|
|
|
| |
* libfs/src/imfs/imfs_debug.c: Make IMFS_print_jnode,
IMFS_dump_directory static.
* libfs/src/imfs/memfile.c: Make memfile_free_blocks_in_table static.
|
|
|
|
|
| |
* libfs/src/imfs/deviceerrno.c:
Include <rtems/devfs.h> for missing prototypes.
|
|
|
|
|
|
| |
* libfs/src/rfs/rtems-rfs-rtems-dev.c:
Remove duplicate prototype of rtems_deviceio_errno.
Include <rtems/devfs.h> for rtems_deviceio_errno().
|
|
|
|
|
|
|
|
| |
* libfs/src/imfs/imfs_eval.c: Make IMFS_evaluate_permission,
IMFS_evaluate_hard_link, IMFS_evaluate_sym_link static.
* libfs/src/imfs/imfs_fifo.c: Make IMFS_fifo_open,
IMFS_fifo_close, IMFS_fifo_read, IMFS_fifo_write,
IMFS_fifo_ioctl static.
|
| |
|
|
|
|
|
|
|
|
| |
PR1945/cpukit
* libfs/src/nfsclient/src/nfs.c, libfs/src/rfs/rtems-rfs-rtems-dev.c,
libfs/src/rfs/rtems-rfs-rtems-dir.c,
libfs/src/rfs/rtems-rfs-rtems-file.c, libnetworking/lib/ftpfs.c,
libnetworking/lib/tftpDriver.c: Replace rtems_off64_t with off_t.
|
|
|
|
|
|
|
| |
PR1945/cpukit
* libfs/src/imfs/deviceio.c, libfs/src/imfs/imfs.h,
libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_fifo.c,
libfs/src/imfs/memfile.c: Replace rtems_off64_t with off_t.
|
|
|
|
|
|
|
| |
PR1945/cpukit
* libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_dir.c,
libfs/src/dosfs/msdos_file.c:
Replace rtems_off64_t with off_t.
|
|
|
|
|
|
|
| |
PR1945/cpukit
* libfs/src/defaults/default_ftruncate.c,
libfs/src/defaults/default_lseek.c:
Replace rtems_off64_t with off_t.
|
|
|
|
| |
* libfs/src/rfs/rtems-rfs-dir.c: Rename PRIdoff_t into PRIooff_t.
|
|
|
|
|
| |
* libfs/src/rfs/rtems-rfs-dir.h: Commit the missing change. Part
of removing the hardcoded dir string.
|