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.
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));
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);
/* ll_glimpse_size will prefer locally cached writes if they extend
* the file */
- {
- struct ost_lvb lvb;
- ldlm_error_t err;
-
- err = llu_glimpse_size(inode, &lvb);
- lli->lli_st_size = lvb.lvb_size;
- }
- RETURN(0);
+ RETURN(llu_glimpse_size(inode));
}
static void copy_stat_buf(struct inode *ino, struct intnl_stat *b)
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;
}
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);
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);
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;