mirror of
https://github.com/torvalds/linux
synced 2024-10-02 01:10:22 +00:00
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>
This commit is contained in:
parent
e84962e3af
commit
3760489623
|
@ -111,7 +111,7 @@ struct fld_cache {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cache name used for debug and messages. */
|
* Cache name used for debug and messages. */
|
||||||
char fci_name[80];
|
char fci_name[LUSTRE_MDT_MAXNAMELEN];
|
||||||
unsigned int fci_no_shrink:1;
|
unsigned int fci_no_shrink:1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,11 @@
|
||||||
* FOO_BULK_PORTAL is for incoming bulk on the FOO
|
* 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_REQUEST_PORTAL 1
|
||||||
#define CONNMGR_REPLY_PORTAL 2
|
#define CONNMGR_REPLY_PORTAL 2
|
||||||
//#define OSC_REQUEST_PORTAL 3
|
//#define OSC_REQUEST_PORTAL 3
|
||||||
|
|
|
@ -358,7 +358,7 @@ struct lu_client_seq {
|
||||||
* Service uuid, passed from MDT + seq name to form unique seq name to
|
* Service uuid, passed from MDT + seq name to form unique seq name to
|
||||||
* use it with procfs.
|
* 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
|
* 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
|
* Service uuid, passed from MDT + seq name to form unique seq name to
|
||||||
* use it with procfs.
|
* use it with procfs.
|
||||||
*/
|
*/
|
||||||
char lss_name[80];
|
char lss_name[LUSTRE_MDT_MAXNAMELEN];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allocation chunks for super and meta sequences. Default values are
|
* Allocation chunks for super and meta sequences. Default values are
|
||||||
|
|
|
@ -93,7 +93,7 @@ struct lu_server_fld {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fld service name in form "fld-srv-lustre-MDTXXX" */
|
* 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. */
|
* Client fld proc entry name. */
|
||||||
char lcf_name[80];
|
char lcf_name[LUSTRE_MDT_MAXNAMELEN];
|
||||||
|
|
||||||
int lcf_flags;
|
int lcf_flags;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue