Changeset 4198f9c3 in mainline for uspace/srv


Ignore:
Timestamp:
2009-06-28T13:43:15Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
852b801
Parents:
6408be3
Message:

Separate the VFS input and output protocols.

Location:
uspace/srv
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/console/console.c

    r6408be3 r4198f9c3  
    552552                                gcons_notify_disconnect(cons->index);
    553553                        return;
    554                 case VFS_READ:
     554                case VFS_OUT_READ:
    555555                        async_serialize_end();
    556556                        cons_read(cons, callid, &call);
    557557                        async_serialize_start();
    558558                        continue;
    559                 case VFS_WRITE:
     559                case VFS_OUT_WRITE:
    560560                        async_serialize_end();
    561561                        cons_write(cons, callid, &call);
    562562                        async_serialize_start();
    563563                        continue;
    564                 case VFS_SYNC:
     564                case VFS_OUT_SYNC:
    565565                        fb_pending_flush();
    566566                        if (cons == active_console) {
  • uspace/srv/fs/devfs/devfs.c

    r6408be3 r4198f9c3  
    6868                case IPC_M_PHONE_HUNGUP:
    6969                        return;
    70                 case VFS_MOUNTED:
     70                case VFS_OUT_MOUNTED:
    7171                        devfs_mounted(callid, &call);
    7272                        break;
    73                 case VFS_MOUNT:
     73                case VFS_OUT_MOUNT:
    7474                        devfs_mount(callid, &call);
    7575                        break;
    76                 case VFS_LOOKUP:
     76                case VFS_OUT_LOOKUP:
    7777                        devfs_lookup(callid, &call);
    7878                        break;
    79                 case VFS_OPEN_NODE:
     79                case VFS_OUT_OPEN_NODE:
    8080                        devfs_open_node(callid, &call);
    8181                        break;
    82                 case VFS_DEVICE:
     82                case VFS_OUT_DEVICE:
    8383                        devfs_device(callid, &call);
    8484                        break;
    85                 case VFS_READ:
     85                case VFS_OUT_READ:
    8686                        devfs_read(callid, &call);
    8787                        break;
    88                 case VFS_WRITE:
     88                case VFS_OUT_WRITE:
    8989                        devfs_write(callid, &call);
    9090                        break;
    91                 case VFS_TRUNCATE:
     91                case VFS_OUT_TRUNCATE:
    9292                        devfs_truncate(callid, &call);
    9393                        break;
    94                 case VFS_CLOSE:
     94                case VFS_OUT_CLOSE:
    9595                        devfs_close(callid, &call);
    9696                        break;
    97                 case VFS_SYNC:
     97                case VFS_OUT_SYNC:
    9898                        devfs_sync(callid, &call);
    9999                        break;
    100                 case VFS_DESTROY:
     100                case VFS_OUT_DESTROY:
    101101                        devfs_destroy(callid, &call);
    102102                        break;
  • uspace/srv/fs/fat/fat.c

    r6408be3 r4198f9c3  
    9292                case IPC_M_PHONE_HUNGUP:
    9393                        return;
    94                 case VFS_MOUNTED:
     94                case VFS_OUT_MOUNTED:
    9595                        fat_mounted(callid, &call);
    9696                        break;
    97                 case VFS_MOUNT:
     97                case VFS_OUT_MOUNT:
    9898                        fat_mount(callid, &call);
    9999                        break;
    100                 case VFS_LOOKUP:
     100                case VFS_OUT_LOOKUP:
    101101                        fat_lookup(callid, &call);
    102102                        break;
    103                 case VFS_READ:
     103                case VFS_OUT_READ:
    104104                        fat_read(callid, &call);
    105105                        break;
    106                 case VFS_WRITE:
     106                case VFS_OUT_WRITE:
    107107                        fat_write(callid, &call);
    108108                        break;
    109                 case VFS_TRUNCATE:
     109                case VFS_OUT_TRUNCATE:
    110110                        fat_truncate(callid, &call);
    111111                        break;
    112                 case VFS_CLOSE:
     112                case VFS_OUT_CLOSE:
    113113                        fat_close(callid, &call);
    114114                        break;
    115                 case VFS_DESTROY:
     115                case VFS_OUT_DESTROY:
    116116                        fat_destroy(callid, &call);
    117117                        break;
    118                 case VFS_OPEN_NODE:
     118                case VFS_OUT_OPEN_NODE:
    119119                        fat_open_node(callid, &call);
    120120                        break;
    121                 case VFS_DEVICE:
     121                case VFS_OUT_DEVICE:
    122122                        fat_device(callid, &call);
    123123                        break;
    124                 case VFS_SYNC:
     124                case VFS_OUT_SYNC:
    125125                        fat_sync(callid, &call);
    126126                        break;
  • uspace/srv/fs/tmpfs/tmpfs.c

    r6408be3 r4198f9c3  
    9999                case IPC_M_PHONE_HUNGUP:
    100100                        return;
    101                 case VFS_MOUNTED:
     101                case VFS_OUT_MOUNTED:
    102102                        tmpfs_mounted(callid, &call);
    103103                        break;
    104                 case VFS_MOUNT:
     104                case VFS_OUT_MOUNT:
    105105                        tmpfs_mount(callid, &call);
    106106                        break;
    107                 case VFS_LOOKUP:
     107                case VFS_OUT_LOOKUP:
    108108                        tmpfs_lookup(callid, &call);
    109109                        break;
    110                 case VFS_READ:
     110                case VFS_OUT_READ:
    111111                        tmpfs_read(callid, &call);
    112112                        break;
    113                 case VFS_WRITE:
     113                case VFS_OUT_WRITE:
    114114                        tmpfs_write(callid, &call);
    115115                        break;
    116                 case VFS_TRUNCATE:
     116                case VFS_OUT_TRUNCATE:
    117117                        tmpfs_truncate(callid, &call);
    118118                        break;
    119                 case VFS_CLOSE:
     119                case VFS_OUT_CLOSE:
    120120                        tmpfs_close(callid, &call);
    121121                        break;
    122                 case VFS_DESTROY:
     122                case VFS_OUT_DESTROY:
    123123                        tmpfs_destroy(callid, &call);
    124124                        break;
    125                 case VFS_OPEN_NODE:
     125                case VFS_OUT_OPEN_NODE:
    126126                        tmpfs_open_node(callid, &call);
    127127                        break;
    128                 case VFS_DEVICE:
     128                case VFS_OUT_DEVICE:
    129129                        tmpfs_device(callid, &call);
    130130                        break;
    131                 case VFS_SYNC:
     131                case VFS_OUT_SYNC:
    132132                        tmpfs_sync(callid, &call);
    133133                        break;
     
    153153                return -1;
    154154        }
    155        
     155
    156156        int rc = fs_register(vfs_phone, &tmpfs_reg, &tmpfs_vfs_info,
    157157            tmpfs_connection);
  • uspace/srv/vfs/vfs.c

    r6408be3 r4198f9c3  
    8080                        keep_on_going = false;
    8181                        break;
    82                 case VFS_REGISTER:
     82                case VFS_IN_REGISTER:
    8383                        vfs_register(callid, &call);
    8484                        keep_on_going = false;
    8585                        break;
    86                 case VFS_MOUNT:
     86                case VFS_IN_MOUNT:
    8787                        vfs_mount(callid, &call);
    8888                        break;
    89                 case VFS_OPEN:
     89                case VFS_IN_OPEN:
    9090                        vfs_open(callid, &call);
    9191                        break;
    92                 case VFS_OPEN_NODE:
     92                case VFS_IN_OPEN_NODE:
    9393                        vfs_open_node(callid, &call);
    9494                        break;
    95                 case VFS_CLOSE:
     95                case VFS_IN_CLOSE:
    9696                        vfs_close(callid, &call);
    9797                        break;
    98                 case VFS_READ:
     98                case VFS_IN_READ:
    9999                        vfs_read(callid, &call);
    100100                        break;
    101                 case VFS_WRITE:
     101                case VFS_IN_WRITE:
    102102                        vfs_write(callid, &call);
    103103                        break;
    104                 case VFS_SEEK:
     104                case VFS_IN_SEEK:
    105105                        vfs_seek(callid, &call);
    106106                        break;
    107                 case VFS_TRUNCATE:
     107                case VFS_IN_TRUNCATE:
    108108                        vfs_truncate(callid, &call);
    109109                        break;
    110                 case VFS_MKDIR:
     110                case VFS_IN_MKDIR:
    111111                        vfs_mkdir(callid, &call);
    112112                        break;
    113                 case VFS_UNLINK:
     113                case VFS_IN_UNLINK:
    114114                        vfs_unlink(callid, &call);
    115115                        break;
    116                 case VFS_RENAME:
     116                case VFS_IN_RENAME:
    117117                        vfs_rename(callid, &call);
    118118                        break;
    119                 case VFS_DEVICE:
     119                case VFS_IN_DEVICE:
    120120                        vfs_device(callid, &call);
    121121                        break;
    122                 case VFS_SYNC:
     122                case VFS_IN_SYNC:
    123123                        vfs_sync(callid, &call);
    124124                        break;
    125                 case VFS_NODE:
     125                case VFS_IN_NODE:
    126126                        vfs_node(callid, &call);
    127127                        break;
  • uspace/srv/vfs/vfs_lookup.c

    r6408be3 r4198f9c3  
    160160        ipc_call_t answer;
    161161        int phone = vfs_grab_phone(root->fs_handle);
    162         aid_t req = async_send_5(phone, VFS_LOOKUP, (ipcarg_t) first,
     162        aid_t req = async_send_5(phone, VFS_OUT_LOOKUP, (ipcarg_t) first,
    163163            (ipcarg_t) (first + len - 1) % PLB_SIZE,
    164164            (ipcarg_t) root->dev_handle, (ipcarg_t) lflag, (ipcarg_t) index,
     
    205205       
    206206        ipc_call_t answer;
    207         aid_t req = async_send_2(phone, VFS_OPEN_NODE,
     207        aid_t req = async_send_2(phone, VFS_OUT_OPEN_NODE,
    208208            (ipcarg_t) result->triplet.dev_handle,
    209209            (ipcarg_t) result->triplet.index, &answer);
  • uspace/srv/vfs/vfs_node.c

    r6408be3 r4198f9c3  
    130130                int phone = vfs_grab_phone(node->fs_handle);
    131131                ipcarg_t rc;
    132                 rc = async_req_2_0(phone, VFS_DESTROY,
     132                rc = async_req_2_0(phone, VFS_OUT_DESTROY,
    133133                    (ipcarg_t)node->dev_handle, (ipcarg_t)node->index);
    134134                assert(rc == EOK);
  • uspace/srv/vfs/vfs_ops.c

    r6408be3 r4198f9c3  
    109109                /*
    110110                 * Now we hold a reference to mp_node.
    111                  * It will be dropped upon the corresponding VFS_UNMOUNT.
     111                 * It will be dropped upon the corresponding VFS_IN_UNMOUNT.
    112112                 * This prevents the mount point from being deleted.
    113113                 */
     
    122122                        /* Tell the mountee that it is being mounted. */
    123123                        phone = vfs_grab_phone(fs_handle);
    124                         msg = async_send_1(phone, VFS_MOUNTED,
     124                        msg = async_send_1(phone, VFS_OUT_MOUNTED,
    125125                            (ipcarg_t) dev_handle, &answer);
    126126                        /* send the mount options */
     
    184184
    185185        phone = vfs_grab_phone(mp_res.triplet.fs_handle);
    186         msg = async_send_4(phone, VFS_MOUNT,
     186        msg = async_send_4(phone, VFS_OUT_MOUNT,
    187187            (ipcarg_t) mp_res.triplet.dev_handle,
    188188            (ipcarg_t) mp_res.triplet.index,
     
    438438        /*
    439439         * The POSIX interface is open(path, oflag, mode).
    440          * We can receive oflags and mode along with the VFS_OPEN call; the path
    441          * will need to arrive in another call.
     440         * We can receive oflags and mode along with the VFS_IN_OPEN call;
     441         * the path will need to arrive in another call.
    442442         *
    443443         * We also receive one private, non-POSIX set of flags called lflag
     
    556556         * It is necessary so that the file will not disappear when
    557557         * vfs_node_put() is called. The reference will be dropped by the
    558          * respective VFS_CLOSE.
     558         * respective VFS_IN_CLOSE.
    559559         */
    560560        vfs_node_addref(node);
     
    633633         * It is necessary so that the file will not disappear when
    634634         * vfs_node_put() is called. The reference will be dropped by the
    635          * respective VFS_CLOSE.
     635         * respective VFS_IN_CLOSE.
    636636         */
    637637        vfs_node_addref(node);
     
    675675        int fs_phone = vfs_grab_phone(file->node->fs_handle);
    676676       
    677         /* Make a VFS_DEVICE request at the destination FS server. */
     677        /* Make a VFS_OUT_DEVICE request at the destination FS server. */
    678678        aid_t msg;
    679679        ipc_call_t answer;
    680         msg = async_send_2(fs_phone, IPC_GET_METHOD(*request),
    681             file->node->dev_handle, file->node->index, &answer);
     680        msg = async_send_2(fs_phone, VFS_OUT_DEVICE, file->node->dev_handle,
     681            file->node->index, &answer);
    682682
    683683        /* Wait for reply from the FS server. */
     
    709709        int fs_phone = vfs_grab_phone(file->node->fs_handle);
    710710       
    711         /* Make a VFS_SYMC request at the destination FS server. */
     711        /* Make a VFS_OUT_SYMC request at the destination FS server. */
    712712        aid_t msg;
    713713        ipc_call_t answer;
    714         msg = async_send_2(fs_phone, IPC_GET_METHOD(*request),
    715             file->node->dev_handle, file->node->index, &answer);
     714        msg = async_send_2(fs_phone, VFS_OUT_SYNC, file->node->dev_handle,
     715            file->node->index, &answer);
    716716
    717717        /* Wait for reply from the FS server. */
     
    743743        int fs_phone = vfs_grab_phone(file->node->fs_handle);
    744744       
    745         /* Make a VFS_CLOSE request at the destination FS server. */
     745        /* Make a VFS_OUT_CLOSE request at the destination FS server. */
    746746        aid_t msg;
    747747        ipc_call_t answer;
    748         msg = async_send_2(fs_phone, IPC_GET_METHOD(*request),
    749             file->node->dev_handle, file->node->index, &answer);
     748        msg = async_send_2(fs_phone, VFS_OUT_CLOSE, file->node->dev_handle,
     749            file->node->index, &answer);
    750750
    751751        /* Wait for reply from the FS server. */
     
    833833        if (!read && file->append)
    834834                file->pos = file->node->size;
    835         msg = async_send_3(fs_phone, IPC_GET_METHOD(*request),
     835        msg = async_send_3(fs_phone, read ? VFS_OUT_READ : VFS_OUT_WRITE,
    836836            file->node->dev_handle, file->node->index, file->pos, &answer);
    837837       
     
    947947       
    948948        fs_phone = vfs_grab_phone(fs_handle);
    949         rc = async_req_3_0(fs_phone, VFS_TRUNCATE, (ipcarg_t)dev_handle,
     949        rc = async_req_3_0(fs_phone, VFS_OUT_TRUNCATE, (ipcarg_t)dev_handle,
    950950            (ipcarg_t)index, (ipcarg_t)size);
    951951        vfs_release_phone(fs_phone);
     
    10511051         * The name has already been unlinked by vfs_lookup_internal().
    10521052         * We have to get and put the VFS node to ensure that it is
    1053          * VFS_DESTROY'ed after the last reference to it is dropped.
     1053         * VFS_OUT_DESTROY'ed after the last reference to it is dropped.
    10541054         */
    10551055        vfs_node_t *node = vfs_node_get(&lr);
Note: See TracChangeset for help on using the changeset viewer.