summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-11-02libblock: Avoid NULL pointer accessSebastian Huber1-1/+3
2015-03-05libblock: Fix warningSebastian Huber1-2/+1
2015-01-27IMFS: Replace node union with individual structSebastian Huber1-11/+10
This reduces the average node size. Add and use IMFS_GENERIC_INITIALIZER().
2014-11-28bdbuf: Fix race condition with sync active flagSebastian Huber1-5/+11
Bug report by Oleg Kravtsov: In rtems_bdbuf_swapout_processing() function there is the following lines: if (bdbuf_cache.sync_active && !transfered_buffers) { rtems_id sync_requester; rtems_bdbuf_lock_cache (); ... } Here access to bdbuf_cache.sync_active is not protected with anything. Imagine the following test case: 1. Task1 releases buffer(s) with bdbuf_release_modified() calls; 2. After a while swapout task starts and flushes all buffers; 3. In the end of that swapout flush we are before that part of code, and assume there is task switching (just before "if (bdbuf_cache.sync_active && !transfered_buffers)"); 4. Some other task (with higher priority) does bdbuf_release_modified and rtems_bdbuf_syncdev(). This task successfully gets both locks sync and pool (in rtems_bdbuf_syncdev() function), sets sync_active to true and starts waiting for RTEMS_BDBUF_TRANSFER_SYNC event with only sync lock got. 5. Task switching happens again and we are again before "if (bdbuf_cache.sync_active && !transfered_buffers)". As the result we check sync_active and we come inside that "if" statement. 6. The result is that we send RTEMS_BDBUF_TRANSFER_SYNC event! Though ALL modified messages of that task are not flushed yet! close #1485
2014-11-25bdbuf: Use rtems_cache_aligned_malloc()Sebastian Huber1-9/+6
2014-11-20bdbuf: Use rtems_cache_get_data_line_size()Sebastian Huber1-9/+1
2014-08-05Add and use RTEMS_CONTAINER_OF()Sebastian Huber1-2/+2
2014-06-03libblock: Avoid recursive mutexSebastian Huber1-9/+10
2014-06-02libblock: Add RTEMS_BDBUF_USE_PTHREADRalf Kirchner2-62/+190
Use the PTHREAD mutexes and condition variables if available. This helps on SMP configurations to avoid the home grown condition variables via disabled preemption.
2014-06-02libblock: Use pthread_once() for initializationRalf Kirchner1-29/+25
Enabling and disabling preemption as done for single core will not work for SMP. In the bdbuf initialization preemption handling can be avoided in general by using pthread_once().
2014-04-15score: Add and use RTEMS_ZERO_LENGTH_ARRAYSebastian Huber2-2/+2
2014-03-21Change all references of rtems.com to rtems.org.Chris Johns30-30/+30
2014-03-14score: Add SMP lock profiling supportSebastian Huber1-1/+2
2014-03-11score: Add local context to SMP lock APISebastian Huber1-7/+7
Add a local context structure to the SMP lock API for acquire and release pairs. This context can be used to store the ISR level and profiling information. It may be later used to enable more sophisticated lock algorithms, e.g. MCS locks. There is only one lock that cannot be used with a local context. This is the per-CPU lock since here we would have to transfer the local context through a context switch which is very complicated.
2013-12-20Filesystem: Use default kqfilter and poll handlerSebastian Huber1-0/+2
2013-12-20Filesystem: Add readv/writev handlersSebastian Huber1-1/+3
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-04libblock: Use LAST for the last partition blockSebastian Huber1-1/+1
2013-12-03PR2157: fdisk partition table dump improvementWendell P Silva1-1/+1
Show the correct index of partition's last block (partition end). The documentation of struct rtems_bdpart_partition (P) says that the member 'end' is the "Block index for partition end (this block is not a part of the partition)". Then, the fdisk's partition table dump should print ((P)->end - 1). Currently, one can think that the last block of a partition P is superposing the beginning of the partition (P + 1). Example: ---------------------------------------- PARTITION TABLE ------------+------------+-------------- BEGIN | END | TYPE ------------+------------+-------------- 2048 | 133120 | FAT 32 133120 | 15628032 | FAT 32 ------------+------------+-------------- With be proposed patch, it would be: ---------------------------------------- PARTITION TABLE ------------+------------+-------------- BEGIN | END | TYPE ------------+------------+-------------- 2048 | 133119 | FAT 32 133120 | 15628031 | FAT 32 ------------+------------+--------------
2013-10-17Remove double count of start offsetRic Claus1-5/+5
2013-09-16libblock: PR2145: Limit maximum read-ahead blocksSebastian Huber2-3/+14
This helps to prevent stack overflows due to configuration errors.
2013-09-05flashdisk: swap arguments to checksum helperGedare Bloom1-1/+1
The arguments to rtems_fdisk_calc_crc16() are reversed when called from rtems_fdisk_page_checksum(). 26052 Operands don't affect result
2013-09-05nvdisk: swap arguments to checksum helperGedare Bloom1-1/+1
The arguments to rtems_nvdisk_calc_crc16() are reversed when called from rtems_nvdisk_page_checksum(). 26053 Operands don't affect result
2013-09-05sparse-disk: check return value from semaphore_obtain/releaseGedare Bloom1-2/+9
In case obtain/release is unsuccessful, cause a fatal error.
2013-09-05bdpart: Argument cannot be negativeGedare Bloom1-2/+3
If open(fd) fails then avoid the error path that calls close(fd).
2013-08-27libblock: Use unprotected chain extractSebastian Huber1-1/+1
This area is protected by the media mutex.
2013-08-26libblock: Avoid uninitialized variableSebastian Huber1-2/+1
2013-08-23libblock: PR2040: Avoid NULL pointer accessSebastian Huber1-6/+16
This partly reverts commit 08b9d534604fbf437743a9925ef28eb1b848510d. Avoid a NULL pointer access and perform the source segment erase if necessary.
2013-08-14libblock: Add missing initializerSebastian Huber1-1/+1
2013-08-14libblock: Add SMP supportSebastian Huber1-5/+7
2013-07-26score: Merge tod implementation into one fileSebastian Huber1-1/+1
Delete TOD_MICROSECONDS_PER_SECOND, TOD_MICROSECONDS_TO_TICKS() and TOD_MILLISECONDS_TO_TICKS().
2013-07-23Include missing <string.h>Sebastian Huber4-0/+5
2013-06-04libblock: Use UTF-8 converter in media managerSebastian Huber1-3/+10
2013-03-22ramdisk: Fix device name generationSebastian Huber1-1/+1
2013-02-21libblock: Do resource allocation in one placeSebastian Huber1-115/+153
All resource allocations take place in rtems_bdbuf_init() now. After rtems_bdbuf_init() no fatal errors can happen due to configuration errors or resource limits. This makes it easier to detect configuration errors for users.
2013-01-10cpukit: Use Consistent Beginning of Doxygen Group NotationJoel Sherrill8-39/+21
This is the result of a sed script which converts all uses of @{ into a consistent form.
2012-12-28Header File Doxygen Enhancement Task #1Alex Ivanov3-8/+5
2012-12-28Header File Doxygen Enhancement Task #7Mathew Kallada1-1/+1
2012-12-28Header File Doxygen Enhancement Task #2Mathew Kallada4-6/+8
2012-12-21libblock: Use @brief in documentationSebastian Huber1-22/+22
2012-12-21libblock: Doxygen Enhancement Task #1 correctionsJennifer Averett2-6/+5
2012-12-21libblock: Doxygen Enhancement Task #1Mathew Kallada20-70/+97
2012-12-21libblock: Use rtems_blkdev_create_partition()Sebastian Huber1-53/+82
Use rtems_blkdev_create_partition() instead of rtems_disk_create_log() to avoid problems with the huge IMFS_GENERIC_DEVICE_MAJOR_NUMBER.
2012-12-14Fix spellingSebastian Huber1-1/+1
2012-12-05libblock: Add sparse diskRalf Kirchner3-0/+525
2012-11-29libblock: DocumentationRalf Kirchner1-1/+1
2012-11-15score: Add RTEMS_FATAL_SOURCE_BDBUFSebastian Huber1-78/+73
Add rtems_bdbuf_fatal_code as a replacement for the previous fatal error codes. Remove unused error codes. Add new error codes. Use rtems_fatal() with RTEMS_FATAL_SOURCE_BDBUF as source.
2012-11-02libblock: DocumentationSebastian Huber2-98/+125
2012-11-02libblock: Block device transfer request API changeSebastian Huber5-48/+63
Add and use rtems_blkdev_request_done(). Block device transfer requests must signal the completion status now with rtems_blkdev_request_done(). The return value of the block device IO control will be ignored for transfer requests. The first parameter of rtems_blkdev_request_cb is now the transfer request structure. Renamed rtems_blkdev_request::req_done to rtems_blkdev_request::done to break third party drivers at compile time, otherwise this API change would result in runtime errors.
2012-10-30libblock: Use transient eventSebastian Huber1-5/+15
2012-10-26libblock: rtems_bdbuf_set_block_size() API changeSebastian Huber4-9/+28
The set block size must synchronize and purge the disk to avoid an inconsistent cache state and data corruption. The synchronization is optional depending on the new sync parameter. In some contexts a synchronization must not be performed, e.g. during disk creation.