diff options
author | Gluster Ant <bugzilla-bot@gluster.org> | 2018-09-12 17:22:48 +0530 |
---|---|---|
committer | Nigel Babu <nigelb@redhat.com> | 2018-09-12 17:22:48 +0530 |
commit | 45a71c0548b6fd2c757aa2e7b7671a1411948894 (patch) | |
tree | 2a5a9b73bae47ab53a41166fd041a06612587f48 /xlators/features/compress | |
parent | be77dbbda692792335a8e9e7c02e0c281f003c40 (diff) |
Land clang-format changes
Change-Id: I6f5d8140a06f3c1b2d196849299f8d483028d33b
Diffstat (limited to 'xlators/features/compress')
-rw-r--r-- | xlators/features/compress/src/cdc-mem-types.h | 8 | ||||
-rw-r--r-- | xlators/features/compress/src/cdc.h | 74 |
2 files changed, 37 insertions, 45 deletions
diff --git a/xlators/features/compress/src/cdc-mem-types.h b/xlators/features/compress/src/cdc-mem-types.h index ead2c70ba6e..56a5a05ee8c 100644 --- a/xlators/features/compress/src/cdc-mem-types.h +++ b/xlators/features/compress/src/cdc-mem-types.h @@ -14,10 +14,10 @@ #include "mem-types.h" enum gf_cdc_mem_types { - gf_cdc_mt_priv_t = gf_common_mt_end + 1, - gf_cdc_mt_vec_t = gf_common_mt_end + 2, - gf_cdc_mt_gzip_trailer_t = gf_common_mt_end + 3, - gf_cdc_mt_end = gf_common_mt_end + 4, + gf_cdc_mt_priv_t = gf_common_mt_end + 1, + gf_cdc_mt_vec_t = gf_common_mt_end + 2, + gf_cdc_mt_gzip_trailer_t = gf_common_mt_end + 3, + gf_cdc_mt_end = gf_common_mt_end + 4, }; #endif 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 |