aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/include
diff options
context:
space:
mode:
authorTristan Lelong <tristan@lelong.xyz>2014-12-06 16:00:30 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-17 15:29:31 -0800
commit376048962321f630b523d5f1421f5c9cfa051cd0 (patch)
treecafdd0e07f33ad2bf7955d26da0865518b4e5479 /drivers/staging/lustre/lustre/include
parentstaging: lustre: fix sparse warning on LPROC_SEQ_FOPS macros (diff)
downloadlinux-dev-376048962321f630b523d5f1421f5c9cfa051cd0.tar.xz
linux-dev-376048962321f630b523d5f1421f5c9cfa051cd0.zip
staging: lustre: replace static value with define
This patch replace the value '80' used in several files in the lustre source code with a define LUSTRE_MDT_MAXNAMELEN. This value is used in 4 different structures as the maximum len for a service name. According to the comments, these names follow a convention which make it possible to use the same define for LCS, LSS, LCF, and LSF. Signed-off-by: Tristan Lelong <tristan@lelong.xyz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/include')
-rw-r--r--drivers/staging/lustre/lustre/include/lustre/lustre_idl.h5
-rw-r--r--drivers/staging/lustre/lustre/include/lustre_fid.h4
-rw-r--r--drivers/staging/lustre/lustre/include/lustre_fld.h4
3 files changed, 9 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index 7b7457cf70e3..305ecbee9b78 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -105,6 +105,11 @@
* FOO_BULK_PORTAL is for incoming bulk on the FOO
*/
+/* Lustre service names are following the format
+ * service name + MDT + seq name
+ */
+#define LUSTRE_MDT_MAXNAMELEN 80
+
#define CONNMGR_REQUEST_PORTAL 1
#define CONNMGR_REPLY_PORTAL 2
//#define OSC_REQUEST_PORTAL 3
diff --git a/drivers/staging/lustre/lustre/include/lustre_fid.h b/drivers/staging/lustre/lustre/include/lustre_fid.h
index 2d6fbb4b1b39..0a0929fd9023 100644
--- a/drivers/staging/lustre/lustre/include/lustre_fid.h
+++ b/drivers/staging/lustre/lustre/include/lustre_fid.h
@@ -358,7 +358,7 @@ struct lu_client_seq {
* Service uuid, passed from MDT + seq name to form unique seq name to
* use it with procfs.
*/
- char lcs_name[80];
+ char lcs_name[LUSTRE_MDT_MAXNAMELEN];
/*
* Sequence width, that is how many objects may be allocated in one
@@ -408,7 +408,7 @@ struct lu_server_seq {
* Service uuid, passed from MDT + seq name to form unique seq name to
* use it with procfs.
*/
- char lss_name[80];
+ char lss_name[LUSTRE_MDT_MAXNAMELEN];
/*
* Allocation chunks for super and meta sequences. Default values are
diff --git a/drivers/staging/lustre/lustre/include/lustre_fld.h b/drivers/staging/lustre/lustre/include/lustre_fld.h
index 64c504849a22..5ee4b1ed0995 100644
--- a/drivers/staging/lustre/lustre/include/lustre_fld.h
+++ b/drivers/staging/lustre/lustre/include/lustre_fld.h
@@ -93,7 +93,7 @@ struct lu_server_fld {
/**
* Fld service name in form "fld-srv-lustre-MDTXXX" */
- char lsf_name[80];
+ char lsf_name[LUSTRE_MDT_MAXNAMELEN];
};
@@ -124,7 +124,7 @@ struct lu_client_fld {
/**
* Client fld proc entry name. */
- char lcf_name[80];
+ char lcf_name[LUSTRE_MDT_MAXNAMELEN];
int lcf_flags;
};