X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ffid%2Flproc_fid.c;h=3670ee49e46bd888a7832dbdb3d666fce2f0d7b0;hp=fd66e19b74759cbcd5ea28860f2a240fe39fb160;hb=f4ea7b630b8adc9856ee67c6d16549f36e14efd1;hpb=9fb46705ae86aa2c0ac29427f0ff24f923560eb7 diff --git a/lustre/fid/lproc_fid.c b/lustre/fid/lproc_fid.c index fd66e19..3670ee4 100644 --- a/lustre/fid/lproc_fid.c +++ b/lustre/fid/lproc_fid.c @@ -27,14 +27,12 @@ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, Whamcloud, Inc. + * Copyright (c) 2011, 2012, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ * Lustre is a trademark of Sun Microsystems, Inc. * - * Copyright (c) 2011, 2012, Whamcloud, Inc. - * * lustre/fid/lproc_fid.c * * Lustre Sequence Manager @@ -264,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; @@ -277,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);