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 {
const char *name;
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.
*/
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
* called. As exceptions are read from the COW, they are
* 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,
chunk_t old, chunk_t new),
void *callback_context);
......@@ -64,15 +64,15 @@ struct dm_exception_store_type {
/*
* 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);
/*
* 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,
void (*callback) (void *, int success),
void (*callback)(void *, int success),
void *callback_context);
/*
......@@ -83,28 +83,28 @@ struct dm_exception_store_type {
* still-to-be-merged chunk and returns the number of
* 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);
/*
* Clear the last n exceptions.
* 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.
*/
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,
unsigned int maxlen);
/*
* 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 *metadata_sectors);
......
......@@ -673,16 +673,14 @@ static void list_version_get_info(struct target_type *tt, void *param)
struct vers_iter *info = param;
/* Check space - it might have changed since the first iteration */
if ((char *)info->vers + sizeof(tt->version) + strlen(tt->name) + 1 >
info->end) {
if ((char *)info->vers + sizeof(tt->version) + strlen(tt->name) + 1 > info->end) {
info->flags = DM_BUFFER_FULL_FLAG;
return;
}
if (info->old_vers)
info->old_vers->next = (uint32_t) ((void *)info->vers -
(void *)info->old_vers);
info->old_vers->next = (uint32_t) ((void *)info->vers - (void *)info->old_vers);
info->vers->version[0] = tt->version[0];
info->vers->version[1] = tt->version[1];
info->vers->version[2] = tt->version[2];
......
......@@ -608,7 +608,7 @@ static int run_pages_job(struct kcopyd_job *job)
* of successful jobs.
*/
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;
int r, count = 0;
......
......@@ -53,43 +53,42 @@ struct path_selector_type {
/*
* Constructs a path selector object, takes custom arguments
*/
int (*create) (struct path_selector *ps, unsigned int argc, char **argv);
void (*destroy) (struct path_selector *ps);
int (*create)(struct path_selector *ps, unsigned int argc, char **argv);
void (*destroy)(struct path_selector *ps);
/*
* Add an opaque path object, along with some selector specific
* 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);
/*
* Chooses a path for this io, if no paths are available then
* NULL will be returned.
*/
struct dm_path *(*select_path) (struct path_selector *ps,
size_t nr_bytes);
struct dm_path *(*select_path)(struct path_selector *ps, size_t nr_bytes);
/*
* 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.
*/
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
* 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);
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);
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);
};
......
......@@ -695,7 +695,7 @@ static int persistent_prepare_exception(struct dm_exception_store *store,
static void persistent_commit_exception(struct dm_exception_store *store,
struct dm_exception *e, int valid,
void (*callback) (void *, int success),
void (*callback)(void *, int success),
void *callback_context)
{
unsigned int i;
......
......@@ -56,7 +56,7 @@ static int transient_prepare_exception(struct dm_exception_store *store,
static void transient_commit_exception(struct dm_exception_store *store,
struct dm_exception *e, int valid,
void (*callback) (void *, int success),
void (*callback)(void *, int success),
void *callback_context)
{
/* 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