Skip to content

Commit bcb85fd

Browse files
committed
Run autoformatter
1 parent 0da00a0 commit bcb85fd

5 files changed

Lines changed: 43 additions & 44 deletions

File tree

include/core/jconfiguration.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,14 @@ struct JConfiguration;
4444

4545
typedef struct JConfiguration JConfiguration;
4646

47-
struct JStorageTier {
47+
struct JStorageTier
48+
{
4849
guint64 bandwidth; ///< bandwidth in byte ber second
4950
guint64 latency; ///< latency in ns
5051
guint64 capacity; ///< capacity in byte
5152
};
5253
typedef struct JStorageTier JStorageTier;
5354

54-
55-
5655
/**
5756
* Returns the configuration.
5857
*
@@ -127,7 +126,7 @@ guint64 j_configuration_get_stripe_size(JConfiguration*);
127126
gchar const* j_configuration_get_object_policy_kv_backend(JConfiguration*);
128127
gchar const* j_configuration_get_object_policy_kv_path(JConfiguration*);
129128
gchar const* j_configuration_get_object_policy(JConfiguration*);
130-
gchar const*const* j_configuration_get_object_policy_args(JConfiguration*);
129+
gchar const* const* j_configuration_get_object_policy_args(JConfiguration*);
131130
G_END_DECLS
132131

133132
/**

include/core/jmanagedbackends.h

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,23 @@ typedef struct JBackend JBackend;
5858
* \defgroup JStorageTier
5959
*
6060
* \todo evaluate characteristics
61-
61+
6262
* Collection of characteristics about a storage media, used for distribution
63-
* decisions by the policy.
63+
* decisions by the policy.
6464
*
6565
* \attention all values contained in this may only fixed values
6666
* and as this not measured!
67-
*
67+
*
6868
* @{
6969
**/
7070

7171
struct JStorageTier;
7272
typedef struct JStorageTier JStorageTier;
7373

74-
/**
74+
/**
7575
* get estimated storage tier bandwidth in bytes per second
7676
*
77-
* \param[in] this a storage tier
77+
* \param[in] this a storage tier
7878
*
7979
* \return mean of bandwidth in bytes per second
8080
**/
@@ -104,7 +104,7 @@ struct JManagedBackends;
104104
typedef struct JManagedBackends JManagedBackends;
105105

106106
/**
107-
* Contains data about an ongoing access to a object.
107+
* Contains data about an ongoing access to a object.
108108
**/
109109
struct JManagedBackendScope;
110110
typedef struct JManagedBackendScope JManagedBackendScope;
@@ -146,7 +146,7 @@ typedef struct
146146
* The list is like the strings NULL terminated
147147
* \param[in] backends access to the object backend instances.
148148
**/
149-
gboolean (*init)(gpointer* policy_data, gchar const*const* args, JManagedBackends* backends);
149+
gboolean (*init)(gpointer* policy_data, gchar const* const* args, JManagedBackends* backends);
150150

151151
/**
152152
* \param[in] policy_data data at address assigned in init
@@ -169,7 +169,7 @@ typedef struct
169169
* the object is currently stored on
170170
* \param[in] access type of access performed \sa JObjectBackendAccessType
171171
* \param[in] data corresponding to the access type.
172-
* For more details see \ref JObjectBackendAccessDetails
172+
* For more details see \ref JObjectBackendAccessDetails
173173
**/
174174
gboolean (*process_access)(gpointer policy_data, const gchar* namespace, const gchar* path, guint obj_id, guint tier, JObjectBackendAccessTypes access, gconstpointer data);
175175

@@ -211,7 +211,7 @@ typedef struct
211211
JObjectBackendPolicy* backend_policy_info(void);
212212

213213
/**
214-
* \defgroup JObjectBackendAccessDetails
214+
* \defgroup JObjectBackendAccessDetails
215215
*
216216
* Structs used to pass additional data on a
217217
* JObjectBackendPolicy.process_access call
@@ -244,7 +244,7 @@ gboolean j_backend_managed_fini(JManagedBackends* this);
244244

245245
/**
246246
* Hands current thread to policy as processing resource
247-
* \sa JObjectBackendPolicy
247+
* \sa JObjectBackendPolicy
248248
*
249249
* \param[in] this JManagedBackends instance
250250
* \param[out] keep_running signals if the policy processing function should be called again after return
@@ -283,7 +283,7 @@ gboolean j_backend_managed_object_close(JManagedBackendScope* scope);
283283

284284
/**
285285
* Sends a message to the policy.
286-
* \todo add reply channel
286+
* \todo add reply channel
287287
*
288288
* \param[in] this JManagedBackends instance
289289
* \param[in] type message type encoded as 0-terminated string
@@ -368,7 +368,6 @@ gboolean j_backend_managed_unlock(JManagedBackends* this);
368368
**/
369369
gboolean j_backend_managed_get_all(JManagedBackends* this, gchar const* namespace, gpointer* iterator);
370370

371-
372371
/**
373372
* Iterate all object paths in a namespace with a given prefix
374373
*
@@ -387,7 +386,7 @@ gboolean j_backend_managed_get_by_prefix(JManagedBackends* this, gchar const* na
387386
* \attention Objects added or removed while iterating may invalidates the iterator. This depends on the used kv-store-backend for the JManagedBackends
388387
*
389388
* \param[in] this JManagedBackends instance
390-
* \param[inout] iterator
389+
* \param[inout] iterator
391390
* \param[out] path of next object
392391
*
393392
* \sa j_backend_managed_get_all(), j_backend_managed_get_by_prefix()

lib/core/jbatch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ j_batch_new(JSemantics* semantics)
118118
}
119119

120120
JBatch*
121-
j_batch_new_for_template(JSemanticsTemplate template)
121+
j_batch_new_for_template(JSemanticsTemplate template)
122122
{
123123
J_TRACE_FUNCTION(NULL);
124124

lib/core/jmanagedbackends.c

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
typedef struct
3131
{
3232
gint read_access_count; ///< number of read access
33-
guint generation; ///< generation count, incremented after each write_access
34-
gint write_access; ///< true if a write operation is scheduled or running
33+
guint generation; ///< generation count, incremented after each write_access
34+
gint write_access; ///< true if a write operation is scheduled or running
3535
} RWSpinLock;
3636

3737
/// acquired a read lock
3838
/** \public \memberof RWSpinLock
39-
* \return data gegenartion when clock is acquired
39+
* \return data gegenartion when clock is acquired
4040
* \sa read_unlock */
4141
guint read_lock(RWSpinLock* this);
4242

@@ -47,7 +47,7 @@ void read_unlock(RWSpinLock* this);
4747

4848
/// acquire a write lock
4949
/** \public \memberof RWSpinLock
50-
* this will increase the generation count
50+
* this will increase the generation count
5151
* \return generation before
5252
* \sa write_unlock*/
5353
guint write_lock(RWSpinLock* this);
@@ -275,22 +275,24 @@ write_unlock(RWSpinLock* this)
275275
}
276276

277277
/// proxy function
278-
gchar const*const* j_configuration_get_object_tiers(JConfiguration* config);
279-
gchar const*const* j_configuration_get_object_tiers(JConfiguration* config) {
280-
(void) config;
278+
gchar const* const* j_configuration_get_object_tiers(JConfiguration* config);
279+
gchar const* const*
280+
j_configuration_get_object_tiers(JConfiguration* config)
281+
{
282+
(void)config;
281283
return NULL;
282284
}
283285

284286
gboolean
285287
j_backend_managed_init(JConfiguration* config, JList* object_backends, JManagedBackends** instance_ptr)
286288
{
287289
JListIterator* itr;
288-
gchar const*const* tier_itr;
290+
gchar const* const* tier_itr;
289291
JManagedBackends* this;
290292
struct JBackendWrapper** b_itr;
291293
struct JStorageTier** t_itr;
292294
const gchar* policy_name = j_configuration_get_object_policy(config);
293-
char const*const* policy_args = j_configuration_get_object_policy_args(config);
295+
char const* const* policy_args = j_configuration_get_object_policy_args(config);
294296
JObjectBackendPolicy* (*module_backend_policy_info)(void) = NULL;
295297
JObjectBackendPolicy* tmp_policy;
296298
*instance_ptr = malloc(sizeof(JManagedBackends));
@@ -432,10 +434,10 @@ gboolean j_backend_managed_object_create(JManagedBackends* this, const gchar* na
432434
/// \TODO remove scope return <- just complete virtual
433435
gboolean
434436
j_backend_managed_object_open(JManagedBackends* this,
435-
const gchar* namespace,
436-
const gchar* path,
437-
JBackend** backend,
438-
JManagedBackendScope** scope)
437+
const gchar* namespace,
438+
const gchar* path,
439+
JBackend** backend,
440+
JManagedBackendScope** scope)
439441
{
440442
struct KVEntry* entry;
441443
struct JBackendWrapper* wrapper;
@@ -475,10 +477,10 @@ j_backend_managed_object_open(JManagedBackends* this,
475477

476478
gboolean
477479
j_backend_managed_object_create(JManagedBackends* this,
478-
const gchar* namespace,
479-
const gchar* path,
480-
JBackend** backend,
481-
JManagedBackendScope** scope)
480+
const gchar* namespace,
481+
const gchar* path,
482+
JBackend** backend,
483+
JManagedBackendScope** scope)
482484
{
483485
gboolean ret = FALSE;
484486
struct JBackendWrapper* wrapper;
@@ -543,7 +545,7 @@ j_backend_managed_object_close(JManagedBackendScope* this)
543545

544546
gboolean
545547
j_backend_managed_policy_message(JManagedBackends* this,
546-
const gchar* type, gpointer data, guint length)
548+
const gchar* type, gpointer data, guint length)
547549
{
548550
if (this->policy->process_message)
549551
{
@@ -565,7 +567,7 @@ j_backend_managed_get_tiers(JManagedBackends* this, JStorageTier const* const**
565567

566568
guint
567569
j_backend_managed_get_tier(JManagedBackends* this,
568-
const gchar* namespace, const gchar* path)
570+
const gchar* namespace, const gchar* path)
569571
{
570572
struct KVEntry* entry;
571573
EXE(kv_get(this, namespace, path, &entry),
@@ -631,8 +633,8 @@ kv_rm(JManagedBackends* this, const gchar* namespace, const gchar* key)
631633

632634
gboolean
633635
j_backend_managed_lock(JManagedBackends* this,
634-
JBackend*** backends,
635-
guint* length)
636+
JBackend*** backends,
637+
guint* length)
636638
{
637639
write_lock(&this->global_lock);
638640
if (backends != NULL)
@@ -705,9 +707,9 @@ j_backend_storage_tier_get_capacity(const JStorageTier* this)
705707

706708
gboolean
707709
j_backend_managed_object_migrate(JManagedBackends* this,
708-
const gchar* namespace,
709-
const gchar* path,
710-
guint dest)
710+
const gchar* namespace,
711+
const gchar* path,
712+
guint dest)
711713
{
712714
struct KVEntry* entry;
713715
struct KVEntry new_entry;

tools/config.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ write_config(gchar* path)
110110
servers_kv = string_split(opt_servers_kv);
111111
servers_db = string_split(opt_servers_db);
112112
object_policy_args = string_split(opt_object_policy_args);
113-
114113

115114
key_file = g_key_file_new();
116115
g_key_file_set_int64(key_file, "core", "max-operation-size", opt_max_operation_size);
@@ -133,7 +132,7 @@ write_config(gchar* path)
133132
g_key_file_set_string(key_file, "object.hsm-policy", "kv_backend", opt_object_policy_kv_backend);
134133
g_key_file_set_string(key_file, "object.hsm-policy", "kv_path", opt_object_policy_kv_path);
135134
g_key_file_set_string(key_file, "object.hsm-policy", "policy", opt_object_policy);
136-
g_key_file_set_string_list(key_file, "object.hsm-policy", "args", (gchar const*const*)object_policy_args, g_strv_length(object_policy_args));
135+
g_key_file_set_string_list(key_file, "object.hsm-policy", "args", (gchar const* const*)object_policy_args, g_strv_length(object_policy_args));
137136
key_file_data = g_key_file_to_data(key_file, &key_file_data_len, NULL);
138137

139138
if (path != NULL)

0 commit comments

Comments
 (0)