X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdt%2Fmdt_lproc.c;h=8cdae124500becb5c1748e3b7f2b36b2a8a670d3;hp=4844c7fb17b00857cc09c7a7e18d4c2bad315ab8;hb=8daba6a7381a2fb8cc933f7e9486f60e659465d4;hpb=7fe7c11c128ab65e2489a48552d00cefba0a1ac5 diff --git a/lustre/mdt/mdt_lproc.c b/lustre/mdt/mdt_lproc.c index 4844c7f..8cdae12 100644 --- a/lustre/mdt/mdt_lproc.c +++ b/lustre/mdt/mdt_lproc.c @@ -693,68 +693,6 @@ mdt_nosquash_nids_seq_write(struct file *file, const char __user *buffer, } LPROC_SEQ_FOPS(mdt_nosquash_nids); -static int mdt_som_seq_show(struct seq_file *m, void *data) -{ - struct obd_device *obd = m->private; - struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev); - - return seq_printf(m, "%sabled\n", - mdt->mdt_som_conf ? "en" : "dis"); -} - -static ssize_t -mdt_som_seq_write(struct file *file, const char __user *buffer, - size_t count, loff_t *off) -{ - struct seq_file *m = file->private_data; - struct obd_device *obd = m->private; - struct mdt_device *mdt = mdt_dev(obd->obd_lu_dev); - struct obd_export *exp; - char kernbuf[16]; - unsigned long val = 0; - - if (count > (sizeof(kernbuf) - 1)) - return -EINVAL; - - if (copy_from_user(kernbuf, buffer, count)) - return -EFAULT; - - kernbuf[count] = '\0'; - - if (!strcmp(kernbuf, "enabled")) - val = 1; - else if (strcmp(kernbuf, "disabled")) - return -EINVAL; - - if (mdt->mdt_som_conf == val) - return count; - - if (!obd->obd_process_conf) { - CERROR("Temporary SOM change is not supported, use lctl " - "conf_param for permanent setting\n"); - return count; - } - - /* 1 stands for self export. */ - list_for_each_entry(exp, &obd->obd_exports, exp_obd_chain) { - if (exp == obd->obd_self_export) - continue; - if (exp_connect_flags(exp) & OBD_CONNECT_MDS_MDS) - continue; - /* Some clients are already connected, skip the change */ - LCONSOLE_INFO("%s is already connected, SOM will be %s on " - "the next mount\n", exp->exp_client_uuid.uuid, - val ? "enabled" : "disabled"); - return count; - } - - mdt->mdt_som_conf = val; - LCONSOLE_INFO("Enabling SOM\n"); - - return count; -} -LPROC_SEQ_FOPS(mdt_som); - static int mdt_enable_remote_dir_seq_show(struct seq_file *m, void *data) { struct obd_device *obd = m->private; @@ -864,8 +802,6 @@ static struct lprocfs_vars lprocfs_mdt_obd_vars[] = { .fops = &mdt_root_squash_fops }, { .name = "nosquash_nids", .fops = &mdt_nosquash_nids_fops }, - { .name = "som", - .fops = &mdt_som_fops }, { .name = "instance", .fops = &mdt_target_instance_fops }, { .name = "ir_factor",