Changeset 5b890cfd in mainline


Ignore:
Timestamp:
2007-09-29T18:11:48Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dab65b9
Parents:
d7b5cf2
Message:

VFS work.
Start VFS_OPEN.

Location:
uspace/srv/vfs
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/Makefile

    rd7b5cf2 r5b890cfd  
    4545        vfs_register.c \
    4646        vfs_lookup.c \
    47         vfs_mount.c
     47        vfs_mount.c \
     48        vfs_open.c
    4849
    4950OBJECTS := $(addsuffix .o,$(basename $(SOURCES)))
  • uspace/srv/vfs/vfs.c

    rd7b5cf2 r5b890cfd  
    5757
    5858        /*
     59         * Initialize the table of open files.
     60         */
     61        if (!vfs_conn_open_files_init()) {
     62                ipc_answer_fast(iid, ENOMEM, 0, 0);
     63                return;
     64        }
     65
     66        /*
    5967         * The connection was opened via the IPC_CONNECT_ME_TO call.
    6068         * This call needs to be answered.
     
    6573         * Here we enter the main connection fibril loop.
    6674         * The logic behind this loop and the protocol is that we'd like to keep
    67          * each connection open for a while before we close it. The benefit of
    68          * this is that the client doesn't have to establish a new connection
    69          * upon each request.  On the other hand, the client must be ready to
    70          * re-establish a connection if we hang it up due to reaching of maximum
    71          * number of requests per connection or due to the client timing out.
     75         * each connection open until the client hangs up. When the client hangs
     76         * up, we will free its VFS state. The act of hanging up the connection
     77         * by the client is equivalent to client termination because we cannot
     78         * distinguish one from the other. On the other hand, the client can
     79         * hang up arbitrarily if it has no open files and reestablish the
     80         * connection later.
    7281         */
    73          
    7482        while (keep_on_going) {
    7583                ipc_callid_t callid;
     
    8694                case VFS_REGISTER:
    8795                        vfs_register(callid, &call);
    88                         keep_on_going = false;
    8996                        break;
    9097                case VFS_MOUNT:
  • uspace/srv/vfs/vfs.h

    rd7b5cf2 r5b890cfd  
    153153extern int vfs_lookup_internal(char *, size_t, vfs_node_t *, vfs_node_t *);
    154154
     155#define MAX_OPEN_FILES  128     
     156
     157extern bool vfs_conn_open_files_init(void);
     158
    155159extern void vfs_register(ipc_callid_t, ipc_call_t *);
    156160extern void vfs_mount(ipc_callid_t, ipc_call_t *);
     161extern void vfs_open(ipc_callid_t, ipc_call_t *);
    157162
    158163#endif
Note: See TracChangeset for help on using the changeset viewer.