Changeset 796c276 in mainline for uspace/srv/fs/ext2fs/ext2fs.c


Ignore:
Timestamp:
2011-03-03T20:12:36Z (14 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
163cf12
Parents:
9ffbdf1
Message:

Renamed ext2 server to ext2fs so its namespace won't collide with libext2. (+Small bits of other code in ext2fs server)

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/ext2fs/ext2fs.c

    r9ffbdf1 r796c276  
    3737 */
    3838
    39 #include "ext2.h"
     39#include "ext2fs.h"
    4040#include <ipc/services.h>
    4141#include <ipc/ns.h>
     
    4848#include "../../vfs/vfs.h"
    4949
    50 #define NAME    "ext2"
     50#define NAME    "ext2fs"
    5151
    52 vfs_info_t ext2_vfs_info = {
     52vfs_info_t ext2fs\_vfs_info = {
    5353        .name = NAME,
    5454};
    5555
    56 fs_reg_t ext2_reg;
     56fs_reg_t ext2fs_reg;
    5757
    5858/**
     
    6262 * The connection fibril accepts VFS requests from VFS. If there is only one
    6363 * instance of the fibril, VFS will need to serialize all VFS requests it sends
    64  * to EXT2. To overcome this bottleneck, VFS can send EXT2 the IPC_M_CONNECT_ME_TO
     64 * to EXT2FS. To overcome this bottleneck, VFS can send EXT2FS the IPC_M_CONNECT_ME_TO
    6565 * call. In that case, a new connection fibril will be created, which in turn
    6666 * will accept the call. Thus, a new phone will be opened for VFS.
     
    6868 * There are few issues with this arrangement. First, VFS can run out of
    6969 * 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 duplicate
     70 * phone for more serialized requests. Similarily, EXT2FS can refuse to duplicate
    7171 * the connection. VFS should then just make use of already existing phones and
    7272 * 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 the
     73 * upon each request, EXT2FS might want to keep the connections open after the
    7474 * request has been completed.
    7575 */
     
    9595                        return;
    9696                case VFS_OUT_MOUNTED:
    97                         ext2_mounted(callid, &call);
     97                        ext2fs_mounted(callid, &call);
    9898                        break;
    9999                case VFS_OUT_MOUNT:
    100                         ext2_mount(callid, &call);
     100                        ext2fs_mount(callid, &call);
    101101                        break;
    102102                case VFS_OUT_UNMOUNTED:
    103                         ext2_unmounted(callid, &call);
     103                        ext2fs_unmounted(callid, &call);
    104104                        break;
    105105                case VFS_OUT_UNMOUNT:
    106                         ext2_unmount(callid, &call);
     106                        ext2fs_unmount(callid, &call);
    107107                        break;
    108108                case VFS_OUT_LOOKUP:
    109                         ext2_lookup(callid, &call);
     109                        ext2fs_lookup(callid, &call);
    110110                        break;
    111111                case VFS_OUT_READ:
    112                         ext2_read(callid, &call);
     112                        ext2fs_read(callid, &call);
    113113                        break;
    114114                case VFS_OUT_WRITE:
    115                         ext2_write(callid, &call);
     115                        ext2fs_write(callid, &call);
    116116                        break;
    117117                case VFS_OUT_TRUNCATE:
    118                         ext2_truncate(callid, &call);
     118                        ext2fs_truncate(callid, &call);
    119119                        break;
    120120                case VFS_OUT_STAT:
    121                         ext2_stat(callid, &call);
     121                        ext2fs_stat(callid, &call);
    122122                        break;
    123123                case VFS_OUT_CLOSE:
    124                         ext2_close(callid, &call);
     124                        ext2fs_close(callid, &call);
    125125                        break;
    126126                case VFS_OUT_DESTROY:
    127                         ext2_destroy(callid, &call);
     127                        ext2fs_destroy(callid, &call);
    128128                        break;
    129129                case VFS_OUT_OPEN_NODE:
    130                         ext2_open_node(callid, &call);
     130                        ext2fs_open_node(callid, &call);
    131131                        break;
    132132                case VFS_OUT_SYNC:
    133                         ext2_sync(callid, &call);
     133                        ext2fs_sync(callid, &call);
    134134                        break;
    135135                default:
     
    153153        }
    154154       
    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);
    156156       
    157157        printf(NAME ": Accepting connections\n");
Note: See TracChangeset for help on using the changeset viewer.