summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bdbuf: Fix race condition with sync active flagSebastian Huber2014-11-281-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* ramdisk: Fix device name generationSebastian Huber2014-06-271-1/+1
|
* libblock: PR2040: Avoid NULL pointer accessSebastian Huber2013-08-231-6/+16
| | | | | | | This partly reverts commit 08b9d534604fbf437743a9925ef28eb1b848510d. Avoid a NULL pointer access and perform the source segment erase if necessary.
* libblock: Fix purge device tree traversalSebastian Huber2012-08-091-1/+2
|
* libblock: PR2040: Fix recycle destination updateSebastian Huber2012-04-161-8/+7
| | | | | Check the availablity of a recycle destination segment only when it is necessary to avoid missing resycle source segment erasures.
* libblock: PR2040: Add starvation thresholdSebastian Huber2012-04-161-1/+15
| | | | | | Do not use the unavailable block count as the erased blocks starvation threshold. Use instead the block count of the largest segment. This improves the starvation resolution gain of available blocks.
* PR2040: libblock: Flash disk starvations statisticSebastian Huber2012-03-141-2/+10
|
* PR2040: libblock: Flash disk documentationSebastian Huber2012-03-142-105/+127
|
* PR2040: libblock: Fix return statusSebastian Huber2012-03-141-3/+3
|
* PR2040: libblock: Avoid erased blocks starvationSebastian Huber2012-03-141-115/+185
| | | | | | | | | | | | The compaction process needs erased blocks. It is only possible to erase an entire segment. Thus in order to make a progress we always need enough erased blocks to empty a used or available segment which can be erased in turn. A (possibly the worst case) lower bound of erased blocks is the block count of the largest segment. The number of unavailable blocks specified by the configuration will be used to determine the erase blocks starvation situation. The number of unavailable blocks must be greater than or equal to the number of blocks in the largest segment.
* PR2040: libblock: Track number of erased blocksSebastian Huber2012-03-141-1/+8
|
* PR2040: libblock: Use segment control as parameterSebastian Huber2012-03-141-100/+91
|
* Add .git ignore. Remove .cvsignoreJoel Sherrill2012-02-021-2/+0
|
* 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. * libblock/src/bdbuf.c: Fix state labels in trace output.
* Cosmetics from CVS-HEAD.Ralf Corsepius2011-05-251-1/+1
|
* 2011-05-25 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-05-252-0/+9
| | | | | * libblock/src/flashdisk.c, libblock/src/nvdisk.c: Add va_end() (Backport from HEAD).
* 2011-05-11 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2011-05-111-1/+1
| | | | | PR 1790/cpukit * libblock/src/flashdisk.c: Fixed memset() parameters.
* 2010-06-08 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-07-011-2/+2
| | | | | | | | | | | | | | | * libcsupport/include/rtems/libio.h: Documentation. 2010-06-08 Sebastian Huber <sebastian.huber@embedded-brains.de> PR 1524/filesystem * libcsupport/src/rtems_mkdir.c: New file. * libcsupport/src/Makefile.am: Reflect change above. * libcsupport/include/rtems/libio.h: Added rtems_mkdir(). * libmisc/fsmount/fsmount.h, libmisc/fsmount/fsmount.c, libblock/src/bdpart-mount.c, libnetworking/rtems/mkrootfs.h, libnetworking/rtems/mkrootfs.c: Use rtems_mkdir(). Removed rtems_fsmount_create_mount_point() and rtems_rootfs_mkdir().
* 2010-06-14 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2010-06-141-0/+2
| | | | | | | PR 1553/filesystem Coverity Id 37 * libblock/src/flashdisk.c: Fix two paths which should have returned an error but did not have the return statement.
* 2010-05-31 Chris Johns <chrisj@rtems.org>Chris Johns2010-05-311-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libcsupport/Makefile.am: Add mount-mgr.c. * libcsupport/src/mount-mgr.c: New. * include/rtems/fs.h: Added rtems_filesystem_location_mount. * libcsupport/include/rtems/libio.h, libcsupport/src/mount.c: New mount interface. It is similar to Linux. * libcsupport/include/rtems/libio_.h: Remove the init_fs_mount_table call. * libcsupport/src/base_fs.c: Remove init_fs_mount_table_call. Use the new mount call. Remove setting the root node in the global pathloc. Mount does this now. * libcsupport/src/privateenv.c: Remove the hack to set the root mount table entry in the environment. * libcsupport/src/unmount.cL Free the target string. * libblock/src/bdpart-mount.c: New mount API. * libfs/src/devfs/devfs.h, libfs/src/devfs/devfs_init.c, libfs/src/dosfs/dosfs.h, libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_init.c, libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_eval.c, libfs/src/imfs/imfs_init.c, libfs/src/imfs/miniimfs_init.c, libfs/src/nfsclient/src/librtemsNfs.h, libfs/src/rfs/rtems-rfs-rtems.c, libfs/src/rfs/rtems-rfs.h, libnetworking/lib/ftpfs.c, libnetworking/rtems/ftpfs.h, libnetworking/rtems/tftp.h: New mount_h API. * libfs/src/devfs/devfs_eval.c: Local include of extern ops. * libfs/src/nfsclient/src/nfs.c: New mount API. Removed the mount me call and fixed the initialisation to happen when mounting. * libmisc/Makefile.am, libmisc/shell/shellconfig.h: Remove mount filesystem files. * libmisc/fsmount/fsmount.c, libmisc/fsmount/fsmount.h: Updated to the new mount table values. * libmisc/shell/main_mount_ftp.c, libmisc/shell/main_mount_msdos.c, libmisc/shell/main_mount_rfs.c, libmisc/shell/main_mount_tftp.c: Removed. * libmisc/shell/main_mount.c: Use the new mount API. Also access the file system table for the file system types. * libnetworking/lib/tftpDriver.c: Updated to the new mount API. Fixed to allow mounting from any mount point. Also can now have more than file system mounted. * sapi/include/confdefs.h: Add file system configuration support.
* 2010-05-22 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-05-222-16/+16
| | | | | | * libblock/include/rtems/nvdisk.h, libblock/src/nvdisk-sram.c: Use pointer arithmetic instead of int32_t arithmetic for 16bit compatibility.
* 2010-05-22 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2010-05-222-2/+2
| | | | | | * libblock/src/flashdisk.c, libblock/src/nvdisk.c: Cast argp to uintptr_t temporary instead of uint32_t temporary (Avoid incompatible pointer casts on 16bit targets).
* 2010-05-18 Chris Johns <chrisj@rtems.org>Chris Johns2010-05-183-25/+63
| | | | | | | | * 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-05-17 Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>Sebastian Huber2010-05-172-25/+52
| | | | | | | PR 1449/cpukit * libblock/src/diskdevs.c: rtems_disk_next() will now implicitly obtain the returned disk. * libblock/include/rtems/diskdevs.h: Documentation.
* 2010-05-14 Chris Johns <chrisj@rtems.org>Chris Johns2010-05-141-20/+49
| | | | * libblock/src/flashdisk.c: Clean up on initialisation errors.
* 2010-04-30 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-05-121-1171/+0
| | | | | | | | | | * libblock/src/bdpart.c: Removed file. * libblock/src/bdpart-create.c, libblock/src/bdpart-dump.c, libblock/src/bdpart-mount.c, libblock/src/bdpart-read.c, libblock/src/bdpart-register.c, libblock/src/bdpart-sort.c, libblock/src/bdpart-write.c: New files. * libblock/include/rtems/bdpart.h: Moved some definitions from bdpart.c. * libblock/Makefile.am: Update for file changes.
* 2010-04-30 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-04-309-2/+1355
| | | | | | | | | | * libblock/src/bdpart.c: Removed file. * libblock/src/bdpart-create.c, libblock/src/bdpart-dump.c, libblock/src/bdpart-mount.c, libblock/src/bdpart-read.c, libblock/src/bdpart-register.c, libblock/src/bdpart-sort.c, libblock/src/bdpart-write.c: New files. * libblock/include/rtems/bdpart.h: Moved some definitions from bdpart.c. * libblock/Makefile.am: Update for file changes.
* 2010-04-29 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-04-292-1/+2
| | | | | | | PR1507 * libblock/src/bdbuf.c: Avoid NULL pointer access. * libblock/src/diskdevs.c: Fixed bounds check in rtems_disk_next().
* fixed disk deleteThomas Doerfler2010-04-092-100/+59
| | | | Obtain/release disk during open/close
* Add HAVE_CONFIG_H support to let files receive configure defines.Ralf Corsepius2010-03-284-0/+16
|
* 2010-03-12 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-03-121-9/+46
| | | | | | | | | | * libblock/src/ide_part_table.c: Functionality of rtems_ide_part_table_get() and rtems_ide_part_table_free() was needed internally but those routines are deprecated from the public API. So move their contents to private static routines. Using the private routines in this file avoids deprecation warnings and leaves functional, although deprecated, versions for potential use by applications.
* 2010-03-11 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-03-111-1/+0
| | | | | | | | | | | | * ftpd/ftpd.c, httpd/uemf.c, httpd/um.c, httpd/webs.c, httpd/websuemf.c, libblock/src/diskdevs.c, libmisc/capture/capture-cli.c, libmisc/monitor/mon-network.c, libmisc/shell/hexdump-odsyntax.c, libmisc/shell/main_ifconfig.c, libmisc/uuid/parse.c, libnetworking/lib/ftpfs.c, libnetworking/libc/gethostbyht.c, libnetworking/libc/getnetnamadr.c, libnetworking/libc/inet_network.c, libnetworking/rtems/rtems_mii_ioctl.c, score/src/objectgetnameasstring.c: Fix warnings for ctype methods.
* 2010-03-04 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-03-041-6/+1
| | | | * libblock/src/ramdisk-config.c: Revert accidental commit.
* 2010-03-04 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-03-041-1/+6
| | | | | | * libblock/src/ramdisk-config.c, sapi/include/confdefs.h: CONFIGURE_DISABLE_CLASSIC_NOTEPADS is typo of CONFIGURE_DISABLE_CLASSIC_API_NOTEPADS. Fix it.
* 2010-02-19 Chris Johns <chrisj@rtems.org>Chris Johns2010-02-191-8/+1
| | | | | | | | | | | | | | | | | * libblock/src/diskdevs.c: Create the devices as block devices. * libmisc/shell/main_debugrfs.c, libmisc/shell/main_mkrfs.c, libmisc/shell/main_mount_rfs.c: New. * libmisc/shell/main_msdosfmt.c: Change the command to mkdos and alias the old name. * libmisc/shell/shellconfig.h, libmisc/Makefile.am: Add RFS support. * libfs/src/rfs/rtems-rfs-shell.c, libfs/src/rfs/rtems-rfs-shell.h: Move the format command code into the shell file.
* 2010-02-18 Chris Johns <chrisj@rtems.org>Chris Johns2010-02-183-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libfs/src/rfs/rtems-rfs-bitmaps.c, libfs/src/rfs/rtems-rfs-bitmaps.h, libfs/src/rfs/rtems-rfs-bitmaps-ut.c, libfs/src/rfs/rtems-rfs-block.c, libfs/src/rfs/rtems-rfs-block.h, libfs/src/rfs/rtems-rfs-block-pos.h, libfs/src/rfs/rtems-rfs-buffer-bdbuf.c, libfs/src/rfs/rtems-rfs-buffer.c, libfs/src/rfs/rtems-rfs-buffer-devio.c, libfs/src/rfs/rtems-rfs-buffer.h, libfs/src/rfs/rtems-rfs-data.h, libfs/src/rfs/rtems-rfs-dir.c, libfs/src/rfs/rtems-rfs-dir.h, libfs/src/rfs/rtems-rfs-dir-hash.c, libfs/src/rfs/rtems-rfs-dir-hash.h, libfs/src/rfs/rtems-rfs-file.c, libfs/src/rfs/rtems-rfs-file.h, libfs/src/rfs/rtems-rfs-file-system.c, libfs/src/rfs/rtems-rfs-file-system-fwd.h, libfs/src/rfs/rtems-rfs-file-system.h, libfs/src/rfs/rtems-rfs-format.c, libfs/src/rfs/rtems-rfs-format.h, libfs/src/rfs/rtems-rfs-group.c, libfs/src/rfs/rtems-rfs-group.h, libfs/src/rfs/rtems-rfs.h, libfs/src/rfs/rtems-rfs-inode.c, libfs/src/rfs/rtems-rfs-inode.h, libfs/src/rfs/rtems-rfs-link.c, libfs/src/rfs/rtems-rfs-link.h, libfs/src/rfs/rtems-rfs-mutex.c, libfs/src/rfs/rtems-rfs-mutex.h, libfs/src/rfs/rtems-rfs-rtems.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, libfs/src/rfs/rtems-rfs-rtems.h, libfs/src/rfs/rtems-rfs-rtems-utils.c, libfs/src/rfs/rtems-rfs-shell.c, libfs/src/rfs/rtems-rfs-shell.h, libfs/src/rfs/rtems-rfs-trace.c, libfs/src/rfs/rtems-rfs-trace.h: New. * Makefile.am, preinstall.am, libfs/Makefile.am, wrapup/Makefile.am: Updated with the RFS support. * libfs/README: Updated after 10 years. * libblock/src/flashdisk.c, libblock/src/nvdisk.c, libblock/src/ramdisk-driver.c: Updated to the new error reporting in libblock. * libmisc/shell/main_ls.c, libmisc/shell/print-ls.c: Fix printing the size in long mode. * libnetworking/nfs/bootp_subr.c, libnetworking/rtems/rtems_bootp.c, libnetworking/rtems/rtems_bsdnet_internal.h: Return the BOOTP/DHCP to the forever behaviour of 4.9 with the ability to call BOOTP and control the process if required.
* Fixed invalid chain extractThomas Doerfler2010-01-291-1/+2
|
* add purge capability to libblock, add proper test caseThomas Doerfler2010-01-262-125/+318
|
* 2010-01-20 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-01-201-0/+10
| | | | | | | Coverity Id 7 Coverity Id 8 * libblock/src/bdpart.c: Verify libblock is really set after rtems_bdbuf_read() before using it.
* 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.
* 2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-01-191-1/+4
| | | | | * libblock/src/ide_part_table.c: Another error path without a free(sector).
* 2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-01-191-1/+3
| | | | | | | Coverity Id 24 * libblock/src/ide_part_table.c: Initialize sector to NULL and add free(sector) on error return path from get_sector() to fix potential leak.
* 2010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-01-191-1/+2
| | | | | | Coverity Id 25 * libblock/src/ide_part_table.c: Add free(sector) on error return path to fix leak.
* libblock API updateThomas Doerfler2010-01-196-370/+360
|
* 2010-01-18 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-01-191-0/+8
| | | | | | | | | | Coverity Id 27 * libblock/src/ramdisk-config.c: Coverity notes that the calloc() is a resource leak. This is allocating memory for a RAM disk which will persist for the life of the system. RTEMS has no "de-initialize" driver call so there is no corresponding free(r). Coverity is correct that it is never freed but this is not a problem.
* Update for block device API changeThomas Doerfler2009-12-186-40/+24
|
* documentation fixesThomas Doerfler2009-11-304-22/+54
| | | | | | 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-298-214/+214
|
* Whitespace removal.Ralf Corsepius2009-11-297-36/+36
|
* numerous changesThomas Doerfler2009-11-203-855/+813
|