+ * Show if the OFD is in no precreate mode.
+ *
+ * This means OFD has been adminstratively disabled at the OST to prevent
+ * the MDS from creating any new files on the OST, though existing files
+ * can still be read, written, and unlinked.
+ *
+ * \retval number of bytes written
+ */
+static ssize_t no_precreate_show(struct kobject *kobj, struct attribute *attr,
+ char *buf)
+{
+ struct obd_device *obd = container_of(kobj, struct obd_device,
+ obd_kset.kobj);
+ struct ofd_device *ofd = ofd_dev(obd->obd_lu_dev);
+
+ return snprintf(buf, PAGE_SIZE, "%u\n", ofd->ofd_no_precreate);
+}
+
+/**
+ * Set OFD to no precreate mode.
+ *
+ * This is used to interface to userspace administrative tools to
+ * disable new object creation on the OST.
+ *
+ * \param[in] count \a buffer length
+ *
+ * \retval \a count on success
+ * \retval negative number on error
+ */
+static ssize_t no_precreate_store(struct kobject *kobj, struct attribute *attr,
+ const char *buffer, size_t count)
+{
+ struct obd_device *obd = container_of(kobj, struct obd_device,
+ obd_kset.kobj);
+ struct ofd_device *ofd = ofd_dev(obd->obd_lu_dev);
+ bool val;
+ int rc;
+
+ rc = kstrtobool(buffer, &val);
+ if (rc)
+ return rc;
+
+ spin_lock(&ofd->ofd_flags_lock);
+ ofd->ofd_no_precreate = val;
+ spin_unlock(&ofd->ofd_flags_lock);
+
+ return count;
+}
+LUSTRE_RW_ATTR(no_precreate);
+
+/**