Commit 6238fbd2 authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman

staging: lustre: uapi: style cleanup of lustre_cfg.h

Some style and white space cleanups to make lustre_cfg.h
easy to read.
Signed-off-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6401
Reviewed-on: https://review.whamcloud.com/26966Reviewed-by: default avatarQuentin Bouget <quentin.bouget@cea.fr>
Reviewed-by: default avatarBen Evans <bevans@cray.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ef27faeb
......@@ -63,22 +63,35 @@ enum lcfg_command_type {
LCFG_ATTACH = 0x00cf001, /**< create a new obd instance */
LCFG_DETACH = 0x00cf002, /**< destroy obd instance */
LCFG_SETUP = 0x00cf003, /**< call type-specific setup */
LCFG_CLEANUP = 0x00cf004, /**< call type-specific cleanup */
LCFG_CLEANUP = 0x00cf004, /**< call type-specific cleanup
*/
LCFG_ADD_UUID = 0x00cf005, /**< add a nid to a niduuid */
LCFG_DEL_UUID = 0x00cf006, /**< remove a nid from a niduuid */
LCFG_MOUNTOPT = 0x00cf007, /**< create a profile (mdc, osc) */
LCFG_DEL_UUID = 0x00cf006, /**< remove a nid from
* a niduuid
*/
LCFG_MOUNTOPT = 0x00cf007, /**< create a profile
* (mdc, osc)
*/
LCFG_DEL_MOUNTOPT = 0x00cf008, /**< destroy a profile */
LCFG_SET_TIMEOUT = 0x00cf009, /**< set obd_timeout */
LCFG_SET_UPCALL = 0x00cf00a, /**< deprecated */
LCFG_ADD_CONN = 0x00cf00b, /**< add a failover niduuid to an obd */
LCFG_ADD_CONN = 0x00cf00b, /**< add a failover niduuid to
* an obd
*/
LCFG_DEL_CONN = 0x00cf00c, /**< remove a failover niduuid */
LCFG_LOV_ADD_OBD = 0x00cf00d, /**< add an osc to a lov */
LCFG_LOV_DEL_OBD = 0x00cf00e, /**< remove an osc from a lov */
LCFG_PARAM = 0x00cf00f, /**< set a proc parameter */
LCFG_MARKER = 0x00cf010, /**< metadata about next cfg rec */
LCFG_LOG_START = 0x00ce011, /**< mgc only, process a cfg log */
LCFG_MARKER = 0x00cf010, /**< metadata about next
* cfg rec
*/
LCFG_LOG_START = 0x00ce011, /**< mgc only, process a
* cfg log
*/
LCFG_LOG_END = 0x00ce012, /**< stop processing updates */
LCFG_LOV_ADD_INA = 0x00ce013, /**< like LOV_ADD_OBD, inactive */
LCFG_LOV_ADD_INA = 0x00ce013, /**< like LOV_ADD_OBD,
* inactive
*/
LCFG_ADD_MDC = 0x00cf014, /**< add an mdc to a lmv */
LCFG_DEL_MDC = 0x00cf015, /**< remove an mdc from a lmv */
LCFG_SPTLRPC_CONF = 0x00ce016, /**< security */
......@@ -120,17 +133,14 @@ enum cfg_record_type {
};
#define LUSTRE_CFG_BUFLEN(lcfg, idx) \
((lcfg)->lcfg_bufcount <= (idx) \
? 0 \
: (lcfg)->lcfg_buflens[(idx)])
((lcfg)->lcfg_bufcount <= (idx) ? 0 : (lcfg)->lcfg_buflens[(idx)])
static inline void lustre_cfg_bufs_set(struct lustre_cfg_bufs *bufs,
__u32 index,
void *buf,
__u32 buflen)
__u32 index, void *buf, __u32 buflen)
{
if (index >= LUSTRE_CFG_MAX_BUFCOUNT)
return;
if (!bufs)
return;
......@@ -142,13 +152,13 @@ static inline void lustre_cfg_bufs_set(struct lustre_cfg_bufs *bufs,
}
static inline void lustre_cfg_bufs_set_string(struct lustre_cfg_bufs *bufs,
__u32 index,
char *str)
__u32 index, char *str)
{
lustre_cfg_bufs_set(bufs, index, str, str ? strlen(str) + 1 : 0);
}
static inline void lustre_cfg_bufs_reset(struct lustre_cfg_bufs *bufs, char *name)
static inline void lustre_cfg_bufs_reset(struct lustre_cfg_bufs *bufs,
char *name)
{
memset((bufs), 0, sizeof(*bufs));
if (name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment