+static int ll_lov_recreate_obj(struct inode *inode, unsigned long arg)
+{
+ struct ll_recreate_obj ucreat;
+ ENTRY;
+
+ if (!cfs_capable(CFS_CAP_SYS_ADMIN))
+ RETURN(-EPERM);
+
+ if (cfs_copy_from_user(&ucreat, (struct ll_recreate_obj *)arg,
+ sizeof(struct ll_recreate_obj)))
+ RETURN(-EFAULT);
+
+ RETURN(ll_lov_recreate(inode, ucreat.lrc_id, 0,
+ ucreat.lrc_ost_idx));
+}
+
+static int ll_lov_recreate_fid(struct inode *inode, unsigned long arg)
+{
+ struct lu_fid fid;
+ obd_id id;
+ obd_count ost_idx;
+ ENTRY;
+
+ if (!cfs_capable(CFS_CAP_SYS_ADMIN))
+ RETURN(-EPERM);
+
+ if (cfs_copy_from_user(&fid, (struct lu_fid *)arg,
+ sizeof(struct lu_fid)))
+ RETURN(-EFAULT);
+
+ id = fid_oid(&fid) | ((fid_seq(&fid) & 0xffff) << 32);
+ ost_idx = (fid_seq(&fid) >> 16) & 0xffff;
+ RETURN(ll_lov_recreate(inode, id, 0, ost_idx));
+}
+