Rev |
Age |
Author |
Path |
Log message |
Diff |
Changes |
2683 |
6117 d 19 h |
jermar |
/trunk/uspace/srv/vfs/ |
Introduce the open file lock. Modify vfs_rdwr() to take this lock into account
when reading or writing from/to an open file. |
|
/trunk/uspace/srv/vfs/vfs.h /trunk/uspace/srv/vfs/vfs_file.c /trunk/uspace/srv/vfs/vfs_rdwr.c
|
2682 |
6117 d 22 h |
jermar |
/trunk/uspace/ |
Fix type in declaration of VFS node rwlock.
Introduce a dedicated type for futexes. Make the existing futex code use this
newly introduced type and fix formatting in futex.c. |
|
/trunk/uspace/lib/libc/generic/futex.c /trunk/uspace/lib/libc/include/futex.h /trunk/uspace/srv/vfs/vfs.h
|
2681 |
6117 d 23 h |
jermar |
/trunk/uspace/ |
Turn the namespace futex into rwlock. |
|
/trunk/uspace/lib/libc/include/rwlock.h /trunk/uspace/srv/vfs/vfs.h /trunk/uspace/srv/vfs/vfs_mount.c /trunk/uspace/srv/vfs/vfs_open.c /trunk/uspace/srv/vfs/vfs_unlink.c
|
2680 |
6117 d 23 h |
jermar |
/trunk/uspace/ |
Add basic rwlock API for uspace so that VFS can be designed/implemented using
this API. So far, the implementation of this API merely wraps futexes into
rwlocks. Real rwlocks are wanted by ticket #54.
Using the new rwlock API, replace the VFS node content futex with an rwlock.
Lock the contents rwlock as reader on reads and as writer on writes. |
|
/trunk/uspace/lib/libc/include/rwlock.h
/trunk/uspace/srv/vfs/vfs.h /trunk/uspace/srv/vfs/vfs_node.c /trunk/uspace/srv/vfs/vfs_rdwr.c
|
2679 |
6121 d 15 h |
jermar |
/trunk/uspace/srv/vfs/ |
Rename unlink_futex to namespace_futex and introduce a new futex for serializing
concurrent access to a VFS node's contents by multiple clients. |
|
/trunk/uspace/srv/vfs/vfs.h /trunk/uspace/srv/vfs/vfs_mount.c /trunk/uspace/srv/vfs/vfs_node.c /trunk/uspace/srv/vfs/vfs_open.c /trunk/uspace/srv/vfs/vfs_rdwr.c /trunk/uspace/srv/vfs/vfs_unlink.c
|
2678 |
6123 d 18 h |
jermar |
/trunk/uspace/ |
The IPC_M_SHARE_* and IPC_M_DATA_* calls pass through 3 stages. Rename the send,
receive and deliver wrappers to names ending with 'start', 'receive' and
'finalize', respectively. This should make it clearer for dummies. |
|
/trunk/uspace/app/klog/klog.c /trunk/uspace/app/tester/devmap/devmap1.c /trunk/uspace/lib/libc/generic/ipc.c /trunk/uspace/lib/libc/generic/time.c /trunk/uspace/lib/libc/generic/vfs.c /trunk/uspace/lib/libc/include/ipc/ipc.h /trunk/uspace/lib/libfs/libfs.c /trunk/uspace/srv/console/console.c /trunk/uspace/srv/console/gcons.c /trunk/uspace/srv/devmap/devmap.c /trunk/uspace/srv/fs/tmpfs/tmpfs_ops.c /trunk/uspace/srv/rd/rd.c /trunk/uspace/srv/vfs/vfs_mount.c /trunk/uspace/srv/vfs/vfs_open.c /trunk/uspace/srv/vfs/vfs_register.c
|
2677 |
6123 d 19 h |
jermar |
/trunk/ |
Rename IPC_M_AS_AREA_SEND to IPC_M_SHARE_OUT. Rename IPC_M_AS_AREA_RECV to
IPC_M_SHARE_IN. Provide user-friendly wrappers for these methods so that even
dummies can get it right. Some applications using simpler protocols still use
these methods directly. |
|
/trunk/kernel/generic/include/ipc/ipc.h /trunk/kernel/generic/src/ipc/sysipc.c /trunk/uspace/app/klog/klog.c /trunk/uspace/lib/libc/generic/ipc.c /trunk/uspace/lib/libc/generic/time.c /trunk/uspace/lib/libc/include/ipc/ipc.h /trunk/uspace/lib/libfs/libfs.c /trunk/uspace/srv/console/console.c /trunk/uspace/srv/console/gcons.c /trunk/uspace/srv/fb/ega.c /trunk/uspace/srv/fb/fb.c /trunk/uspace/srv/ns/ns.c /trunk/uspace/srv/rd/rd.c /trunk/uspace/srv/vfs/vfs_register.c
|
2676 |
6124 d 1 h |
jermar |
/trunk/ |
Simplify the IPC_M_DATA_WRITE protocol. Do not pass the source address space
virtual address to the recipient. This feature was not used anyway. Now
IPC_M_DATA_WRITE and IPC_M_DATA_READ are feature-aligned. |
|
/trunk/kernel/generic/include/ipc/ipc.h /trunk/kernel/generic/src/ipc/sysipc.c /trunk/uspace/lib/libc/generic/ipc.c /trunk/uspace/lib/libc/include/ipc/ipc.h /trunk/uspace/srv/devmap/devmap.c /trunk/uspace/srv/fs/tmpfs/tmpfs_ops.c /trunk/uspace/srv/vfs/vfs_mount.c /trunk/uspace/srv/vfs/vfs_open.c /trunk/uspace/srv/vfs/vfs_rdwr.c /trunk/uspace/srv/vfs/vfs_register.c
|
2675 |
6124 d 14 h |
jermar |
/trunk/uspace/lib/libc/generic/ |
Actually use the nbyte argument in both read() and write().
Fix warnings in read() and write(). |
|
/trunk/uspace/lib/libc/generic/vfs.c
|
2674 |
6124 d 14 h |
jermar |
/trunk/uspace/ |
Add libc VFS wrapper for VFS_WRITE. Fix a small bug in read(). Place open(),
read() and write() declarations in their respective headers according to SUSv3. |
|
/trunk/uspace/lib/libc/include/fcntl.h
/trunk/uspace/app/tester/vfs/vfs1.c /trunk/uspace/lib/libc/generic/vfs.c /trunk/uspace/lib/libc/include/vfs.h
|
2673 |
6124 d 14 h |
jermar |
/trunk/uspace/srv/fs/tmpfs/ |
Rename variable from 'size' to 'len'. |
|
/trunk/uspace/srv/fs/tmpfs/tmpfs_ops.c
|
2672 |
6124 d 15 h |
jermar |
/trunk/uspace/app/tester/vfs/ |
Use libc's VFS wrappers instead of direct communication with VFS. |
|
/trunk/uspace/app/tester/vfs/vfs1.c
|
2671 |
6124 d 15 h |
jermar |
/trunk/uspace/lib/libc/ |
Add VFS wrappers for VFS_MOUNT, VFS_OPEN and VFS_READ to libc. |
|
/trunk/uspace/lib/libc/generic/vfs.c /trunk/uspace/lib/libc/include/vfs.h
/trunk/uspace/lib/libc/Makefile
|
2670 |
6128 d 13 h |
jermar |
/trunk/uspace/ |
Move the open(), read() and write() provided by streams.c away so that
these functions won't clash with the real open(), read() and write(), which are
soon to be provided by a libvfs library. Applications can now use open_stdin(),
open_stdout(), read_stdin() and write_stdout(). Later, there might be an option
of providing a custom console file system, which will work similarly to how
streams' open(), read() and write() worked. |
|
/trunk/uspace/app/tetris/screen.c /trunk/uspace/lib/libc/generic/io/io.c /trunk/uspace/lib/libc/generic/io/stream.c /trunk/uspace/lib/libc/generic/io/vprintf.c /trunk/uspace/lib/libc/generic/libc.c /trunk/uspace/lib/libc/include/io/stream.h
|
2669 |
6128 d 14 h |
jermar |
/trunk/uspace/lib/libc/generic/io/ |
Remove file.c. |
|
/trunk/uspace/lib/libc/generic/io/file.c
|
2668 |
6128 d 14 h |
jermar |
/trunk/uspace/lib/libc/include/io/ |
Remove file.h. |
|
/trunk/uspace/lib/libc/include/io/file.h
|
2667 |
6129 d 11 h |
jermar |
/trunk/uspace/srv/fs/tmpfs/ |
The previous commit was not entirely sane.
Handle VFS_WRITE correctly when the file doesn't grow.
Handle it correctly also when the file grows. |
|
/trunk/uspace/srv/fs/tmpfs/tmpfs_ops.c
|
2666 |
6129 d 16 h |
jermar |
/trunk/uspace/srv/ |
VFS and TMPFS support for VFS_WRITE. |
|
/trunk/uspace/srv/vfs/vfs_rdwr.c
/trunk/uspace/srv/vfs/vfs_read.c
/trunk/uspace/srv/fs/tmpfs/tmpfs.h /trunk/uspace/srv/fs/tmpfs/tmpfs_ops.c /trunk/uspace/srv/vfs/Makefile /trunk/uspace/srv/vfs/vfs.c /trunk/uspace/srv/vfs/vfs.h
|
2665 |
6131 d 13 h |
jermar |
/trunk/uspace/app/tester/vfs/ |
The vfs1 test now reads a file on a TMPFS file system. |
|
/trunk/uspace/app/tester/vfs/vfs1.c
|
2664 |
6131 d 13 h |
jermar |
/trunk/uspace/srv/fs/tmpfs/ |
Fix two bugs in TMPFS-side VFS_READ. |
|
/trunk/uspace/srv/fs/tmpfs/tmpfs_ops.c
|
2663 |
6131 d 14 h |
jermar |
/trunk/uspace/ |
Reimplement VFS_READ using IPC_M_DATA_READ. |
|
/trunk/uspace/lib/libc/generic/ipc.c /trunk/uspace/srv/fs/tmpfs/tmpfs_ops.c /trunk/uspace/srv/vfs/vfs_read.c
|
2662 |
6131 d 14 h |
jermar |
/trunk/ |
Add support for IPC_M_DATA_READ calls. |
|
/trunk/kernel/generic/include/ipc/ipc.h /trunk/kernel/generic/src/ipc/ipc.c /trunk/kernel/generic/src/ipc/sysipc.c /trunk/uspace/lib/libc/generic/ipc.c /trunk/uspace/lib/libc/include/ipc/ipc.h
|
2660 |
6131 d 16 h |
jermar |
/trunk/ |
Rename IPC_M_DATA_SEND to IPC_M_DATA_WRITE. Now, when we also add
IPC_M_DATA_READ, it will not clash and cause confusion with userspace wrappers
such as ipc_data_receive(). Rename the forementioned wrappers to
ipc_data_write_send(), ipc_data_write_receive() and ipc_data_write_deliver(). |
|
/trunk/kernel/generic/include/ipc/ipc.h /trunk/kernel/generic/src/ipc/sysipc.c /trunk/uspace/app/tester/devmap/devmap1.c /trunk/uspace/app/tester/vfs/vfs1.c /trunk/uspace/lib/libc/generic/ipc.c /trunk/uspace/lib/libc/include/ipc/ipc.h /trunk/uspace/lib/libfs/libfs.c /trunk/uspace/srv/devmap/devmap.c /trunk/uspace/srv/vfs/vfs_mount.c /trunk/uspace/srv/vfs/vfs_open.c /trunk/uspace/srv/vfs/vfs_register.c
|
2659 |
6132 d 13 h |
jermar |
/trunk/uspace/srv/vfs/ |
After VFS_READ, update the position pointer in the open file. |
|
/trunk/uspace/srv/vfs/vfs_read.c
|
2658 |
6132 d 13 h |
jermar |
/trunk/uspace/srv/ |
VFS work.
Foundation for TMPFS-side VFS_READ and fixes in VFS-side VFS_READ. |
|
/trunk/uspace/srv/fs/tmpfs/tmpfs.c /trunk/uspace/srv/fs/tmpfs/tmpfs.h /trunk/uspace/srv/fs/tmpfs/tmpfs_ops.c /trunk/uspace/srv/vfs/vfs_read.c
|
2657 |
6132 d 15 h |
jermar |
/trunk/uspace/ |
VFS work.
Cleaner VFS_MOUNT protocol. |
|
/trunk/uspace/app/tester/vfs/vfs1.c /trunk/uspace/srv/vfs/vfs_mount.c
|
2656 |
6135 d 19 h |
jermar |
/trunk/uspace/app/tester/ |
Add a simple test of VFS_MOUNT and VFS_OPEN to tester. |
|
/trunk/uspace/app/tester/vfs /trunk/uspace/app/tester/vfs/vfs1.c /trunk/uspace/app/tester/vfs/vfs1.def
/trunk/uspace/app/tester/Makefile /trunk/uspace/app/tester/tester.c /trunk/uspace/app/tester/tester.h
|
2655 |
6135 d 19 h |
jermar |
/trunk/uspace/srv/fs/tmpfs/ |
TMPFS work.
VFS_LOOKUP implemented. |
|
/trunk/uspace/srv/fs/tmpfs/tmpfs.h /trunk/uspace/srv/fs/tmpfs/tmpfs_ops.c
|
2654 |
6135 d 19 h |
jermar |
/trunk/uspace/srv/vfs/ |
VFS work.
Don't hang up the connection to VFS after VFS_MOUNT. |
|
/trunk/uspace/srv/vfs/vfs.c
|
2653 |
6135 d 19 h |
jermar |
/trunk/uspace/srv/vfs/ |
VFS work.
Index of the last PLB character of a pathname was not correctly calculated. |
|
/trunk/uspace/srv/vfs/vfs_lookup.c
|
2652 |
6135 d 19 h |
jermar |
/trunk/uspace/srv/vfs/ |
VFS work.
Fix VFS node hash function to hash only within the limits of its supposed
ranges. |
|
/trunk/uspace/srv/vfs/vfs_node.c
|
2651 |
6135 d 19 h |
jermar |
/trunk/uspace/srv/vfs/ |
VFS work. Releas the FS phone earlier. |
|
/trunk/uspace/srv/vfs/vfs_mount.c
|
2650 |
6135 d 19 h |
jermar |
/trunk/uspace/srv/vfs/ |
VFS work. FS info futex must be initialized. |
|
/trunk/uspace/srv/vfs/vfs_register.c
|
2645 |
6138 d 18 h |
jermar |
/trunk/uspace/ |
Start TMPFS.
Not loaded during boot as there is a reproducible kernel panic which occurs when
both tmpfs and fat are loaded. |
|
/trunk/uspace/srv/fs/tmpfs /trunk/uspace/srv/fs/tmpfs/Makefile /trunk/uspace/srv/fs/tmpfs/tmpfs.c /trunk/uspace/srv/fs/tmpfs/tmpfs.h /trunk/uspace/srv/fs/tmpfs/tmpfs_ops.c
/trunk/uspace/Makefile
|
2644 |
6138 d 18 h |
jermar |
/trunk/uspace/ |
Move incomplete fs interface from fat.h to libfs. |
|
/trunk/uspace/lib/libfs/libfs.h /trunk/uspace/srv/fs/fat/fat.c /trunk/uspace/srv/fs/fat/fat.h
|
2643 |
6138 d 19 h |
jermar |
/trunk/uspace/ |
VFS work.
Move FS registration code to libfs. |
|
/trunk/uspace/lib/libfs/libfs.c /trunk/uspace/lib/libfs/libfs.h /trunk/uspace/srv/fs/fat/Makefile /trunk/uspace/srv/fs/fat/fat.c /trunk/uspace/srv/fs/fat/fat.h /trunk/uspace/srv/fs/fat/fat_ops.c
|
2642 |
6139 d 23 h |
jermar |
/trunk/uspace/ |
Start libfs.
libfs is to contain all common fs code. |
|
/trunk/uspace/lib/libfs /trunk/uspace/lib/libfs/Makefile /trunk/uspace/lib/libfs/libfs.c /trunk/uspace/lib/libfs/libfs.h
/trunk/uspace/Makefile
|
2641 |
6140 d 18 h |
jermar |
/trunk/uspace/srv/vfs/ |
VFS work.
During VFS_REGISTER, use strncmp() instead of strcmp().
Add one excessive convenience byte to vfs_info.name to support the
above-mentioned change. In case the fs name spans all available
characters, make sure this convenience byte is zero. |
|
/trunk/uspace/srv/vfs/vfs.h /trunk/uspace/srv/vfs/vfs_register.c
|
2640 |
6142 d 12 h |
cejka |
/trunk/uspace/lib/libc/ |
Function strncmp() added to libc. |
|
/trunk/uspace/lib/libc/generic/string.c /trunk/uspace/lib/libc/include/string.h
|
2639 |
6149 d 13 h |
jermar |
/trunk/uspace/srv/fs/fat/ |
FAT work.
Foundation for FAT dentry comparison function.
Beware of looking at the diff or risk loosing sanity. |
|
/trunk/uspace/srv/fs/fat/fat_ops.c
|