#include "mdt_internal.h"
#include <lustre_quota.h>
#include <lustre_acl.h>
+#include <lustre_nodemap.h>
#include <uapi/linux/lustre/lustre_param.h>
struct mds_device {
return rc != 0 ? 1 : 0;
}
+/* ioctls on obd dev */
+static int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
+ void *karg, void __user *uarg)
+{
+ struct obd_device *obd = exp->exp_obd;
+ struct obd_ioctl_data *data;
+ int rc = 0;
+
+ ENTRY;
+ CDEBUG(D_IOCTL, "%s: cmd=%x len=%u karg=%pK uarg=%pK\n",
+ obd->obd_name, cmd, len, karg, uarg);
+
+ data = karg;
+ /* we only support nodemap ioctls, for now */
+ if (cmd != OBD_IOC_NODEMAP)
+ GOTO(out, rc = -EINVAL);
+
+ rc = server_iocontrol_nodemap(obd, data, true);
+ if (rc)
+ GOTO(out, rc);
+
+out:
+ RETURN(rc);
+}
+
static const struct obd_ops mds_obd_device_ops = {
.o_owner = THIS_MODULE,
.o_health_check = mds_health_check,
+ .o_iocontrol = mds_iocontrol,
};
int mds_mod_init(void)