Whamcloud - gitweb
* removed struct obd_brw_set from non-async obd_brw()
authoreeb <eeb>
Fri, 25 Apr 2003 10:54:28 +0000 (10:54 +0000)
committereeb <eeb>
Fri, 25 Apr 2003 10:54:28 +0000 (10:54 +0000)
*   struct ptlrpc_request::rq_lock is a new IRQ spinlock to serialise request
    flag updates by the I/O thread and network callbacks.

*   Added some #warnings: I/O thread v. recovery thread concurrency may need
    to be reviewed.

*   The rq_replied flag is now set by the network when the reply is
    received.  ptlrpc_check_reply() is now a pure predicate (i.e. no side
    effects).

*   struct ptlrpc_request has a new 'phase' member to show what state the
    request is in {new, doing the rpc, interpreting the reply, complete}.

*   Client-side RPC aborts should use ptlrpc_unregister_reply().  This
    should only be called in thread context.  When it return, it's safe to
    retry.

*   Server-side RPC aborts should use ptlrpc_abort_reply().

*   All of the bulk per-desc and per-page callbacks have been removed.

*   Client-side bulk descriptors are owned by the struct pltrpc_request.
    When the descriptor has been initialised (including setting either its
    bd_get_source or its bd_put_sink flags), point the request at it.
    ptlrpc_queue_wait() / ptlrpc_set_wait() take care of registering and
    unregistering the memory described by the descriptor, and it is freed
    when the request is freed.

*   Server side bulk descriptors are owned by the handler that creates them.
    Completion is flagged by ptlrpc_bulk_complete(), but if you get bored,
    ptlrpc_abort_bulk() synchronously prizes it away from the network so
    the caller can ptlrpc_free_bulk().

*   Removed struct pltrpc_request_set refcounts.  A spinlock
    guarantees network callback completion before the waiting thread can
    nuke the struct.

*   Ensured asynch replies are swabbed, just like synch ones.

*   tagged eeb_eeb_backoff_tag just prior to checkin

lustre/liblustre/rw.c

index da692b2..b9707de 100644 (file)
@@ -116,15 +116,10 @@ static int llu_brw(int cmd, struct inode *inode, struct page *page, int flags)
 {
         struct llu_inode_info *lli = llu_i2info(inode);
         struct lov_stripe_md *lsm = lli->lli_smd;
-        struct obd_brw_set *set;
         struct brw_page pg;
         int rc;
         ENTRY;
 
-        set = obd_brw_set_new();
-        if (set == NULL)
-                RETURN(-ENOMEM);
-
         pg.pg = page;
         pg.off = ((obd_off)page->index) << PAGE_SHIFT;
 
@@ -145,17 +140,10 @@ static int llu_brw(int cmd, struct inode *inode, struct page *page, int flags)
 
         pg.flag = flags;
 
-        set->brw_callback = ll_brw_sync_wait;
         rc = obd_brw(cmd, llu_i2obdconn(inode), lsm, 1, &pg, set, NULL);
         if (rc) {
-                if (rc != -EIO)
-                        CERROR("error from obd_brw: rc = %d\n", rc);
-        } else {
-                rc = ll_brw_sync_wait(set, CB_PHASE_START);
-                if (rc)
-                        CERROR("error from callback: rc = %d\n", rc);
+                CERROR("error from obd_brw: rc = %d\n", rc);
         }
-        obd_brw_set_decref(set);
 
         RETURN(rc);
 }