summaryrefslogtreecommitdiff
path: root/cpukit/libfs/src/rfs (follow)
AgeCommit message (Collapse)Author
2020-04-16Canonicalize config.h includeSebastian Huber
Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
2019-01-10Fix format warnings due to ino_t changesSebastian Huber
2018-12-025 spelling errors for a Google Code-In task.Jacob Shin
Username: deuteriumoxide Email: jacobshin313@gmail.com
2018-08-07rfs: Remove erroneous call of rtems_disk_release()Sebastian Huber
The function rtems_rfs_buffer_sync() erroneously calls rtems_disk_release(). This screws up the reference counting of the disk. Close #3484.
2018-04-11Fill in the correct d_off in rtems_rfs_dir_read.Fan Deng
rtems_rfs_dir_read searches the directory inode's entries list starting at the specified offset until an empty entry (last entry) is encountered. It fills in a struct dirent with the name of the entry, length of the name, ino of the entry, and the absolute offset of the entry in the parent directory's entries list. Unfortunately, the stock implementation of rtems_rfs_dir_read returns a somewhat arbitrary offset (as dirent::d_off), while rtems_rfs_dir_lookup_ino always returns the correct offset. This change fixes that logic so the returned offset is accurate. Tested by comparing the offset returned in dirent with the result of rtems_rfs_dir_lookup_ino.
2018-04-11Fixes bitmap allocation accounting logic in rtems-rfs-bitmaps.cFan Deng
The bitmap allocation accounting logic in rtems-rfs-bitmaps.c is flawed around control->free. Specifically: In rtems_rfs_bitmap_map_set(): control->free is only decremented when its corresponding search bit is toggled. This is wrong and will miss on average 31/32 set updates. In rtems_rfs_bitmap_map_clear(): control->free is incremented unconditionally. The correct behavior is: When updating the map, check if the bit is already set/clear. Only update control->free when the bit is toggled. This change enforced the correct behavior. Tested by inspecting the internal data structure.
2018-04-11Reset free count properly in rtems_rfs_bitmap_map_clear_all().Fan Deng
In rtems_rfs_bitmap_map_clear_all(), control->free is set to 'elements', which is the number of elements in the bitmap. This is incorrect, as control->free should contain the number of free bits, not elements. This change fixes the logic and resets control->free to a correct value.
2018-04-11Make bit addressing consistent in rtems_rfs_group.cFan Deng
This change fixes https://devel.rtems.org/ticket/3089. Briefly, rtems_rfs_group.c contains conflicting conversions between block numbers and group number and bit offset pairs. This caused the actual bit stored on the bitmask to be one bit displaced from its intended location. For more details, please see the associated ticket. Tested by inspecting the written bitmasks with and without this change.
2018-02-02RFS: Use self-contained recursive mutexSebastian Huber
Update #2843.
2018-01-25Remove make preinstallChris Johns
A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
2018-01-23rfs: Fix format warningSebastian Huber
Update #3082.
2018-01-22rfs: Fix for 64-bit targetsSebastian Huber
The RTEMS_BLKIO_SETBLKSIZE IO control expects an uint32_t parameter and not a size_t which is 64-bits on 64-bit targets. Update #3082.
2017-12-13RFS: Include <rtems/rtems-rfs-shell.h>Sebastian Huber
Prepare for header file move to common include directory. Update #3254.
2017-09-15libio: Add rtems_libio_iop_is_append()Sebastian Huber
Update #3132.
2017-07-14posix/mmap: Add support for file handler and MAP_ANONKevin Kirspel
Added a mmap file handler to struct _rtems_filesystem_file_handlers_r. Updated each file handler object to support the default mmap handler. Updated mmap() to call the mmap handler for MAP_SHARED. Added a mmap file handler for shm Added support for MAP_ANON in mmap(). Updates #2859
2017-04-18rtems/inttypes.h: New file. Uses contents from cpukitJoel Sherrill
Provide extentions to <inttpes.h> PRIxxx constants for more POSIX types. Start with existing definitions found in RTEMS Project owned code in cpukit/. updates #2983.
2016-04-07libblock: Drop superfluous <stdlib.h> includeSebastian Huber
Drop superfluous <stdlib.h> include from <rtems/diskdevs.h> since this leads to conflicts with the latest Newlib in case this header file is used in the FreeBSD kernel space, e.g. for USB mass storage support.
2016-01-05Filesystem: Remove superfluous permission checksSebastian Huber
The permission is check by the upper layer.
2015-10-26RFS: Fix resource leakSebastian Huber
Close #2433.
2015-03-17cpukit/libdl/rtl-obj-comp.c: Use correct printf() specificationJoel Sherrill
2015-03-16rfs: cast minor to uintptr_t to truncate explicitlyGedare Bloom
2015-02-09Filesystem: Delete unused fsmountme_h handlerSebastian Huber
2015-01-22Filesystem: Delete node type operationSebastian Huber
Use the fstat handler instead.
2014-12-23Correct error return mismatchesNick Withers
Closes #2139
2014-11-25rtems-rfs-rtems.c: Add cast to address warningJoel Sherrill
2014-10-16rfs: explicitly cast to dev_tGedare Bloom
2014-09-16Revert: rtems-rfs-buffer.c: Correct printf() format specifiers to eliminate ↵Joel Sherrill
warnings This may actually be a problem in inttypes.h.
2014-09-04rtems-rfs-buffer.c: Correct printf() format specifiers to eliminate warningsJoel Sherrill
2014-09-03libfs: Fix the warning in the RFS.Chris Johns
Return the first error if one or more happen when deleting an inode.
2014-04-25libfs/rfs: Fix the fstime failures for the RFS file system.Chris Johns
2014-03-21Change all references of rtems.com to rtems.org.Chris Johns
2013-12-20Filesystem: Use default kqfilter and poll handlerSebastian Huber
2013-12-20Filesystem: Add readv/writev handlersSebastian Huber
The readv() and writev() support was implemented in terms of multiple calls to the read and write handlers. This imposes a problem on device files which use an IO vector as single request entity. For example a low-level network device (e.g. BPF(4)) may use an IO vector to create one frame from multiple protocol layers each with its own IO vector entry.
2013-12-19For PR 2164 - RFS File System - fix bitmap_create_search loop bugAlan Cudmore
This is for the RFS file system. There is a bug in the rtems_rfs_bitmap_create_search loop. It is supposed to iterate over the range of bits in a search element ( usually 32 bits ), so it should loop through bits 0 through 31. Instead it loops through 0 - 32, causing some blocks not to be allocated. As in PR 2163, this depends on the block size and number of blocks in a file system. Block sizes and group sizes that are powers of 2 seem to work fine ( 512 byte blocks, 4096 block groups, etc ). When the block sizes are not powers of 2, then this loop error causes some of the blocks at the end of a group to be skipped, preventing 100% of the blocks from being used. A simple test for this and PR2163 is to create a RAM disk with block size 3900 and at least 1 full group ( 31200 blocks ). A file system with these sizes will not be able to allocate 100% of the blocks.
2013-12-19For PR 2162 - RFS File System - statvfs reports 1 block freeAlan Cudmore
This is for the RFS file system. The statvfs call reports 1 block free when the file system is full because it does not account for the superblock in its calculation of free blocks. This is a simple fix that adjusts the number of blocks reported to account for the superblock. We may want to wait for a more complete solution such as locating the superblock in each group.
2013-12-19For PR 2163 - RFS File System - fix group search algorithm bugAlan Cudmore
This is for the RFS file system. There is a bug in the group search algorithm where it will skip groups, causing blocks to remain unallocated. This is dependant on the size of the blocks and number of blocks in a group, so it does not always show up. The fix corrects the skipping of groups during the search, allowing all of the blocks to be found.
2013-12-10PR2138: rtems_rfs_rtems_initialize() can erroneously set errno.Chris Johns
Patch from Nick for this. Thanks.
2013-11-21statvfs and ALL filesystem handlers: Add restrict keyword.Daniel Ramirez
2013-10-16RFS: Include missing header fileSebastian Huber
2013-09-12Filesystem: Add and use rtems_filesystem_chmod()Sebastian Huber
Implement POSIX requirements in the high-level file system layer.
2013-08-27RFS: Use unprotected chain operationsSebastian Huber
This area is protected by the RFS file system instance lock.
2013-08-09Add "const void* data" parameter to rtems_rfs_rtems_initialize()'s ↵Nick Withers
declaration, matching its definition See https://www.rtems.org/bugzilla/show_bug.cgi?id=2137
2013-08-06Fix compiler warningsR. Diez
2013-07-27Return the amount of data written when an error occurs rather thanChris Johns
the error. The change lets the mrfs_fsrdwr test pass.
2013-07-23Include missing <string.h>Sebastian Huber
2013-03-22libfs: Always use geteuid() and getegid()Sebastian Huber
The two functions are independent of the POSIX API.
2013-01-10rfs: Doxygen group cannot have a dash in itJoel Sherrill
Change rtems-rfs to rtems_rfs
2013-01-10cpukit: Doxygen group fixes and many warnings addressedJoel Sherrill
The output of the modules.html is much improved. Most filesystem and POSIX API related groups are properly nested. Some formatting issues were addressed as were multiple inconsistencies.
2013-01-08libfs: Doxygen Clean Up Task #1Alex Ivanov
http://www.google-melange.com/gci/task/view/google/gci2012/8120204 Patch committed with fixes for whitespace issues.
2013-01-04libfs: Doxygen Clean Up Task #2Mathew Kallada
There were minor conflicts and the modifications that were in the repo were favored over the modifications in the submitted patch.