summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill2012-05-11146-297/+0
| | | | | | | | | | | | 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.
* dosfs: Remove fat_file_datasync()Sebastian Huber2012-05-118-179/+73
| | | | | | | | | | | | | | | 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.
* Filesystem: PR1893: Fix write and truncate handlerSebastian Huber2012-05-119-37/+137
| | | | | Space that grows due to truncate or write offsets beyond the current file size must be zero filled.
* Filesystem: PR1871: Fix O_APPENDSebastian Huber2012-05-118-143/+33
|
* Filesystem: PR1398: Fix lseek() mechanicSebastian Huber2012-05-1120-332/+119
| | | | | | | | | | | | 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().
* Revert: Remove CVS IdsJoel Sherrill2012-05-072-0/+8
| | | | | See http://www.rtems.org/pipermail/rtems-devel/2012-May/001006.html for details.
* nfsclient: Add rename operationSebastian Huber2012-05-041-1/+45
|
* nfsclient: Fix hard link operationSebastian Huber2012-05-041-1/+1
|
* Filesystem: Use proper parameter in NFSSebastian Huber2012-05-041-1/+1
|
* Filesystem: Remove pipe_lseek()Sebastian Huber2012-05-043-35/+1
|
* Remove CVS-Ids.Ralf Corsépius2012-05-042-8/+0
|
* IMFS: Update IMS_assert check when RTEMS_DEBUG is enabled.Chris Johns2012-04-281-1/+1
| | | | Update the assert macro to the new IMFS_jnode_t.
* nfsclient: Use UID and GID of NFS handleSebastian Huber2012-04-231-10/+10
| | | | Use UID and GID of the NFS handle for node and symbolic link creation.
* nfsclient: POSIX conformanceSebastian Huber2012-04-231-9/+37
| | | | | According to POSIX the read() call should return the maximum number of bytes available for regular files.
* PR2039: Fix NULL pointer accessSebastian Huber2012-03-141-2/+2
| | | | | | | 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.
* libblock: Change bdbuf APISebastian Huber2012-03-138-77/+86
| | | | | | | | | | | | | | | | | | | | 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.
* IMFS: Node specific stat handlersSebastian Huber2012-03-135-58/+81
|
* IMFS: Generic device identifierSebastian Huber2012-03-131-0/+12
|
* IMFS: Add make generic node supportSebastian Huber2012-03-133-0/+155
| | | | | | | | | | | | | | | | | | | | | | 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.
* IMFS: Add and use node controlSebastian Huber2012-03-1314-315/+419
| | | | | | 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.
* IMFS: New support functionsSebastian Huber2012-03-139-31/+43
| | | | Add and use IMFS_type() and IMFS_is_directory().
* IMFS: Removed superfluous imfs_dir_open()Sebastian Huber2012-03-133-35/+1
|
* IMFS: Reference counting for nodesSebastian Huber2012-03-1316-126/+84
| | | | | The introduction of reference counting of nodes avoids the removal of open nodes and potential usage of freed memory.
* IMFS: Use unprotected chain operationsSebastian Huber2012-03-134-17/+28
| | | | | Directory entry add or removal operations are protected by the file system instance lock. There is no need for protected chain operations.
* IMFS: Lock the file system during directory readsSebastian Huber2012-03-131-21/+15
| | | | | Other threads may add or remove directory entries during a read of the directory. Use the file system instance lock for protection.
* IMFS: Do not check for unsupported typesSebastian Huber2012-03-131-10/+0
| | | | | Allow creation of nodes with an unsupported type. Later the usage of such nodes will return an error status.
* Filesystem: Rename definesSebastian Huber2012-03-136-12/+12
| | | | | | | | | | | | | | | 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.
* Filesystem: New defaults fsync_h and fdatasync_hSebastian Huber2012-03-1317-86/+62
| | | | | | | 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.
* Filesystem: Change error indicationSebastian Huber2012-03-131-4/+6
| | | | Change error indication to ESPIPE in rtems_filesystem_default_lseek().
* Filesystem: New functionSebastian Huber2012-03-132-0/+30
| | | | New function rtems_filesystem_default_lseek_success().
* Filesystem: Reference counting for locationsSebastian Huber2012-03-13105-4582/+2093
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* PR 2026/filesystem - Fix semaphore attributesSebastian Huber2012-02-231-7/+2
| | | | | Semaphores of type RTEMS_SIMPLE_BINARY_SEMAPHORE are not suitable for a mutex. Use RTEMS_BINARY_SEMAPHORE with RTEMS_INHERIT_PRIORITY instead.
* Moved empty test in front of busy testsSebastian Huber2012-02-101-10/+10
|
* Check that the file offset is valid after a seekSebastian Huber2012-02-092-14/+8
|
* POSIX conformanceSebastian Huber2012-02-081-1/+2
| | | | | For symbolic links, the length in bytes of the pathname contained in the symbolic link should be returned in st_size.
* Removed fpathconf file system node handler.Sebastian Huber2012-02-0216-39/+1
| | | | There existed no calling function for this handler.
* Remove all .cvsignore files.Joel Sherrill2012-02-014-14/+0
|
* 2011-12-09 Chris Johns <chrisj@rtems.org>Chris Johns2011-12-093-31/+72
| | | | | | | | | | 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.
* 2011-12-06 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-12-061-0/+1
| | | | * libfs/src/pipe/pipe.c: Include <rtems/pipe.h> (Missing prototype).
* 2011-12-06 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-12-062-3/+3
| | | | | | * 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.
* 2011-12-02 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-12-021-0/+1
| | | | | * libfs/src/imfs/deviceerrno.c: Include <rtems/devfs.h> for missing prototypes.
* 2011-12-02 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-12-021-5/+1
| | | | | | * libfs/src/rfs/rtems-rfs-rtems-dev.c: Remove duplicate prototype of rtems_deviceio_errno. Include <rtems/devfs.h> for rtems_deviceio_errno().
* 2011-12-02 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-12-022-9/+9
| | | | | | | | * 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.
* Remove stray whitespaces.Ralf Corsepius2011-11-0644-536/+536
|
* 2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-11-064-19/+27
| | | | | | | | 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.
* 2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-11-065-20/+20
| | | | | | | 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.
* 2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-11-063-10/+10
| | | | | | | 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.
* 2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-11-062-3/+3
| | | | | | | PR1945/cpukit * libfs/src/defaults/default_ftruncate.c, libfs/src/defaults/default_lseek.c: Replace rtems_off64_t with off_t.
* 2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-11-061-3/+3
| | | | * libfs/src/rfs/rtems-rfs-dir.c: Rename PRIdoff_t into PRIooff_t.
* 2011-11-04 Chris Johns <chrisj@rtems.org>Chris Johns2011-11-031-2/+24
| | | | | * libfs/src/rfs/rtems-rfs-dir.h: Commit the missing change. Part of removing the hardcoded dir string.