Commit 8ca817c4 authored by Heinz Mauelshagen's avatar Heinz Mauelshagen Committed by Mike Snitzer

dm: avoid spaces before function arguments or in favour of tabs

Signed-off-by: default avatarHeinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
parent beecc843
...@@ -44,19 +44,19 @@ struct dm_exception_store_type { ...@@ -44,19 +44,19 @@ struct dm_exception_store_type {
const char *name; const char *name;
struct module *module; struct module *module;
int (*ctr) (struct dm_exception_store *store, char *options); int (*ctr)(struct dm_exception_store *store, char *options);
/* /*
* Destroys this object when you've finished with it. * Destroys this object when you've finished with it.
*/ */
void (*dtr) (struct dm_exception_store *store); void (*dtr)(struct dm_exception_store *store);
/* /*
* The target shouldn't read the COW device until this is * The target shouldn't read the COW device until this is
* called. As exceptions are read from the COW, they are * called. As exceptions are read from the COW, they are
* reported back via the callback. * reported back via the callback.
*/ */
int (*read_metadata) (struct dm_exception_store *store, int (*read_metadata)(struct dm_exception_store *store,
int (*callback)(void *callback_context, int (*callback)(void *callback_context,
chunk_t old, chunk_t new), chunk_t old, chunk_t new),
void *callback_context); void *callback_context);
...@@ -64,15 +64,15 @@ struct dm_exception_store_type { ...@@ -64,15 +64,15 @@ struct dm_exception_store_type {
/* /*
* Find somewhere to store the next exception. * Find somewhere to store the next exception.
*/ */
int (*prepare_exception) (struct dm_exception_store *store, int (*prepare_exception)(struct dm_exception_store *store,
struct dm_exception *e); struct dm_exception *e);
/* /*
* Update the metadata with this exception. * Update the metadata with this exception.
*/ */
void (*commit_exception) (struct dm_exception_store *store, void (*commit_exception)(struct dm_exception_store *store,
struct dm_exception *e, int valid, struct dm_exception *e, int valid,
void (*callback) (void *, int success), void (*callback)(void *, int success),
void *callback_context); void *callback_context);
/* /*
...@@ -83,28 +83,28 @@ struct dm_exception_store_type { ...@@ -83,28 +83,28 @@ struct dm_exception_store_type {
* still-to-be-merged chunk and returns the number of * still-to-be-merged chunk and returns the number of
* consecutive previous ones. * consecutive previous ones.
*/ */
int (*prepare_merge) (struct dm_exception_store *store, int (*prepare_merge)(struct dm_exception_store *store,
chunk_t *last_old_chunk, chunk_t *last_new_chunk); chunk_t *last_old_chunk, chunk_t *last_new_chunk);
/* /*
* Clear the last n exceptions. * Clear the last n exceptions.
* nr_merged must be <= the value returned by prepare_merge. * nr_merged must be <= the value returned by prepare_merge.
*/ */
int (*commit_merge) (struct dm_exception_store *store, int nr_merged); int (*commit_merge)(struct dm_exception_store *store, int nr_merged);
/* /*
* The snapshot is invalid, note this in the metadata. * The snapshot is invalid, note this in the metadata.
*/ */
void (*drop_snapshot) (struct dm_exception_store *store); void (*drop_snapshot)(struct dm_exception_store *store);
unsigned int (*status) (struct dm_exception_store *store, unsigned int (*status)(struct dm_exception_store *store,
status_type_t status, char *result, status_type_t status, char *result,
unsigned int maxlen); unsigned int maxlen);
/* /*
* Return how full the snapshot is. * Return how full the snapshot is.
*/ */
void (*usage) (struct dm_exception_store *store, void (*usage)(struct dm_exception_store *store,
sector_t *total_sectors, sector_t *sectors_allocated, sector_t *total_sectors, sector_t *sectors_allocated,
sector_t *metadata_sectors); sector_t *metadata_sectors);
......
...@@ -673,16 +673,14 @@ static void list_version_get_info(struct target_type *tt, void *param) ...@@ -673,16 +673,14 @@ static void list_version_get_info(struct target_type *tt, void *param)
struct vers_iter *info = param; struct vers_iter *info = param;
/* Check space - it might have changed since the first iteration */ /* Check space - it might have changed since the first iteration */
if ((char *)info->vers + sizeof(tt->version) + strlen(tt->name) + 1 > if ((char *)info->vers + sizeof(tt->version) + strlen(tt->name) + 1 > info->end) {
info->end) {
info->flags = DM_BUFFER_FULL_FLAG; info->flags = DM_BUFFER_FULL_FLAG;
return; return;
} }
if (info->old_vers) if (info->old_vers)
info->old_vers->next = (uint32_t) ((void *)info->vers - info->old_vers->next = (uint32_t) ((void *)info->vers - (void *)info->old_vers);
(void *)info->old_vers);
info->vers->version[0] = tt->version[0]; info->vers->version[0] = tt->version[0];
info->vers->version[1] = tt->version[1]; info->vers->version[1] = tt->version[1];
info->vers->version[2] = tt->version[2]; info->vers->version[2] = tt->version[2];
......
...@@ -608,7 +608,7 @@ static int run_pages_job(struct kcopyd_job *job) ...@@ -608,7 +608,7 @@ static int run_pages_job(struct kcopyd_job *job)
* of successful jobs. * of successful jobs.
*/ */
static int process_jobs(struct list_head *jobs, struct dm_kcopyd_client *kc, static int process_jobs(struct list_head *jobs, struct dm_kcopyd_client *kc,
int (*fn) (struct kcopyd_job *)) int (*fn)(struct kcopyd_job *))
{ {
struct kcopyd_job *job; struct kcopyd_job *job;
int r, count = 0; int r, count = 0;
......
...@@ -53,43 +53,42 @@ struct path_selector_type { ...@@ -53,43 +53,42 @@ struct path_selector_type {
/* /*
* Constructs a path selector object, takes custom arguments * Constructs a path selector object, takes custom arguments
*/ */
int (*create) (struct path_selector *ps, unsigned int argc, char **argv); int (*create)(struct path_selector *ps, unsigned int argc, char **argv);
void (*destroy) (struct path_selector *ps); void (*destroy)(struct path_selector *ps);
/* /*
* Add an opaque path object, along with some selector specific * Add an opaque path object, along with some selector specific
* path args (eg, path priority). * path args (eg, path priority).
*/ */
int (*add_path) (struct path_selector *ps, struct dm_path *path, int (*add_path)(struct path_selector *ps, struct dm_path *path,
int argc, char **argv, char **error); int argc, char **argv, char **error);
/* /*
* Chooses a path for this io, if no paths are available then * Chooses a path for this io, if no paths are available then
* NULL will be returned. * NULL will be returned.
*/ */
struct dm_path *(*select_path) (struct path_selector *ps, struct dm_path *(*select_path)(struct path_selector *ps, size_t nr_bytes);
size_t nr_bytes);
/* /*
* Notify the selector that a path has failed. * Notify the selector that a path has failed.
*/ */
void (*fail_path) (struct path_selector *ps, struct dm_path *p); void (*fail_path)(struct path_selector *ps, struct dm_path *p);
/* /*
* Ask selector to reinstate a path. * Ask selector to reinstate a path.
*/ */
int (*reinstate_path) (struct path_selector *ps, struct dm_path *p); int (*reinstate_path)(struct path_selector *ps, struct dm_path *p);
/* /*
* Table content based on parameters added in ps_add_path_fn * Table content based on parameters added in ps_add_path_fn
* or path selector status * or path selector status
*/ */
int (*status) (struct path_selector *ps, struct dm_path *path, int (*status)(struct path_selector *ps, struct dm_path *path,
status_type_t type, char *result, unsigned int maxlen); status_type_t type, char *result, unsigned int maxlen);
int (*start_io) (struct path_selector *ps, struct dm_path *path, int (*start_io)(struct path_selector *ps, struct dm_path *path,
size_t nr_bytes); size_t nr_bytes);
int (*end_io) (struct path_selector *ps, struct dm_path *path, int (*end_io)(struct path_selector *ps, struct dm_path *path,
size_t nr_bytes, u64 start_time); size_t nr_bytes, u64 start_time);
}; };
......
...@@ -695,7 +695,7 @@ static int persistent_prepare_exception(struct dm_exception_store *store, ...@@ -695,7 +695,7 @@ static int persistent_prepare_exception(struct dm_exception_store *store,
static void persistent_commit_exception(struct dm_exception_store *store, static void persistent_commit_exception(struct dm_exception_store *store,
struct dm_exception *e, int valid, struct dm_exception *e, int valid,
void (*callback) (void *, int success), void (*callback)(void *, int success),
void *callback_context) void *callback_context)
{ {
unsigned int i; unsigned int i;
......
...@@ -56,7 +56,7 @@ static int transient_prepare_exception(struct dm_exception_store *store, ...@@ -56,7 +56,7 @@ static int transient_prepare_exception(struct dm_exception_store *store,
static void transient_commit_exception(struct dm_exception_store *store, static void transient_commit_exception(struct dm_exception_store *store,
struct dm_exception *e, int valid, struct dm_exception *e, int valid,
void (*callback) (void *, int success), void (*callback)(void *, int success),
void *callback_context) void *callback_context)
{ {
/* Just succeed */ /* Just succeed */
......
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