X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ffid%2Flproc_fid.c;h=3670ee49e46bd888a7832dbdb3d666fce2f0d7b0;hb=468c7759dd73594065dc029eeb73c514d589db3a;hp=664bc94ef47b56e11e1379afd539d149d8a7b1a5;hpb=08aa217ce49aba1ded52e0f7adb8a607035123fd;p=fs%2Flustre-release.git diff --git a/lustre/fid/lproc_fid.c b/lustre/fid/lproc_fid.c index 664bc94..3670ee4 100644 --- a/lustre/fid/lproc_fid.c +++ b/lustre/fid/lproc_fid.c @@ -262,6 +262,7 @@ seq_client_proc_write_width(struct file *file, const char *buffer, unsigned long count, void *data) { struct lu_client_seq *seq = (struct lu_client_seq *)data; + __u64 max; int rc, val; ENTRY; @@ -275,14 +276,19 @@ seq_client_proc_write_width(struct file *file, const char *buffer, RETURN(rc); } - if (val <= LUSTRE_SEQ_MAX_WIDTH && val > 0) { - seq->lcs_width = val; + if (seq->lcs_type == LUSTRE_SEQ_DATA) + max = LUSTRE_DATA_SEQ_MAX_WIDTH; + else + max = LUSTRE_METADATA_SEQ_MAX_WIDTH; - if (rc == 0) { - CDEBUG(D_INFO, "%s: Sequence size: "LPU64"\n", - seq->lcs_name, seq->lcs_width); - } - } + if (val <= max && val > 0) { + seq->lcs_width = val; + + if (rc == 0) { + CDEBUG(D_INFO, "%s: Sequence size: "LPU64"\n", + seq->lcs_name, seq->lcs_width); + } + } mutex_unlock(&seq->lcs_mutex);