Sebastian Huber
eb93595b4c
libblock: Documentation
2012-11-02 09:40:58 +01:00
Sebastian Huber
9f0a68ce5a
libblock: Block device transfer request API change
...
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-11-02 09:40:58 +01:00
Sebastian Huber
9dffa384e1
libblock: rtems_bdbuf_set_block_size() API change
...
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.
2012-10-26 22:03:22 +02:00
Sebastian Huber
48680bb176
libblock: ramdisk documentation
2012-10-26 21:30:40 +02:00
Ralf Corsépius
1c554014af
Remove CVS-Ids.
2012-07-19 16:55:18 +02:00
Sebastian Huber
9f527308d7
libblock: Add block device statistics
2012-06-12 10:12:40 +02:00
Sebastian Huber
7d4a859441
libblock: Remove const qualifier
...
This allows addtion of per disk statistics for example.
2012-06-12 10:12:40 +02:00
Sebastian Huber
df84ca249d
libblock: Rename structure
2012-06-04 17:30:20 +02:00
Sebastian Huber
39ee704e75
libblock: Add read-ahead task
...
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.
2012-06-04 09:54:31 +02:00
Sebastian Huber
73c09b3b8e
libblock: Simplify disk management
...
Add block_count and media_blocks_per_block to rtems_disk_device. Add
and use rtems_disk_init_phys() and rtems_disk_init_log().
2012-05-31 11:05:48 +02:00
Sebastian Huber
40284de844
libblock: Remove const qualifier from bdbuf API
...
This allows addtion of per disk statistics for example.
2012-05-31 11:05:48 +02:00
Sebastian Huber
b6911069d4
libblock: Add task stack size bdbuf configuration
...
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.
2012-05-31 11:05:48 +02:00
Joel Sherrill
9b4422a251
Remove All CVS Id Strings Possible Using a Script
...
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.
2012-05-11 08:44:13 -05:00
Sebastian Huber
84ab4fce24
libblock: Add RTEMS_BLKIO_PURGEDEV
2012-05-11 13:58:43 +02:00
Sebastian Huber
b467782b53
libblock: Add rtems_bdbuf_set_block_size()
...
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.
2012-04-12 10:42:43 +02:00
Sebastian Huber
3d60c1b22a
libblock: Change error status to fatal error
...
Calling the bdbuf API functions in the not configured state is now a
fatal error.
2012-04-12 10:42:43 +02:00
Sebastian Huber
a757d0f80a
PR2040: libblock: Flash disk documentation
2012-03-14 10:49:49 +01:00
Sebastian Huber
01211720ec
libblock: Add generic IMFS block device nodes
...
New functions
o rtems_blkdev_create(), and
o rtems_blkdev_create_partition().
New test libtests/block11.
2012-03-13 12:24:18 +01:00
Sebastian Huber
3ee7b84394
libblock: New support functions
...
Add
o rtems_disk_get_block_size(),
o rtems_disk_get_block_begin(), and
o rtems_disk_get_block_count().
2012-03-13 12:24:18 +01:00
Sebastian Huber
796967c3df
libblock: Change bdbuf API
...
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.
2012-03-13 12:24:18 +01:00
Sebastian Huber
1024561f19
libblock: Documentation
2012-03-13 12:24:18 +01:00
Sebastian Huber
c42b03f498
libblock: Remove superfluous volatile qualifier
...
All these variables are protected by the bdbuf cache mutex.
2012-03-13 12:24:18 +01:00
Sebastian Huber
c93fc2b36b
libblock: rtems_ide_part_table_initialize() API
2012-03-13 12:24:17 +01:00
Sebastian Huber
c649976859
libblock: New block IO control support functions
2012-03-13 12:24:17 +01:00
Sebastian Huber
4f3cbd9240
libblock: New IO control RTEMS_BLKIO_GETDISKDEV
2012-03-13 12:24:17 +01:00
Sebastian Huber
beea58072d
libblock: Add optional free at delete request
2012-03-13 12:24:16 +01:00
Joel Sherrill
21242c252a
2011-06-24 Joel Sherrill <joel.sherrill@oarcorp.com>
...
* include/rtems/bspIo.h, include/rtems/concat.h,
include/rtems/endian.h, include/rtems/fs.h, include/rtems/irq.h,
include/rtems/pci.h, include/rtems/userenv.h,
libblock/include/rtems/flashdisk.h,
libblock/include/rtems/nvdisk-sram.h,
libblock/include/rtems/nvdisk.h, libcsupport/include/clockdrv.h,
libcsupport/include/console.h, libcsupport/include/iosupp.h,
libcsupport/include/spurious.h,
libcsupport/include/motorola/mc68230.h,
libcsupport/include/rtems/assoc.h, libcsupport/include/rtems/error.h,
libcsupport/include/rtems/framebuffer.h,
libcsupport/include/rtems/gxx_wrappers.h,
libcsupport/include/rtems/libcsupport.h,
libcsupport/include/rtems/libio_.h,
libcsupport/include/rtems/malloc.h,
libcsupport/include/rtems/termiostypes.h,
libcsupport/include/sys/statvfs.h, libcsupport/include/sys/termios.h,
libcsupport/include/sys/utsname.h, libcsupport/include/zilog/z8036.h,
libcsupport/include/zilog/z8530.h, libcsupport/include/zilog/z8536.h,
libfs/src/imfs/imfs.h, libfs/src/pipe/pipe.h,
libmisc/capture/capture-cli.h, libmisc/capture/capture.h,
libmisc/cpuuse/cpuuse.h, libmisc/devnull/devnull.h,
libmisc/devnull/devzero.h, libmisc/dumpbuf/dumpbuf.h,
libmisc/fb/fb.h, libmisc/fb/mw_uid.h, libmisc/mouse/mouse_parser.h,
libmisc/shell/shellconfig.h, libmisc/stringto/stringto.h,
libmisc/untar/untar.h, libnetworking/memory.h, posix/include/aio.h,
posix/include/mqueue.h, posix/include/semaphore.h,
posix/include/rtems/posix/aio_misc.h,
posix/include/rtems/posix/barrier.h,
posix/include/rtems/posix/cond.h, posix/include/rtems/posix/config.h,
posix/include/rtems/posix/key.h, posix/include/rtems/posix/mqueue.h,
posix/include/rtems/posix/mutex.h,
posix/include/rtems/posix/posixapi.h,
posix/include/rtems/posix/priority.h,
posix/include/rtems/posix/psignal.h,
posix/include/rtems/posix/pthread.h,
posix/include/rtems/posix/ptimer.h,
posix/include/rtems/posix/rwlock.h,
posix/include/rtems/posix/semaphore.h,
posix/include/rtems/posix/sigset.h,
posix/include/rtems/posix/spinlock.h,
posix/include/rtems/posix/threadsup.h,
posix/include/rtems/posix/time.h, posix/include/rtems/posix/timer.h,
posix/inline/rtems/posix/barrier.inl,
posix/inline/rtems/posix/cond.inl,
posix/inline/rtems/posix/mqueue.inl,
posix/inline/rtems/posix/mutex.inl,
posix/inline/rtems/posix/priority.inl,
posix/inline/rtems/posix/pthread.inl,
posix/inline/rtems/posix/rwlock.inl,
posix/inline/rtems/posix/semaphore.inl,
posix/inline/rtems/posix/spinlock.inl,
posix/inline/rtems/posix/timer.inl, rtems/mainpage.h,
rtems/include/rtems/rtems/barrier.h,
rtems/include/rtems/rtems/object.h,
rtems/include/rtems/rtems/timer.h,
rtems/inline/rtems/rtems/barrier.inl,
rtems/inline/rtems/rtems/timer.inl,
rtems/src/semtranslatereturncode.c, sapi/include/rtems/config.h,
sapi/include/rtems/fatal.h, sapi/include/rtems/mptables.h,
score/include/rtems/score/object.h,
score/include/rtems/score/priority.h,
score/inline/rtems/score/object.inl,
score/inline/rtems/score/priority.inl: Add @file Doxygen directives
and descriptions to files which originated with RTEMS. This improves
the file list page generated by Doxygen.
2011-06-24 17:52:58 +00:00
Sebastian Huber
f3ea49920f
2011-05-11 Sebastian Huber <sebastian.huber@embedded-brains.de>
...
* libblock/include/rtems/bdbuf.h: Documentation.
2011-05-11 09:38:01 +00:00
Sebastian Huber
a8afce3872
2011-02-17 Sebastian Huber <sebastian.huber@embedded-brains.de>
...
* libblock/include/rtems/bdpart.h (rtems_bdpart_format):
Preserve previous API.
* libblock/src/bdpart-create.c, libblock/src/bdpart-read.c,
libblock/src/bdpart-write.c: Reflect changes above.
* libmisc/shell/fdisk.c: Reflect changes above.
2011-02-17 16:25:43 +00:00
Ralf Corsepius
fc658e4e69
2011-02-10 Ralf Corsépius <ralf.corsepius@rtems.org>
...
* libblock/include/rtems/bdpart.h (rtems_bdpart_format):
Eliminate unnamed union (Non c99-compliant).
* libblock/src/bdpart-create.c, libblock/src/bdpart-read.c,
libblock/src/bdpart-write.c: Reflect changes above.
2011-02-10 23:34:58 +00:00
Sebastian Huber
1680638ab6
2011-01-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
...
* libblock/src/blkdev-ops.c: New file.
* libblock/Makefile.am: Reflect change from above.
* libblock/include/rtems/blkdev.h: Declare rtems_blkdev_generic_ops.
2011-01-21 09:43:24 +00:00
Sebastian Huber
d4d6bd813f
2010-08-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
...
* libblock/include/rtems/media.h, libblock/src/media-server.c: Use
chains instead of a message queue.
2010-08-25 08:44:14 +00:00
Sebastian Huber
d91e3a71bb
2010-08-13 Sebastian Huber <sebastian.huber@embedded-brains.de>
...
* libblock/include/rtems/media.h, libblock/src/media-desc.c,
libblock/src/media-dev-ident.c, libblock/src/media-path.c,
libblock/src/media-server.c, libblock/src/media.c: New files.
* Makefile.am, preinstall.am, libblock/Makefile.am: Reflect changes
above.
2010-08-13 12:40:16 +00:00
Joel Sherrill
71c012aff5
2010-07-04 Joel Sherrill <joel.sherrill@oarcorp.com>
...
* 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-07-04 14:53:47 +00:00
Ralf Corsepius
f22c1544c5
2010-05-22 Ralf Corsépius <ralf.corsepius@rtems.org>
...
* libblock/include/rtems/nvdisk.h, libblock/src/nvdisk-sram.c:
Use pointer arithmetic instead of int32_t arithmetic for 16bit
compatibility.
2010-05-22 16:51:05 +00:00
Chris Johns
8aa608df32
2010-05-18 Chris Johns <chrisj@rtems.org>
...
* 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-18 02:14:05 +00:00
Sebastian Huber
c8522fd2c4
2010-05-17 Oleg Kravtsov <Oleg.Kravtsov@oktetlabs.ru>
...
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-17 08:08:30 +00:00
Sebastian Huber
6780829037
2010-04-30 Sebastian Huber <sebastian.huber@embedded-brains.de>
...
* 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 08:42:13 +00:00
Thomas Doerfler
e7fb54eb05
add purge capability to libblock, add proper test case
2010-01-26 15:09:03 +00:00
Thomas Doerfler
5c587596f0
libblock API update
2010-01-19 09:10:03 +00:00
Thomas Doerfler
1e0a5512fc
Update for block device API change
2009-12-18 15:59:30 +00:00
Thomas Doerfler
47c23279bd
documentation fixes
...
Avoid designated initializers for C++ compatibility
Fixed invalid state transition from FRESH to CACHED
Free memory in case of an error.
2009-11-30 12:39:51 +00:00
Ralf Corsepius
33c3b54d57
Whitespace removal.
2009-11-29 11:57:23 +00:00
Thomas Doerfler
6d61294486
numerous changes
2009-11-20 06:33:38 +00:00
Thomas Doerfler
c0e0a92892
Changed set and get IO controls to use the buffer argument for data exchange.
2009-11-12 15:32:11 +00:00
Thomas Doerfler
b5b07cad7d
- - Reorderd AVL node fields to save space
...
- 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.
2009-10-29 12:50:01 +00:00
Thomas Doerfler
982ca110ca
Aded ramdisk_register().
2009-10-29 12:47:04 +00:00
Ralf Corsepius
fb5785cce6
2009-10-22 Ralf Corsépius <ralf.corsepius@rtems.org>
...
* libblock/include/rtems/flashdisk.h: Use UINT32_C consts to
avoid implicit int-cast overflows in RTEMS_FDISK_KBYTES.
2009-10-22 11:56:01 +00:00
Thomas Doerfler
e41369ef8c
* libblock/include/rtems/diskdevs.h: Documentation. Added field to
...
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.
2009-10-20 07:53:19 +00:00
Thomas Doerfler
1560d12d01
restructuring of ramdisk code
2009-10-16 08:44:51 +00:00