summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock/src/bdbuf.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove CVS-Ids.Ralf Corsépius2012-07-191-2/+0
|
* libblock: Fix read-ahead task wake-upSebastian Huber2012-07-091-5/+10
| | | | | | | | | In case the read-ahead task is not configured we must not send a wake-up event. This would send the wake-up event to the executing task. We must send the wake-up event only in case the request list changes from empty to non-empty. Since otherwise we may send a false transfer event.
* libblock: Move read-ahead trigger checkSebastian Huber2012-07-031-1/+2
| | | | | | In case the read-ahead task has a higher priority than the reading task, this ensures that the read-ahead request is issued after the read miss is serviced.
* libblock: Fix read-ahead trigger and next updateSebastian Huber2012-07-021-1/+1
| | | | | The previous version was sub-optimal for read-ahead transfer counts of one.
* libblock: Fix read-ahead trigger and next updateSebastian Huber2012-07-021-2/+2
|
* libblock: Fix continuous blocks write requestSebastian Huber2012-07-021-13/+6
|
* libblock: Remove unused fieldSebastian Huber2012-07-021-1/+0
|
* libblock: Add block device statisticsSebastian Huber2012-06-121-0/+34
|
* libblock: Remove const qualifierSebastian Huber2012-06-121-17/+17
| | | | This allows addtion of per disk statistics for example.
* libblock: Add read-ahead taskSebastian Huber2012-06-041-121/+226
| | | | | | | | | | | Read-ahead requests were previously executed in the context of the reading task. This blocks the reading task until the complete read with read-ahead transfer is finished. A read-ahead task is introduced to off-load the read-ahead transfer. This allows the reading task to work with the requested block more quickly. The read-ahead is triggered after two misses of ascending consecutive blocks or a read hit of a block read by the most-recent read-ahead transfer. The read-ahead feature is configurable and can be disabled.
* Fix C files which had two semi-colons at EOLJoel Sherrill2012-05-311-1/+1
|
* libblock: Move rtems_bdbuf_get_media_block() callSebastian Huber2012-05-311-75/+78
| | | | Move rtems_bdbuf_get_media_block() call inside the bdbuf lock.
* libblock: Simplify disk managementSebastian Huber2012-05-311-11/+16
| | | | | Add block_count and media_blocks_per_block to rtems_disk_device. Add and use rtems_disk_init_phys() and rtems_disk_init_log().
* libblock: Remove explicit bds_per_group parameterSebastian Huber2012-05-311-18/+13
|
* libblock: Remove const qualifier from bdbuf APISebastian Huber2012-05-311-4/+4
| | | | This allows addtion of per disk statistics for example.
* libblock: Add task stack size bdbuf configurationSebastian Huber2012-05-311-35/+41
| | | | | | The task stack size for the swap-out and worker tasks is now configurable. The bdbuf task resources are now included in the work space size estimate.
* libblock: Fix read request block count calculationSebastian Huber2012-05-241-1/+1
|
* libblock: Fix state descriptionsSebastian Huber2012-05-241-1/+1
|
* libblock: Fix purge device tree traversalSebastian Huber2012-05-141-1/+2
|
* libblock: Add rtems_bdbuf_set_block_size()Sebastian Huber2012-04-121-51/+73
| | | | | | | | The new function rtems_bdbuf_set_block_size() must be used to set the block size of a disk device. It will check if the block size is valid and set the new fields block_to_media_block_shift and bds_per_group of the rtems_disk_device structure. This helps to avoid complex arithmetic operations in the block device buffer get and read path.
* libblock: Change error status to fatal errorSebastian Huber2012-04-121-11/+7
| | | | | Calling the bdbuf API functions in the not configured state is now a fatal error.
* libblock: Use unprotected chain operationsSebastian Huber2012-04-121-4/+4
| | | | The transfer chain is accessed by at most one thread at a time.
* libblock: Use unprotected chain operationsSebastian Huber2012-04-121-17/+17
| | | | The chains are protected by the bdbuf cache lock.
* libblock: Change bdbuf APISebastian Huber2012-03-131-159/+78
| | | | | | | | | | | | | | | | | | | | 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.
* libblock: Remove superfluous volatile qualifierSebastian Huber2012-03-131-6/+6
| | | | All these variables are protected by the bdbuf cache mutex.
* 2011-11-03 Chris Johns <chrisj@rtems.org>Chris Johns2011-11-031-1/+1
| | | | | | | | | | | PR 1948/filesystem * libfs/src/rfs/rtems-rfs-file-system.c, libfs/src/rfs/rtems-rfs-file-system.h, libfs/src/rfs/rtems-rfs-format.c, libfs/src/rfs/rtems-rfs-rtems.c: Add support for mount passing an ASCIIZ string containing configuration options. Remove the hardcoded dir string and size. Fix comments. * libblock/src/bdbuf.c: Fix state labels in trace output.
* 2010-07-04 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-07-041-1/+0
| | | | | | | | | | | | | | | | * libblock/include/rtems/ide_part_table.h, libblock/src/bdbuf.c, libcsupport/src/__times.c, libcsupport/src/libio_init.c, libcsupport/src/mallocfreespace.c, libcsupport/src/mount-mgr.c, libcsupport/src/mount.c, libcsupport/src/rewinddir.c, libcsupport/src/seekdir.c, libcsupport/src/telldir.c, libcsupport/src/unmount.c, libfs/src/dosfs/fat.c, libfs/src/dosfs/fat_fat_operations.c, libfs/src/dosfs/msdos_create.c, libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_eval.c, libfs/src/dosfs/msdos_file.c, libfs/src/dosfs/msdos_format.c, libfs/src/dosfs/msdos_fsunmount.c, libfs/src/dosfs/msdos_initsupp.c, libfs/src/dosfs/msdos_rename.c, libmisc/cpuuse/cpuusagereport.c, libmisc/shell/vis.c, libmisc/stackchk/check.c, sapi/src/posixapi.c, telnetd/telnetd.c: Remove include of assert.h when it is not needed.
* 2010-05-18 Chris Johns <chrisj@rtems.org>Chris Johns2010-05-181-13/+40
| | | | | | | | * libblock/src/diskdevs.c, libblock/include/rtems/blkdev.h, libblock/src/bdbuf.c: PR 1448/filesystem. * libblock/include/rtems/blkdev.h, libblock/src/bdbuf.c: PR 1514/filesystem.
* 2010-04-29 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-04-291-0/+1
| | | | | | | PR1507 * libblock/src/bdbuf.c: Avoid NULL pointer access. * libblock/src/diskdevs.c: Fixed bounds check in rtems_disk_next().
* Fixed invalid chain extractThomas Doerfler2010-01-291-1/+2
|
* add purge capability to libblock, add proper test caseThomas Doerfler2010-01-261-113/+263
|
* 2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-01-191-5/+4
| | | | | | Coverity Id 10 * libblock/src/bdbuf.c: Rework loop conditional to avoid potential use of NULL pointer.
* libblock API updateThomas Doerfler2010-01-191-300/+268
|
* Update for block device API changeThomas Doerfler2009-12-181-2/+3
|
* documentation fixesThomas Doerfler2009-11-301-7/+11
| | | | | | Avoid designated initializers for C++ compatibility Fixed invalid state transition from FRESH to CACHED Free memory in case of an error.
* Whitespace removal.Ralf Corsepius2009-11-291-80/+80
|
* numerous changesThomas Doerfler2009-11-201-769/+681
|
* 2009-11-02 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2009-11-021-2/+2
| | | | | * libblock/src/bdbuf.c: Cast bdbuf->state to int32_t before shifting << 16 (Can not shift an enum by << 16 on 16bit).
* Fixed buffer recyclingThomas Doerfler2009-11-021-14/+23
| | | | Wake-up access waiters after sync
* Fixed group usage counting. See test "libtests/block02".Thomas Doerfler2009-10-301-48/+55
|
* - - Reorderd AVL node fields to save spaceThomas Doerfler2009-10-291-177/+144
| | | | | - Fixed printf() formats. New structure for waiters synchronization. Added BDBUF_INVALID_DEV define. New error handling in rtems_bdbuf_init(). - Release disk in case of an error.
* Use size_t for sizes.Ralf Corsepius2009-10-131-2/+2
|
* 2009-10-13 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2009-10-131-3/+5
| | | | | * libblock/src/bdbuf.c: Fix broken printf formats. Use size_t for sizes.
* * libblock/include/rtems/diskdevs.h: Added driver data pointer to IOThomas Doerfler2009-10-131-4/+2
| | | | | | | | | control function. The IO control handler takes now the disk device as first parameter instead of the physical device number. * cpukit/libblock/include/rtems/blkdev.h, libblock/src/bdbuf.c, libblock/src/blkdev.c, libblock/src/diskdevs.c, libblock/src/nvdisk.c, libblock/src/flashdisk.c, libblock/src/ramdisk.c: Update for block device API change.
* 2009-10-08 Chris Johns <chrisj@rtems.org>Chris Johns2009-10-081-169/+340
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.am, preinstall.am: Added statvfs.h. * libcsupport/Makefile.am: Add statvfs.c. * libcsupport/include/sys/statvfs.h, libcsupport/src/statvfs.c: New. * libcsupport/include/rtems/libio.h: Add a file system handler for the statvfs call. * libfs/src/devfs/devfs_init.c, libfs/src/dosfs/msdos_init.c, libfs/src/imfs/imfs_init.c, libfs/src/nfsclient/src/nfs.c: Set the statvfs handler to NULL. * include/rtems/fs.h: Add a second node access field for the RFS file system to hold a directory offset while the existing field holds the inode number. This save a rescan of the directory when working with directories. * libblock/include/rtems/bdbuf.h: Added references and user fields to the buffer descriptor. * libblock/src/bdbuf.c: Added dynamic buffer support for different block sizes. Fixed a number of bugs. * libblock/src/blkdev.c: Release the disk device on an error. * libblock/src/diskdevs.c: Set the block size to the media block size during initialisation of the disk device. * libblock/src/flashdisk.c, libblock/src/nvdisk.c, libblock/src/ramdisk.c: Updated the drivers to handle variable block sizes. * libfs/src/dosfs/fat.c, libfs/src/dosfs/fat.h: Release any buffers when an error occurs. The FAT buffer layer hangs onto a single buffer while mounted. This should be fixed. * sapi/inline/rtems/chain.inl: Added rtems_chain_set_off_chain, rtems_chain_is_node_off_chain, and rtems_chain_previous. * score/inline/rtems/score/chain.inl: Added _Chain_Set_off_chain, and _Chain_Is_node_off_chain. * libmisc/shell/main_ln.c, libmisc/shell/main_mknod.c, libmisc/shell/mknod-pack_dev.c, libmisc/shell/mknod-pack_dev.h: New shell commands. * libmisc/Makefile.am, libmisc/shell/shellconfig.h: Added ln and mknod commands. * libmisc/shell/hexdump-display.c: Fixed the reopen bug which showed up as a free with a bad pointer. * libmisc/shell/main_mount.c: List the user adding file system when listing the available file systems to mount. * libmisc/shell/utils-cp.c: Remove the fixed static copy buffer and use a large dynamic buffer. * score/inline/rtems/score/address.inl, score/src/coremsgsubmit.c, score/src/objectallocate.c, score/src/objectfree.c: Remove warnings.
* 2009-08-06 Chris Johns <chrisj@rtems.org>Chris Johns2009-08-061-31/+98
| | | | | | | * libblock/src/bdbuf.c: Fix group user logic. * libblock/include/rtems/blkdev.h, libblock/src/blkdev.c, libblock/src/nvdisk.c, libblock/src/flashdisk.c: Add set block size, and get media block size support.
* 009-08-05 Chris Johns <chrisj@rtems.org>Chris Johns2009-08-051-723/+1110
| | | | | | | | | | | | | | | | | | | | | | | | | * libmisc/dummy/dummy-networking.c: New. * libmisc/dummy/dummy.c, libmisc/Makefile.am: Move trhe networking configuration into a separate file so configuration varations do not cause conflicts. * score/inline/rtems/score/object.inl, score/include/rtems/score/object.h: Remove warnings. * score/inline/rtems/score/object.inl: Add _Chain_First, _Chain_Last, _Chain_Mext, and _Chain_Previous. * sapi/inline/rtems/chain.inl: Add rtems_chain_first, rtems_chain_last, rtems_chain_mext, and rtems_chain_previous. * libblock/include/rtems/diskdevs.h: Remove the bdbuf pool id and block_size_log2. Add media_block_size. * libblock/src/diskdevs.c: Remove size restrictions on block size. Add media block size initialisation. Remove comment to clean up the bdbuf cache. * libblock/src/blkdev.c: Remove references to block_size_log2. Allow any block size. * libblock/include/rtems/bdbuf.h, libblock/src/bdbuf.c: Remove all references to pools and make the cache handle demand driver variable buffer size allocation. Added worker threads support the swapout task. * sapi/include/confdefs.h: Updated the bdbuf configutation.
* 2009-06-12 Chris Johns <chrisj@rtems.org>Chris Johns2009-06-121-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libblock/src/bdbuf.c: Update comments. * libblock/src/bdpart.c, libblock/src/ide_part_table.c: Get the device from the rdev field of the stat buf. * libcsupport/include/rtems/libio.h: Add a path length to evalpath handler. Add parent locations to rmmod and unlink handlers. * libcsupport/include/rtems/libio_.h: Add a path length to rtems_filesystem_evaluate_path. Add rtems_filesystem_evaluate_relative_path, rtems_filesystem_dirname, and rtems_filesystem_prefix_separators. Remove rtems_filesystem_evaluate_parent. * libcsupport/src/base_fs.c, libcsupport/src/chdir.c, libcsupport/src/chmod.c, libcsupport/src/chown.c, libcsupport/src/chroot.c, libcsupport/src/fchdir.c, libcsupport/src/link.c, libcsupport/src/mount.c, libcsupport/src/open.c, libcsupport/src/privateenv.c, libcsupport/src/readlink.c, libcsupport/src/unmount.c, libcsupport/src/utime.c, libcsupport/src/unmount.c, libcsupport/src/utime.c, libfs/src/devfs/devfs.h, libfs/src/devfs/devfs_eval.c, libfs/src/devfs/devstat.c, libfs/src/dosfs/msdos_create.c, libfs/src/dosfs/msdos_misc.c, libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_eval.c, libfs/src/imfs/imfs_load_tar.c, libfs/src/imfs/ioman.c, libfs/src/pipe/pipe.c, libmisc/fsmount/fsmount.c, libnetworking/lib/ftpfs.c: Add the length parameter to the eval call. * libcsupport/src/eval.c: Add rtems_filesystem_prefix_separators, rtems_filesystem_dirname, rtems_filesystem_evaluate_relative_path. Add the length parameter to the eval call. * libcsupport/src/rmdir.c: Find the parent pathloc then the node pathloc from that node. Remove the call to find the parent given the node pathloc. * libcsupport/src/stat.c: Add the length parameter to the eval call. Set the device into the rdev field. * libcsupport/src/unlink.c: Find the parent pathloc then the node pathloc from that node. Remove the call to find the parent given the node pathloc. * libfs/src/dosfs/fat.c, libfs/src/dosfs/msdos_format.c: Get the disk device number from the stat rdev field. * libfs/src/dosfs/msdos.h: Add the length parameter to the eval call. Add the parent pathloc to the rmnod handler. * libfs/src/dosfs/msdos_dir.c: Add the parent pathloc to the rmnod handler. * libfs/src/dosfs/msdos_eval.c: Add the length parameter to the eval and token call. * libfs/src/imfs/imfs_directory.c: Add the parent pathloc to the rmnod handler. * libfs/src/imfs/imfs_fchmod.c: Do not test the mode flags for only the allowed flags. Add the missing flags spec'ed in the POSIX standard. * libfs/src/imfs/imfs_fsunmount.c, libfs/src/imfs/imfs_rmnod.c, libfs/src/imfs/imfs_unlink.c, libfs/src/imfs/memfile.c: Add the parent node. Currently ignored in the IMFS. * libfs/src/imfs/imfs_stat.c: Return the device number in the rdev field. * libfs/src/imfs/imfs_mknod.c, libfs/src/imfs/imfs_symlink.c : Add the length parameter to the token call. * libfs/src/nfsclient/src/nfs.c: Add the length parameter to the eval call and parent node to the rmnod and unlink command. * libmisc/shell/internal.h: Remove the libc mounter decl to make public. * libmisc/shell/main_mount.c: Add support for hooking external mount support for new file systems. * libmisc/shell/shell.h: Add helper functions for the mount command.
* 2009-05-15 Sebastian Huber <sebastian.huber@embedded-brains.de>Joel Sherrill2009-05-151-0/+2
| | | | | | | | | | | | * Doxygen.in: Fixed project name. Added project number. Enabled auto brief. Disabled include graphs. * include/rtems/irq-extension.h, libblock/include/rtems/bdpart.h, libblock/include/rtems/bdbuf.h, libblock/include/rtems/bdpart.h, libblock/include/rtems/blkdev.h, libblock/include/rtems/diskdevs.h, libblock/include/rtems/ramdisk.h, libblock/src/bdbuf.c, libblock/src/blkdev.c, libblock/src/diskdevs.c, libblock/src/ramdisk.c: Documentation. * libblock/src/bdpart.c: Documentation. Fixed NULL pointer access.
* 2009-04-29 Sebastian Huber <sebastian.huber@embedded-brains.de>Chris Johns2009-04-291-238/+41
| | | | | | | | | | | | | | | * sapi/include/confdefs.h, libblock/include/rtems/bdbuf.h: Changed type of rtems_bdbuf_pool_configuration_size to size_t. * libblock/include/rtems/bdbuf.h, libblock/include/rtems/blkdev.h, libblock/include/rtems/diskdevs.h, libblock/src/bdbuf.c, libblock/src/blkdev.c, libblock/src/diskdevs.c: Buffer pool allocation is now cache aligned. The cache functions are currently not available on all platforms so the cache line size is fixed to 32 bytes for now. Changed various integer types which refer to block sizes, numbers and indexes. Fixed logical block indexes in buffer get and read function. It is now possible to delete logical disks. Modified documentation