summaryrefslogtreecommitdiffstats
path: root/cpukit/libblock/src/diskdevs.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update company nameSebastian Huber2023-05-201-1/+1
| | | | | The embedded brains GmbH & Co. KG is the legal successor of embedded brains GmbH.
* Canonicalize config.h includeSebastian Huber2020-04-161-1/+1
| | | | | | | | Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
* libblock: Add RTEMS_DEPRECATEDSebastian Huber2018-08-071-0/+2
| | | | Close #3358.
* libblock: Use self-contained mutex for disk lockSebastian Huber2018-02-021-71/+30
| | | | Update #2843.
* libblock: Use proper semaphore attr for mutexSebastian Huber2016-06-061-2/+1
| | | | Close #1452.
* libblock: Fix warningSebastian Huber2015-03-051-2/+1
|
* score: Add SMP lock profiling supportSebastian Huber2014-03-141-1/+2
|
* score: Add local context to SMP lock APISebastian Huber2014-03-111-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.
* libblock: Add missing initializerSebastian Huber2013-08-141-1/+1
|
* libblock: Add SMP supportSebastian Huber2013-08-141-5/+7
|
* libblock: Simplify disk managementSebastian Huber2012-05-311-42/+41
| | | | | Add block_count and media_blocks_per_block to rtems_disk_device. Add and use rtems_disk_init_phys() and rtems_disk_init_log().
* Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill2012-05-111-2/+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.
* libblock: Add rtems_bdbuf_set_block_size()Sebastian Huber2012-04-121-6/+23
| | | | | | | | 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.
* 2010-05-18 Chris Johns <chrisj@rtems.org>Chris Johns2010-05-181-1/+1
| | | | | | | | * 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-171-22/+47
| | | | | | | PR 1449/cpukit * libblock/src/diskdevs.c: rtems_disk_next() will now implicitly obtain the returned disk. * libblock/include/rtems/diskdevs.h: Documentation.
* 2010-04-29 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-04-291-1/+1
| | | | | | | 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-091-15/+15
| | | | Obtain/release disk during open/close
* 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-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.
* Whitespace removal.Ralf Corsepius2009-11-291-3/+3
|
* * libblock/include/rtems/diskdevs.h: Documentation. Added field toThomas Doerfler2009-10-201-344/+374
| | | | | | | | | | | | | rtems_disk_device. * libblock/include/rtems/blkdev.h: New request code RTEMS_BLKIO_DELETED. * libblock/src/diskdevs.c: Major rewrite. Changed the way disks are deleted. Disks will be now deleted if they are not in use or upon last release. The IO control handler will be invoked if a physical disk is deleted with the RTEMS_BLKIO_DELETED request code. Logical disks increase now the usage count of the associated physical disk. * libblock/include/rtems/ramdisk.h: Documentation. * libblock/src/ramdisk-driver.c: Compile trace support conditionally.
* * libblock/include/rtems/diskdevs.h: Added driver data pointer to IOThomas Doerfler2009-10-131-3/+4
| | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* 009-08-05 Chris Johns <chrisj@rtems.org>Chris Johns2009-08-051-21/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * 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-05-15 Sebastian Huber <sebastian.huber@embedded-brains.de>Joel Sherrill2009-05-151-2/+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-199/+119
| | | | | | | | | | | | | | | * 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
* Convert to using "bool".Ralf Corsepius2008-09-011-16/+16
|
* s/rtems_boolean/bool/g.Ralf Corsepius2008-08-251-1/+1
|
* 2008-08-21 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill2008-08-211-7/+7
| | | | | | * libblock/include/rtems/bdbuf.h, libblock/include/rtems/diskdevs.h, libblock/src/bdbuf.c, libblock/src/blkdev.c, libblock/src/diskdevs.c, libblock/src/ramdisk.c: Eliminate sign mismatch warnings.
* 2008-08-06 Brett Swimley <brett.swimley@aedbozeman.com>Chris Johns2008-08-061-0/+1
| | | | | * libblock/src/diskdevs.c: PR1192. Update the disktap pointer after the realloc.
* 2008-08-06 Till Straumann <strauman@slac.stanford.edu>Chris Johns2008-08-061-1/+1
| | | | | * libblock/src/diskdevs.c: PR1269. Delete the semaphore rather than release it.
* 2008-07-29 Chris Johns <chrisj@rtems.org>Chris Johns2008-07-291-36/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libblock/Makefile.am: Removed src/show_bdbuf.c. * libblock/src/show_bdbuf.c: Removed. * libblock/include/rtems/bdbuf.h, cpukit/libblock/src/bdbuf.c: Rewritten the bdbuf code. Remove pre-emption disable, score access, fixed many bugs and increased performance. * libblock/include/rtems/blkdev.h: Added RTEMS_BLKDEV_CAPABILITIES block device request. Cleaned up comments. Added block and user fields to the sg buffer request. Move to rtems_* namespace. * libblock/include/rtems/diskdevs.h, cpukit/libblock/src/diskdevs.c: Move to rtems_* namespace. Add a capabilities field for drivers. Change rtems_disk_lookup to rtems_disk_obtain to match the release call. You do not lookup and release a disk, you obtain and release a disk. * libblock/include/rtems/ide_part_table.h, libblock/include/rtems/ramdisk.h, libblock/src/ide_part_table.c: Move to rtems_* namespace. * libblock/include/rtems/nvdisk.h: Formatting change. * libblock/src/blkdev.c: Move to rtems_* namespace. Change rtems_disk_lookup to rtems_disk_obtain * libblock/src/flashdisk.c: Move to rtems_* namespace. Use the new support for the block number in the scatter/grather request struct. This allows non-continuous buffer requests for those drivers that can support increasing performance. * libblock/src/nvdisk.c: Move to rtems_* namespace. Removed warnings. Added better error checking. Fixed some comments. * libblock/src/ramdisk.c: Move to rtems_* namespace. Added some trace functions to help debugging upper layers. Use the new support for the block number in the scatter/grather request struct. This allows non-continuous buffer requests for those drivers that can support increasing performance. * libfs/src/dosfs/fat.c, libfs/src/dosfs/fat.h: Use new chains API. Removed temporary hack and changed set_errno_and_return_minus_one to rtems_set_errno_and_return_minus_one. Move fat_buf_access from header and stopped it being inlined. Updated to libblock changes. * libfs/src/dosfs/fat_fat_operations.c, libfs/src/dosfs/fat_file.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_free.c, libfs/src/dosfs/msdos_initsupp.c, libfs/src/dosfs/msdos_misc.c, libfs/src/dosfs/msdos_mknod.c: Use new chains API. Removed temporary hack and changed set_errno_and_return_minus_one to rtems_set_errno_and_return_minus_one. Updated to libblock changes. * libmisc/Makefile.am: Add new ls and rm command files. * libmisc/shell/cmp-ls.c, libmisc/shell/extern-ls.h, libmisc/shell/filemode.c, libmisc/shell/print-ls.c, libmisc/shell/pwcache.c, libmisc/shell/utils-ls.c, libmisc/shell/vis.c, shell/vis.h: New. * libmisc/shell/extern-cp.h, libmisc/shell/main_cp.c, libmisc/shell/utils-cp.c: Fixed the usage call bug. * libmisc/shell/main_blksync.c: Updated to the new block IO ioctl command. * libmisc/shell/main_ls.c, libmisc/shell/main_rm.c: Updated to BSD commands with more features. * score/src/coremutex.c: Fix the strick order mutex code. * libmisc/shell/shell.c: Change shell tasks mode to be timeslice and no ASR. * sapi/include/confdefs.h: Change ata_driver_task_priority to rtems_ata_driver_task_priority. Add the new BD buf cache parameters with defaults. * score/src/interr.c: Do not return if the CPU halt call returns.
* Added const qualifier to various pointers and data tables toThomas Doerfler2008-05-271-2/+2
| | | | | | reduce size of data area. IMFS: Fixed creation of symbolic links to avoid a compiler warning. DOSFS: Use LibBlock instead of read() to read the boot record.
* Fix typo.Ralf Corsepius2005-01-051-1/+1
|
* Remove stray white spaces.Ralf Corsepius2004-04-171-10/+10
|
* Remove stray white spaces.Ralf Corsepius2004-04-151-34/+34
|
* 2003-11-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Ralf Corsepius2003-11-201-0/+3
| | | | | | | | | | | * Makefile.am: AM_CPPFLAGS += -I$(top_builddir). Use AM_CPPFLAGS instead of AM_CFLAGS. * src/ata.c: Include config.h. * src/bdbuf.c: Ditto. * src/blkdev.c: Ditto. * src/diskdevs.c: Ditto. * src/ide_part_table.c: Ditto. * src/ramdisk.c: Ditto.
* 2002-11-15 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Ralf Corsepius2002-11-151-0/+1
| | | | * src/diskdevs.c: Include <unistd.h> to remove warning.
* 2002-02-28 Joel Sherrill <joel@OARcorp.com>Joel Sherrill2002-02-281-0/+631
* Submitted by Victor V. Vengerov <vvv@oktet.ru> and merged into the RTEMS source. * ChangeLog, Makefile.am, README, configure.ac, include/Makefile.am, include/rtems/bdbuf.h, include/rtems/blkdev.h, include/rtems/diskdevs.h, include/rtems/ramdisk.h, include/rtems/.cvsignore, include/.cvsignore, src/Makefile.am, src/bdbuf.c, src/blkdev.c, src/diskdevs.c, src/ramdisk.c, src/.cvsignore, .cvsignore: New files.