Whamcloud - gitweb
* placeholder commit
[fs/lustre-release.git] / lustre / liblustre / super.c
index 57d6389..9972f1a 100644 (file)
@@ -55,7 +55,7 @@ static void llu_fsop_gone(struct filesys *fs)
         ENTRY;
 
         list_del(&sbi->ll_conn_chain);
-        obd_disconnect(sbi->ll_osc_exp, 0);
+        obd_disconnect(sbi->ll_osc_exp);
 
         /* NULL request to force sync on the MDS, and get the last_committed
          * value to flush remaining RPCs from the sending queue on client.
@@ -66,7 +66,7 @@ static void llu_fsop_gone(struct filesys *fs)
         if (!obd->obd_no_recov)
                 mdc_getstatus(sbi->ll_mdc_exp, &rootfid);
 
-        obd_disconnect(sbi->ll_mdc_exp, 0);
+        obd_disconnect(sbi->ll_mdc_exp);
 
         OBD_FREE(sbi, sizeof(*sbi));
 
@@ -276,23 +276,6 @@ int llu_inode_getattr(struct inode *inode, struct lov_stripe_md *lsm)
         refresh_valid = OBD_MD_FLBLOCKS | OBD_MD_FLBLKSZ | OBD_MD_FLMTIME | 
                         OBD_MD_FLCTIME | OBD_MD_FLSIZE;
 
-        /* We set this flag in commit write as we extend the file size.  When
-         * the bit is set and the lock is canceled that covers the file size,
-         * we clear the bit.  This is enough to protect the window where our
-         * local size extension is needed for writeback.  However, it relies on
-         * behaviour that won't be true in the near future.  This assumes that
-         * all getattr callers get extent locks, which they currnetly do.  It
-         * also assumes that we only send discarding asts for {0,eof} truncates
-         * as is currently the case.  This will have to be replaced by the
-         * proper eoc communication between clients and the ost, which is on
-         * its way. */
-        if (test_bit(LLI_F_PREFER_EXTENDED_SIZE, &lli->lli_flags)) {
-                if (oa.o_size < lli->lli_st_size)
-                        refresh_valid &= ~OBD_MD_FLSIZE;
-                else 
-                        clear_bit(LLI_F_PREFER_EXTENDED_SIZE, &lli->lli_flags);
-        }
-
         obdo_refresh_inode(inode, &oa, refresh_valid);
 
         RETURN(0);
@@ -493,11 +476,11 @@ static int llu_iop_getattr(struct pnode *pno,
 
 static int null_if_equal(struct ldlm_lock *lock, void *data)
 {
-        if (data == lock->l_ast_data)
+        if (data == lock->l_ast_data) {
                 lock->l_ast_data = NULL;
 
-        if (lock->l_req_mode != lock->l_granted_mode)
-                return LDLM_ITER_STOP;
+                if (lock->l_req_mode != lock->l_granted_mode)
+                        LDLM_ERROR(lock,"clearing inode with ungranted lock\n");        }
 
         return LDLM_ITER_CONTINUE;
 }
@@ -1362,11 +1345,8 @@ llu_fsswop_mount(const char *source,
                 GOTO(out_free, err = -EINVAL);
         }
 
-        if (mdc_init_ea_size(obd, osc))
-                GOTO(out_free, err = -EINVAL);
-
         /* setup mdc */
-        err = obd_connect(&mdc_conn, obd, &sbi->ll_sb_uuid);
+        err = obd_connect(&mdc_conn, obd, &sbi->ll_sb_uuid, NULL /* ocd */);
         if (err) {
                 CERROR("cannot connect to %s: rc = %d\n", mdc, err);
                 GOTO(out_free, err);
@@ -1388,13 +1368,15 @@ llu_fsswop_mount(const char *source,
                 GOTO(out_mdc, err = -EINVAL);
         }
 
-        err = obd_connect(&osc_conn, obd, &sbi->ll_sb_uuid);
+        err = obd_connect(&osc_conn, obd, &sbi->ll_sb_uuid, NULL /* ocd */);
         if (err) {
                 CERROR("cannot connect to %s: rc = %d\n", osc, err);
                 GOTO(out_mdc, err);
         }
         sbi->ll_osc_exp = class_conn2export(&osc_conn);
 
+        mdc_init_ea_size(sbi->ll_mdc_exp, sbi->ll_osc_exp);
+
         err = mdc_getstatus(sbi->ll_mdc_exp, &rootfid);
         if (err) {
                 CERROR("cannot mds_connect: rc = %d\n", err);
@@ -1451,9 +1433,9 @@ out_inode:
 out_request:
         ptlrpc_req_finished(request);
 out_osc:
-        obd_disconnect(sbi->ll_osc_exp, 0);
+        obd_disconnect(sbi->ll_osc_exp);
 out_mdc:
-        obd_disconnect(sbi->ll_mdc_exp, 0);
+        obd_disconnect(sbi->ll_mdc_exp);
 out_free:
         OBD_FREE(sbi, sizeof(*sbi));
         return err;