summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* dosfs: Lazy update of FAT32 FS info sectorSebastian Huber2012-11-135-86/+84
| | | | | | | | | | | | | | | | | | | | | The FAT32 FS info sector contains hints for the free cluster count and the next free cluster. The previous code read these values during mount and replaced them with invalid values. The shutdown operation updated them with the current values. These values are only hints. Every FAT implementation must cope with arbitrary values. They are intended to speed up certain operations. Now we update the free cluster count and next free culster in the FAT32 FS info sector only during unmount or sync operations and only if the values have changed. This avoids writes to the FS info sector and conforms to the behaviour of Linux and Windows. The application can force an update of these values now with the fsync() and fdatasync() operations. Applications that only read will perform not write operations to the FAT32 FS info sector. The new fat_sync() function performs all non-file specific synchronizations.
* dosfs: Use FAT_UNDEFINED_VALUESebastian Huber2012-11-132-6/+6
|
* Remove rtems-rfs-bitmaps-ut.c.Ralf Corsépius2012-11-062-397/+1
|
* Include "rtems-rfs-shell.h".Ralf Corsépius2012-10-191-1/+2
|
* Filesystem: Reject removal of root nodesSebastian Huber2012-10-077-27/+8
| | | | | | | Reject the removal of file system instance root nodes in rmdir() and unlink() and return the EBUSY error status. File system instances can be removed with unmount(). Remove root node special cases in IMFS, DOSFS, and RFS.
* nfsclient: Format changesSebastian Huber2012-10-021-2/+2
|
* nfsclient: Add and use nfsEvaluateStatus()Sebastian Huber2012-10-021-114/+245
| | | | | The NFS status codes do not map directly to the corresponding errno values.
* nfsclient: Fix for short enumsSebastian Huber2012-10-021-0/+2
| | | | | | | | | | The XDR library has a problem on architectures with short enums like the default ARM EABI. Short enums means that the size of the enum type is variable and the smallest integer type to hold all enum values will be selected. For many enums this is char. The XDR library uses int32_t for enum_t. There are several evil casts from an enum type to enum_t which leads to invalid memory accesses on short enum architectures. A workaround is to add appropriate dummy enum values.
* nfsclient: PR2075: Fix node initializationSebastian Huber2012-10-021-13/+10
|
* IMFS: TypoSebastian Huber2012-08-091-1/+1
|
* dosfs: Use fs_info instead of mt_entrySebastian Huber2012-07-1114-267/+234
|
* dosfs: Fix for no space left on device conditionSebastian Huber2012-06-041-3/+5
| | | | | | The file size was wrong in the no space left on device condition. This resulted in turn in a read of an invalid block which lead to an EIO error status.
* Fix C files which had two semi-colons at EOLJoel Sherrill2012-05-311-1/+1
|
* dosfs: Fix format request with sectors per clusterSebastian Huber2012-05-311-2/+10
|
* dosfs: Fix print format stringSebastian Huber2012-05-291-1/+2
|
* nfsclient: Fix symbolic link evaluationSebastian Huber2012-05-161-66/+97
|
* Filesystem: Change pathconf_limits_and_optionsSebastian Huber2012-05-152-3/+3
| | | | | | The pathconf_limits_and_options field of rtems_filesystem_mount_table_entry_t is now a const pointer to reduce the read-write memory demands of file system instances.
* Filesystem: Move operations to mount table entrySebastian Huber2012-05-157-9/+12
| | | | | | | | | | | The scope of the file system operations is the file system instance. The scope of the file system node handlers is the file location. The benefit of moving the operations to the mount table entry is a size reduction of the file location (rtems_filesystem_location_info_t). The code size is slightly increased due to additional load instructions. Restructure rtems_filesystem_mount_table_entry_t to improve cache efficiency.
* Filesystem: Add const qualifier to lock/unlockSebastian Huber2012-05-155-10/+14
|
* Filesystem: PR1255: Move offset update to handlersSebastian Huber2012-05-154-4/+27
| | | | | | | It is now the responsibility of the read() and write() handler to update the offset field of the IO descriptor (rtems_libio_t). This change makes it possible to protect the IO descriptor from concurrent access by per file locks.
* Filesystem: Add shared device IO supportSebastian Huber2012-05-1510-356/+61
| | | | | The device IO file system support in IMFS, devFS, and RFS uses now a shared implementation.
* Filesystem: Use ioctl_command_tSebastian Huber2012-05-1512-71/+35
|
* rfs: Fix major and minor number integer typesSebastian Huber2012-05-151-25/+30
|
* dosfs: Remove unused parameterSebastian Huber2012-05-141-1/+0
|
* devfs: C++ compatibilitySebastian Huber2012-05-141-1/+1
|
* 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.