From 45a71c0548b6fd2c757aa2e7b7671a1411948894 Mon Sep 17 00:00:00 2001 From: Gluster Ant Date: Wed, 12 Sep 2018 17:22:48 +0530 Subject: Land clang-format changes Change-Id: I6f5d8140a06f3c1b2d196849299f8d483028d33b --- xlators/features/compress/src/cdc.h | 74 +++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 41 deletions(-) (limited to 'xlators/features/compress/src/cdc.h') diff --git a/xlators/features/compress/src/cdc.h b/xlators/features/compress/src/cdc.h index 71f4d2317bb..764f2028c75 100644 --- a/xlators/features/compress/src/cdc.h +++ b/xlators/features/compress/src/cdc.h @@ -22,34 +22,34 @@ #endif typedef struct cdc_priv { - int window_size; - int mem_level; - int cdc_level; - int min_file_size; - int op_mode; - gf_boolean_t debug; - gf_lock_t lock; + int window_size; + int mem_level; + int cdc_level; + int min_file_size; + int op_mode; + gf_boolean_t debug; + gf_lock_t lock; } cdc_priv_t; typedef struct cdc_info { - /* input bits */ - int count; - int32_t ibytes; - struct iovec *vector; - struct iatt *buf; - - /* output bits */ - int ncount; - int nbytes; - int buffer_size; - struct iovec vec[MAX_IOVEC]; - struct iobref *iobref; - - /* zlib bits */ + /* input bits */ + int count; + int32_t ibytes; + struct iovec *vector; + struct iatt *buf; + + /* output bits */ + int ncount; + int nbytes; + int buffer_size; + struct iovec vec[MAX_IOVEC]; + struct iobref *iobref; + + /* zlib bits */ #ifdef HAVE_LIB_Z - z_stream stream; + z_stream stream; #endif - unsigned long crc; + unsigned long crc; } cdc_info_t; #define NVEC(ci) (ci->ncount - 1) @@ -57,8 +57,8 @@ typedef struct cdc_info { #define THIS_VEC(ci, i) ci->vector[i] /* Gzip defaults */ -#define GF_CDC_DEF_WINDOWSIZE -15 /* default value */ -#define GF_CDC_MAX_WINDOWSIZE -8 /* max value */ +#define GF_CDC_DEF_WINDOWSIZE -15 /* default value */ +#define GF_CDC_MAX_WINDOWSIZE -8 /* max value */ #ifdef HAVE_LIB_Z #define GF_CDC_DEF_COMPRESSION Z_DEFAULT_COMPRESSION @@ -66,15 +66,15 @@ typedef struct cdc_info { #define GF_CDC_DEF_COMPRESSION -1 #endif -#define GF_CDC_DEF_MEMLEVEL 8 -#define GF_CDC_DEF_BUFFERSIZE 262144 // 256K - default compression buffer size +#define GF_CDC_DEF_MEMLEVEL 8 +#define GF_CDC_DEF_BUFFERSIZE 262144 // 256K - default compression buffer size /* Operation mode * If xlator is loaded on client, readv decompresses and writev compresses * If xlator is loaded on server, readv compresses and writev decompresses */ -#define GF_CDC_MODE_CLIENT 0 -#define GF_CDC_MODE_SERVER 1 +#define GF_CDC_MODE_CLIENT 0 +#define GF_CDC_MODE_SERVER 1 /* min size of data to do cmpression * 0 == compress even 1byte @@ -87,21 +87,13 @@ typedef struct cdc_info { #define GF_CDC_DEFLATE_CANARY_VAL "deflate" #define GF_CDC_DEBUG_DUMP_FILE "/tmp/cdcdump.gz" -#define GF_CDC_MODE_IS_CLIENT(m) \ - (strcmp (m, "client") == 0) +#define GF_CDC_MODE_IS_CLIENT(m) (strcmp(m, "client") == 0) -#define GF_CDC_MODE_IS_SERVER(m) \ - (strcmp (m, "server") == 0) +#define GF_CDC_MODE_IS_SERVER(m) (strcmp(m, "server") == 0) int32_t -cdc_compress (xlator_t *this, - cdc_priv_t *priv, - cdc_info_t *ci, - dict_t **xdata); +cdc_compress(xlator_t *this, cdc_priv_t *priv, cdc_info_t *ci, dict_t **xdata); int32_t -cdc_decompress (xlator_t *this, - cdc_priv_t *priv, - cdc_info_t *ci, - dict_t *xdata); +cdc_decompress(xlator_t *this, cdc_priv_t *priv, cdc_info_t *ci, dict_t *xdata); #endif -- cgit