Changeset 796c276 in mainline for uspace/srv/fs/ext2fs/ext2fs.c
- Timestamp:
- 2011-03-03T20:12:36Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 163cf12
- Parents:
- 9ffbdf1
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/ext2fs/ext2fs.c
r9ffbdf1 r796c276 37 37 */ 38 38 39 #include "ext2 .h"39 #include "ext2fs.h" 40 40 #include <ipc/services.h> 41 41 #include <ipc/ns.h> … … 48 48 #include "../../vfs/vfs.h" 49 49 50 #define NAME "ext2 "50 #define NAME "ext2fs" 51 51 52 vfs_info_t ext2 _vfs_info = {52 vfs_info_t ext2fs\_vfs_info = { 53 53 .name = NAME, 54 54 }; 55 55 56 fs_reg_t ext2 _reg;56 fs_reg_t ext2fs_reg; 57 57 58 58 /** … … 62 62 * The connection fibril accepts VFS requests from VFS. If there is only one 63 63 * instance of the fibril, VFS will need to serialize all VFS requests it sends 64 * to EXT2 . To overcome this bottleneck, VFS can send EXT2the IPC_M_CONNECT_ME_TO64 * to EXT2FS. To overcome this bottleneck, VFS can send EXT2FS the IPC_M_CONNECT_ME_TO 65 65 * call. In that case, a new connection fibril will be created, which in turn 66 66 * will accept the call. Thus, a new phone will be opened for VFS. … … 68 68 * There are few issues with this arrangement. First, VFS can run out of 69 69 * available phones. In that case, VFS can close some other phones or use one 70 * phone for more serialized requests. Similarily, EXT2 can refuse to duplicate70 * phone for more serialized requests. Similarily, EXT2FS can refuse to duplicate 71 71 * the connection. VFS should then just make use of already existing phones and 72 72 * route its requests through them. To avoid paying the fibril creation price 73 * upon each request, EXT2 might want to keep the connections open after the73 * upon each request, EXT2FS might want to keep the connections open after the 74 74 * request has been completed. 75 75 */ … … 95 95 return; 96 96 case VFS_OUT_MOUNTED: 97 ext2 _mounted(callid, &call);97 ext2fs_mounted(callid, &call); 98 98 break; 99 99 case VFS_OUT_MOUNT: 100 ext2 _mount(callid, &call);100 ext2fs_mount(callid, &call); 101 101 break; 102 102 case VFS_OUT_UNMOUNTED: 103 ext2 _unmounted(callid, &call);103 ext2fs_unmounted(callid, &call); 104 104 break; 105 105 case VFS_OUT_UNMOUNT: 106 ext2 _unmount(callid, &call);106 ext2fs_unmount(callid, &call); 107 107 break; 108 108 case VFS_OUT_LOOKUP: 109 ext2 _lookup(callid, &call);109 ext2fs_lookup(callid, &call); 110 110 break; 111 111 case VFS_OUT_READ: 112 ext2 _read(callid, &call);112 ext2fs_read(callid, &call); 113 113 break; 114 114 case VFS_OUT_WRITE: 115 ext2 _write(callid, &call);115 ext2fs_write(callid, &call); 116 116 break; 117 117 case VFS_OUT_TRUNCATE: 118 ext2 _truncate(callid, &call);118 ext2fs_truncate(callid, &call); 119 119 break; 120 120 case VFS_OUT_STAT: 121 ext2 _stat(callid, &call);121 ext2fs_stat(callid, &call); 122 122 break; 123 123 case VFS_OUT_CLOSE: 124 ext2 _close(callid, &call);124 ext2fs_close(callid, &call); 125 125 break; 126 126 case VFS_OUT_DESTROY: 127 ext2 _destroy(callid, &call);127 ext2fs_destroy(callid, &call); 128 128 break; 129 129 case VFS_OUT_OPEN_NODE: 130 ext2 _open_node(callid, &call);130 ext2fs_open_node(callid, &call); 131 131 break; 132 132 case VFS_OUT_SYNC: 133 ext2 _sync(callid, &call);133 ext2fs_sync(callid, &call); 134 134 break; 135 135 default: … … 153 153 } 154 154 155 rc = fs_register(vfs_phone, &ext2 _reg, &ext2_vfs_info, ext2_connection);155 rc = fs_register(vfs_phone, &ext2fs_reg, &ext2fs_vfs_info, ext2_connection); 156 156 157 157 printf(NAME ": Accepting connections\n");
Note:
See TracChangeset
for help on using the changeset viewer.