Changeset 4198f9c3 in mainline for uspace/srv/vfs/vfs_ops.c


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.