+ case LL_IOC_GETOBDCOUNT: {
+ int count;
+
+ if (copy_from_user(&count, (int *)arg, sizeof(int)))
+ RETURN(-EFAULT);
+
+ if (!count) {
+ /* get ost count */
+ struct lov_obd *lov = &sbi->ll_dt_exp->exp_obd->u.lov;
+ count = lov->desc.ld_tgt_count;
+ } else {
+ /* get mdt count */
+ struct lmv_obd *lmv = &sbi->ll_md_exp->exp_obd->u.lmv;
+ count = lmv->desc.ld_tgt_count;
+ }
+
+ if (copy_to_user((int *)arg, &count, sizeof(int)))
+ RETURN(-EFAULT);
+
+ RETURN(0);
+ }
+ case LL_IOC_PATH2FID:
+ if (copy_to_user((void *)arg, &ll_i2info(inode)->lli_fid,
+ sizeof(struct lu_fid)))
+ RETURN(-EFAULT);
+ RETURN(0);
+ case OBD_IOC_CHANGELOG_CLEAR: {
+ struct ioc_changelog_clear *icc;
+ int rc;
+
+ OBD_ALLOC_PTR(icc);
+ if (icc == NULL)
+ RETURN(-ENOMEM);
+ if (copy_from_user(icc, (void *)arg, sizeof(*icc)))
+ GOTO(icc_free, rc = -EFAULT);
+
+ rc = obd_iocontrol(cmd, sbi->ll_md_exp, sizeof(*icc), icc,NULL);
+
+icc_free:
+ OBD_FREE_PTR(icc);
+ RETURN(rc);
+ }
+ case OBD_IOC_FID2PATH:
+ RETURN(ll_fid2path(ll_i2mdexp(inode), (void *)arg));
+