Commit Graph

290 Commits

Author SHA1 Message Date
Sebastian Huber
56bea4339f Filesystem: Use default kqfilter and poll handler 2013-12-20 10:31:53 +01:00
Sebastian Huber
2f68778f08 Filesystem: Add readv/writev handlers
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-20 10:31:53 +01:00
Sebastian Huber
0adc8a74a8 libblock: Use LAST for the last partition block 2013-12-04 09:12:42 +01:00
Wendell P Silva
62ba20d759 PR2157: fdisk partition table dump improvement
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-12-03 14:55:34 -05:00
Ric Claus
865c307242 Remove double count of start offset 2013-10-17 08:59:55 +02:00
Sebastian Huber
390e987eb3 libblock: PR2145: Limit maximum read-ahead blocks
This helps to prevent stack overflows due to configuration errors.
2013-09-16 10:54:51 +02:00
Gedare Bloom
74d357513f flashdisk: swap arguments to checksum helper
The arguments to rtems_fdisk_calc_crc16() are reversed when called from
rtems_fdisk_page_checksum().

26052 Operands don't affect result
2013-09-05 14:31:14 -04:00
Gedare Bloom
59261fba76 nvdisk: swap arguments to checksum helper
The arguments to rtems_nvdisk_calc_crc16() are reversed when called from
rtems_nvdisk_page_checksum().

26053 Operands don't affect result
2013-09-05 14:28:14 -04:00
Gedare Bloom
5f040b8829 sparse-disk: check return value from semaphore_obtain/release
In case obtain/release is unsuccessful, cause a fatal error.
2013-09-05 14:21:32 -04:00
Gedare Bloom
121dd88103 bdpart: Argument cannot be negative
If open(fd) fails then avoid the error path that calls close(fd).
2013-09-05 13:22:49 -04:00
Sebastian Huber
07ad4b6660 libblock: Use unprotected chain extract
This area is protected by the media mutex.
2013-08-27 10:48:15 +02:00
Sebastian Huber
842d63bae5 libblock: Avoid uninitialized variable 2013-08-26 09:53:22 +02:00
Sebastian Huber
dbdfc78fc7 libblock: PR2040: Avoid NULL pointer access
This partly reverts commit 08b9d53460.

Avoid a NULL pointer access and perform the source segment erase if
necessary.
2013-08-23 09:24:10 +02:00
Sebastian Huber
66c00789ef libblock: Add missing initializer 2013-08-14 12:14:31 +02:00
Sebastian Huber
9de9b7d237 libblock: Add SMP support 2013-08-14 11:10:45 +02:00
Sebastian Huber
88c74ab115 score: Merge tod implementation into one file
Delete TOD_MICROSECONDS_PER_SECOND, TOD_MICROSECONDS_TO_TICKS() and
TOD_MILLISECONDS_TO_TICKS().
2013-07-26 11:55:47 +02:00
Sebastian Huber
7660e8b347 Include missing <string.h> 2013-07-23 15:12:54 +02:00
Sebastian Huber
cffa5b7838 libblock: Use UTF-8 converter in media manager 2013-06-04 13:56:19 +02:00
Sebastian Huber
13bcb3e738 ramdisk: Fix device name generation 2013-03-22 15:10:37 +01:00
Sebastian Huber
71cf3e9d2f libblock: Do resource allocation in one place
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-02-21 10:50:04 +01:00
Joel Sherrill
b697bc6a44 cpukit: Use Consistent Beginning of Doxygen Group Notation
This is the result of a sed script which converts all uses
of @{ into a consistent form.
2013-01-10 17:06:47 -06:00
Alex Ivanov
3cf4031c19 Header File Doxygen Enhancement Task #1 2012-12-28 17:48:12 -06:00
Mathew Kallada
c5782a26b3 Header File Doxygen Enhancement Task #7 2012-12-28 11:17:49 -06:00
Mathew Kallada
9ab091e1e4 Header File Doxygen Enhancement Task #2 2012-12-28 10:36:55 -06:00
Sebastian Huber
f58fd9702e libblock: Use @brief in documentation 2012-12-21 20:28:24 +01:00
Jennifer Averett
e5e1d8f000 libblock: Doxygen Enhancement Task #1 corrections 2012-12-21 11:56:26 -06:00
Mathew Kallada
f6c7bcfe99 libblock: Doxygen Enhancement Task #1 2012-12-21 11:42:39 -06:00
Sebastian Huber
72c686167d libblock: Use rtems_blkdev_create_partition()
Use rtems_blkdev_create_partition() instead of rtems_disk_create_log()
to avoid problems with the huge IMFS_GENERIC_DEVICE_MAJOR_NUMBER.
2012-12-21 15:45:55 +01:00
Sebastian Huber
d0b9295fd9 Fix spelling 2012-12-14 10:17:04 +01:00
Ralf Kirchner
7fab7fc0cf libblock: Add sparse disk 2012-12-05 15:26:47 +01:00
Ralf Kirchner
db650357f0 libblock: Documentation 2012-11-29 15:08:42 +01:00
Sebastian Huber
608940fe08 score: Add RTEMS_FATAL_SOURCE_BDBUF
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-15 15:33:12 +01:00
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
ee82825dec libblock: Use transient event 2012-10-30 18:03:29 +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
5b29a08d69 libblock: Fix read-ahead task wake-up
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.
2012-07-09 10:42:08 +02:00
Sebastian Huber
2cc4f3ca45 libblock: Move read-ahead trigger check
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.
2012-07-03 10:25:12 +02:00
Sebastian Huber
71092f7c94 libblock: Fix read-ahead trigger and next update
The previous version was sub-optimal for read-ahead transfer counts of
one.
2012-07-02 17:03:28 +02:00
Sebastian Huber
f29d969a72 libblock: Fix read-ahead trigger and next update 2012-07-02 16:15:54 +02:00
Sebastian Huber
f12249ff05 libblock: Fix continuous blocks write request 2012-07-02 16:15:54 +02:00
Sebastian Huber
828f9462be libblock: Remove unused field 2012-07-02 16:15:54 +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
Joel Sherrill
721fe34aae Fix C files which had two semi-colons at EOL 2012-05-31 15:34:36 -05:00
Sebastian Huber
f164ae751a libblock: Move rtems_bdbuf_get_media_block() call
Move rtems_bdbuf_get_media_block() call inside the bdbuf lock.
2012-05-31 11:05:48 +02:00