Commit Graph

597 Commits

Author SHA1 Message Date
Ralf Kirchner
465b086534 dosfs: Bugfix for disks of for example 100MB size 2012-12-13 11:38:52 +01:00
Ralf Kirchner
26d6eddb0d dosfs: Whitespace change 2012-12-13 11:38:52 +01:00
Ralf Kirchner
253b3e5a67 dosfs: Fix request evaluation
Return the ability to set a cluster size other than one sector for
unaligned volumes.
2012-12-13 11:38:52 +01:00
Mathew Kallada
c2ae79e93c misc: Header File Doxygen Enhancement Task #3
http://www.google-melange.com/gci/task/view/google/gci2012/8006220
2012-12-12 15:57:49 -05:00
Mathew Kallada
9bff3752de libfs: Doxygen Enhancement GCI Task #7
http://www.google-melange.com/gci/task/view/google/gci2012/8006219
2012-12-11 18:54:46 -05:00
Ralf Kirchner
42a22f0824 dosfs: Cluster write optimization
Separate cluster write from sector write for quick file write.

New test fstests/fsdosfswrite01.
2012-12-05 15:26:48 +01:00
Ralf Kirchner
a20fbe78ec dosfs: Block size optimization
Change block size of bdbuf to the cluster size if the data clusters are
aligned on a cluster boundary.  This enables fast access to data
clusters.
2012-12-05 15:26:48 +01:00
Ralf Kirchner
697cf9dfc7 dosfs: Documentation 2012-12-05 15:26:47 +01:00
Ralf Kirchner
a0bc1dcbe8 dosfs: Delete fattype parameter for msdos_format()
Delete fattype parameter of msdos_format_request_param_t because the FAT
type is determined by cluster and disk size.

Estimate FAT type and re-evaluate FAT type after exact parameter
determination.
2012-12-05 15:26:47 +01:00
Ralf Kirchner
5b8d935ab3 dosfs: Add skip_alignment for msdos_format()
Add skip_alignment parameter of msdos_format_request_param_t.  Delete
cluster_align parameter of msdos_format_request_param_t.

By default the FAT, data cluster, and root directory for FAT12 and FAT16
is aligned on a cluster boundary to optimize performance.

Format changes throughout.
2012-12-05 15:26:47 +01:00
Ralf Kirchner
9683b2721c dosfs: Fix msdos_format()
For FAT32 msdos_format() used to initialize first FAT entries to
non-zero values only if a volume label was given.  Absence of these
entries made mounting such a FAT32 volume fail.
2012-12-03 17:27:29 +01:00
Sebastian Huber
acec386c75 Filesystem: PR1619: Use ENOSYS for default statvfs
POSIX does not specify an error number in case the file system does not
support this call.  Use the Linux value.
2012-11-22 17:33:13 +01:00
Sebastian Huber
0f0db894f7 dosfs: Lazy update of FAT32 FS info sector
The FAT32 FS info sector contains hints for the free cluster count and
the next free cluster.  The previous code read these values during mount
and replaced them with invalid values.  The shutdown operation updated
them with the current values.  These values are only hints.  Every FAT
implementation must cope with arbitrary values.  They are intended to
speed up certain operations.

Now we update the free cluster count and next free culster in the FAT32
FS info sector only during unmount or sync operations and only if the
values have changed.  This avoids writes to the FS info sector and
conforms to the behaviour of Linux and Windows.

The application can force an update of these values now with the fsync()
and fdatasync() operations.  Applications that only read will perform
not write operations to the FAT32 FS info sector.

The new fat_sync() function performs all non-file specific
synchronizations.
2012-11-13 09:38:03 +01:00
Sebastian Huber
886333844e dosfs: Use FAT_UNDEFINED_VALUE 2012-11-13 09:38:03 +01:00
Ralf Corsépius
0f06a0e540 Remove rtems-rfs-bitmaps-ut.c. 2012-11-06 04:59:40 +01:00
Ralf Corsépius
b44f994052 Include "rtems-rfs-shell.h". 2012-10-19 14:02:48 +02:00
Sebastian Huber
c17d0b315b Filesystem: Reject removal of root nodes
Reject the removal of file system instance root nodes in rmdir() and
unlink() and return the EBUSY error status.  File system instances can
be removed with unmount().  Remove root node special cases in IMFS,
DOSFS, and RFS.
2012-10-07 17:03:20 +02:00
Sebastian Huber
5633c54cdf nfsclient: Format changes 2012-10-02 15:38:51 +02:00
Sebastian Huber
c69ef3b6a5 nfsclient: Add and use nfsEvaluateStatus()
The NFS status codes do not map directly to the corresponding errno
values.
2012-10-02 15:27:35 +02:00
Sebastian Huber
3becac2ca3 nfsclient: Fix for short enums
The XDR library has a problem on architectures with short enums like the
default ARM EABI.  Short enums means that the size of the enum type is
variable and the smallest integer type to hold all enum values will be
selected.  For many enums this is char.  The XDR library uses int32_t
for enum_t.  There are several evil casts from an enum type to enum_t
which leads to invalid memory accesses on short enum architectures.  A
workaround is to add appropriate dummy enum values.
2012-10-02 15:27:35 +02:00
Sebastian Huber
86f6e8b73b nfsclient: PR2075: Fix node initialization 2012-10-02 15:27:34 +02:00
Sebastian Huber
6c92e1b8e9 IMFS: Typo 2012-08-09 12:45:37 +02:00
Sebastian Huber
c65afce430 dosfs: Use fs_info instead of mt_entry 2012-07-11 17:14:51 +02:00
Sebastian Huber
96b1d7fcfe dosfs: Fix for no space left on device condition
The file size was wrong in the no space left on device condition.  This
resulted in turn in a read of an invalid block which lead to an EIO
error status.
2012-06-04 09:54:32 +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
53f2ca3be6 dosfs: Fix format request with sectors per cluster 2012-05-31 13:50:08 +02:00
Sebastian Huber
f7f2eb5799 dosfs: Fix print format string 2012-05-29 16:18:44 +02:00
Sebastian Huber
ca764e66ea nfsclient: Fix symbolic link evaluation 2012-05-16 12:40:21 +02:00
Sebastian Huber
0a95800a58 Filesystem: Change pathconf_limits_and_options
The pathconf_limits_and_options field of
rtems_filesystem_mount_table_entry_t is now a const pointer to reduce
the read-write memory demands of file system instances.
2012-05-15 10:37:00 +02:00
Sebastian Huber
da154e14f6 Filesystem: Move operations to mount table entry
The scope of the file system operations is the file system instance.
The scope of the file system node handlers is the file location.  The
benefit of moving the operations to the mount table entry is a size
reduction of the file location (rtems_filesystem_location_info_t).  The
code size is slightly increased due to additional load instructions.

Restructure rtems_filesystem_mount_table_entry_t to improve cache
efficiency.
2012-05-15 10:01:43 +02:00
Sebastian Huber
7666afc97a Filesystem: Add const qualifier to lock/unlock 2012-05-15 10:01:43 +02:00
Sebastian Huber
53da07e436 Filesystem: PR1255: Move offset update to handlers
It is now the responsibility of the read() and write() handler to update
the offset field of the IO descriptor (rtems_libio_t).  This change
makes it possible to protect the IO descriptor from concurrent access by
per file locks.
2012-05-15 10:01:42 +02:00
Sebastian Huber
fed66f9910 Filesystem: Add shared device IO support
The device IO file system support in IMFS, devFS, and RFS uses now a
shared implementation.
2012-05-15 10:01:42 +02:00
Sebastian Huber
df01da6707 Filesystem: Use ioctl_command_t 2012-05-15 10:01:42 +02:00
Sebastian Huber
a1c6b96ac7 rfs: Fix major and minor number integer types 2012-05-15 10:01:42 +02:00
Sebastian Huber
fce1169de0 dosfs: Remove unused parameter 2012-05-14 16:57:59 +02:00
Sebastian Huber
29192481a8 devfs: C++ compatibility 2012-05-14 16:57:59 +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
86ef0df976 dosfs: Remove fat_file_datasync()
The fat_file_datasync() read every cluster of the file into the cache
and then synchronized it step-by-step.  For unmodified buffers this is a
non-operation.  For modified buffers this will wake-up the swapout task
which performs then a single buffer write operation.  This is usually
quite inefficient.  Firstly we do single buffer writes, secondly we
may perform a lot of unnecessary read operations (for huge files this is
really bad), and thirdly this leads likely to cache evictions.

The synchronization procedure is replaced by a simple
rtems_bdbuf_sync_dev().  This has the side-effect that also buffers not
related to the file are synchronized, but since the modified list is
normally short this should be acceptable.
2012-05-11 13:58:43 +02:00
Sebastian Huber
3d0c96c7f3 Filesystem: PR1893: Fix write and truncate handler
Space that grows due to truncate or write offsets beyond the current
file size must be zero filled.
2012-05-11 13:58:43 +02:00
Sebastian Huber
d61b0a5abf Filesystem: PR1871: Fix O_APPEND 2012-05-11 13:58:43 +02:00
Sebastian Huber
30d412469c Filesystem: PR1398: Fix lseek() mechanic
According to POSIX the lseek() function shall not, by itself, extend the
size of a file.

Remove the size field of rtems_libio_t.  A file has only one size but
may have multiple open file descriptors.  Thus a file size field in the
file descriptor may lead to inconsistencies.

New default handlers rtems_filesystem_default_lseek_file() and
rtems_filesystem_default_lseek_directory().
2012-05-11 13:58:43 +02:00
Joel Sherrill
33a105fb69 Revert: Remove CVS Ids
See http://www.rtems.org/pipermail/rtems-devel/2012-May/001006.html
for details.
2012-05-07 11:08:48 -05:00
Sebastian Huber
2cd2ed3288 nfsclient: Add rename operation 2012-05-04 13:29:45 +02:00
Sebastian Huber
078369f41d nfsclient: Fix hard link operation 2012-05-04 13:29:28 +02:00
Sebastian Huber
1747208963 Filesystem: Use proper parameter in NFS 2012-05-04 10:53:52 +02:00
Sebastian Huber
6b36ca2371 Filesystem: Remove pipe_lseek() 2012-05-04 10:53:52 +02:00
Ralf Corsépius
ee32f67a6f Remove CVS-Ids. 2012-05-04 09:36:25 +02:00
Chris Johns
3756041b00 IMFS: Update IMS_assert check when RTEMS_DEBUG is enabled.
Update the assert macro to the new IMFS_jnode_t.
2012-04-28 12:21:45 +10:00
Sebastian Huber
bc04436cce nfsclient: Use UID and GID of NFS handle
Use UID and GID of the NFS handle for node and symbolic link creation.
2012-04-23 16:26:13 +02:00