#include <asm/div64.h>
#include <linux/seq_file.h>
#include <linux/namei.h>
-#include <asm/uaccess.h>
#else
#include <liblustre.h>
#endif
nr_out = 0;
for (i = 0; i < hur_in->hur_request.hr_itemcount; i++) {
curr_tgt = lmv_find_target(lmv,
- &hur_in->hur_user_item[i].hui_fid);
+ &hur_in->hur_user_item[i].hui_fid);
if (obd_uuid_equals(&curr_tgt->ltd_uuid, &tgt_mds->ltd_uuid)) {
hur_out->hur_user_item[nr_out] =
- hur_in->hur_user_item[i];
+ hur_in->hur_user_item[i];
nr_out++;
}
}
if (err) {
if (lmv->tgts[i]->ltd_active) {
/* permanent error */
- CERROR("error: iocontrol MDC %s on MDT"
- "idx %d cmd %x: err = %d\n",
- lmv->tgts[i]->ltd_uuid.uuid,
- i, cmd, err);
+ CERROR("%s: iocontrol MDC %s on MDT"
+ " idx %d cmd %x: err = %d\n",
+ class_exp2obd(lmv->exp)->obd_name,
+ lmv->tgts[i]->ltd_uuid.uuid,
+ i, cmd, err);
rc = err;
lk->lk_flags |= LK_FLG_STOP;
/* unregister from previous MDS */
for (j = 0; j < i; j++)
obd_iocontrol(cmd,
- lmv->tgts[j]->ltd_exp,
- len, lk, uarg);
+ lmv->tgts[j]->ltd_exp,
+ len, lk, uarg);
RETURN(rc);
}
/* else: transient error.
/* copy UUID */
if (copy_to_user(data->ioc_pbuf2, obd2cli_tgt(mdc_obd),
- min((int) data->ioc_plen2,
- (int) sizeof(struct obd_uuid))))
+ min((int) data->ioc_plen2,
+ (int) sizeof(struct obd_uuid))))
RETURN(-EFAULT);
rc = obd_statfs(NULL, lmv->tgts[index]->ltd_exp, &stat_buf,
if (rc)
RETURN(rc);
if (copy_to_user(data->ioc_pbuf1, &stat_buf,
- min((int) data->ioc_plen1,
- (int) sizeof(stat_buf))))
+ min((int) data->ioc_plen1,
+ (int) sizeof(stat_buf))))
RETURN(-EFAULT);
break;
}
tgt = lmv_find_target(lmv, &op_data->op_fid1);
if (IS_ERR(tgt))
- RETURN(PTR_ERR(tgt));
+ RETURN(PTR_ERR(tgt));
if (tgt->ltd_exp == NULL)
- RETURN(-EINVAL);
+ RETURN(-EINVAL);
rc = obd_iocontrol(cmd, tgt->ltd_exp, len, karg, uarg);
break;
/* build a request with fids for this MDS */
reqlen = offsetof(typeof(*hur),
hur_user_item[nr])
- + hur->hur_request.hr_data_len;
+ + hur->hur_request.hr_data_len;
OBD_ALLOC_LARGE(req, reqlen);
if (req == NULL)
RETURN(-ENOMEM);
} else if (err) {
if (lmv->tgts[i]->ltd_active) {
CERROR("error: iocontrol MDC %s on MDT"
- "idx %d cmd %x: err = %d\n",
- lmv->tgts[i]->ltd_uuid.uuid,
- i, cmd, err);
+ " idx %d cmd %x: err = %d\n",
+ lmv->tgts[i]->ltd_uuid.uuid,
+ i, cmd, err);
if (!rc)
rc = err;
}
lprocfs_obd_setup(obd, lvars.obd_vars);
#ifdef LPROCFS
- {
- rc = lprocfs_seq_create(obd->obd_proc_entry, "target_obd",
- 0444, &lmv_proc_target_fops, obd);
- if (rc)
- CWARN("%s: error adding LMV target_obd file: rc = %d\n",
- obd->obd_name, rc);
- }
+ {
+ rc = lprocfs_seq_create(obd->obd_proc_entry, "target_obd",
+ 0444, &lmv_proc_target_fops, obd);
+ if (rc)
+ CWARN("%s: error adding LMV target_obd file: rc = %d\n",
+ obd->obd_name, rc);
+ }
#endif
rc = fld_client_init(&lmv->lmv_fld, obd->obd_name,
LUSTRE_CLI_FLD_HASH_DHT);