dm: avoid spaces before function arguments or in favour of tabs
authorHeinz Mauelshagen <heinzm@redhat.com>
Wed, 1 Feb 2023 21:31:43 +0000 (22:31 +0100)
committerMike Snitzer <snitzer@kernel.org>
Tue, 14 Feb 2023 19:23:06 +0000 (14:23 -0500)
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
14 files changed:
drivers/md/dm-bio-prison-v1.c
drivers/md/dm-cache-target.c
drivers/md/dm-ebs-target.c
drivers/md/dm-exception-store.h
drivers/md/dm-ioctl.c
drivers/md/dm-kcopyd.c
drivers/md/dm-path-selector.h
drivers/md/dm-ps-queue-length.c
drivers/md/dm-ps-service-time.c
drivers/md/dm-raid1.c
drivers/md/dm-snap-persistent.c
drivers/md/dm-snap-transient.c
drivers/md/dm-snap.c
drivers/md/dm-uevent.c

index be0cd3eb1fa2b35e50e5be9b44fdaac3aaeee59f..9fb5e3f66e6b76af47a2d0d39254b1cfb48b2ef4 100644 (file)
@@ -78,9 +78,9 @@ static void __setup_new_cell(struct dm_cell_key *key,
                             struct bio *holder,
                             struct dm_bio_prison_cell *cell)
 {
-       memcpy(&cell->key, key, sizeof(cell->key));
-       cell->holder = holder;
-       bio_list_init(&cell->bios);
+       memcpy(&cell->key, key, sizeof(cell->key));
+       cell->holder = holder;
+       bio_list_init(&cell->bios);
 }
 
 static int cmp_keys(struct dm_cell_key *lhs,
index bb511cb89f83ef7c58f65130846435a36e8a238a..60f7f1e45a8f3c951eac74795012a0e1bb061698 100644 (file)
@@ -181,14 +181,14 @@ static void continue_after_commit(struct batcher *b, struct continuation *k)
  */
 static void issue_after_commit(struct batcher *b, struct bio *bio)
 {
-       bool commit_scheduled;
+       bool commit_scheduled;
 
-       spin_lock_irq(&b->lock);
-       commit_scheduled = b->commit_scheduled;
-       bio_list_add(&b->bios, bio);
-       spin_unlock_irq(&b->lock);
+       spin_lock_irq(&b->lock);
+       commit_scheduled = b->commit_scheduled;
+       bio_list_add(&b->bios, bio);
+       spin_unlock_irq(&b->lock);
 
-       if (commit_scheduled)
+       if (commit_scheduled)
               async_commit(b);
 }
 
index 71b844bdcdb8bfc010c988c06f72d27103cde4ec..b1068a68bc468fccd406fcceea65198777b4f2e1 100644 (file)
@@ -242,7 +242,7 @@ static void __ebs_process_bios(struct work_struct *ws)
  * <offset>: offset in 512 bytes sectors into <dev_path>
  * <ebs>: emulated block size in units of 512 bytes exposed to the upper layer
  * [<ubs>]: underlying block size in units of 512 bytes imposed on the lower layer;
- *         optional, if not supplied, retrieve logical block size from underlying device
+ *         optional, if not supplied, retrieve logical block size from underlying device
  */
 static int ebs_ctr(struct dm_target *ti, unsigned int argc, char **argv)
 {
index 62df388af33ad6a7ce1adeafd92b6e9bf0712713..b67976637538184284e2ee3b0362d71676798ec9 100644 (file)
@@ -44,36 +44,36 @@ 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 (*callback)(void *callback_context,
-                                             chunk_t old, chunk_t new),
-                             void *callback_context);
+       int (*read_metadata)(struct dm_exception_store *store,
+                            int (*callback)(void *callback_context,
+                                            chunk_t old, chunk_t new),
+                            void *callback_context);
 
        /*
         * Find somewhere to store the next exception.
         */
-       int (*prepare_exception) (struct dm_exception_store *store,
-                                 struct dm_exception *e);
+       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,
-                                 struct dm_exception *e, int valid,
-                                 void (*callback) (void *, int success),
-                                 void *callback_context);
+       void (*commit_exception)(struct dm_exception_store *store,
+                                struct dm_exception *e, int valid,
+                                void (*callback)(void *, int success),
+                                void *callback_context);
 
        /*
         * Returns 0 if the exception store is empty.
@@ -83,30 +83,30 @@ 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,
-                             chunk_t *last_old_chunk, chunk_t *last_new_chunk);
+       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,
-                               status_type_t status, char *result,
-                               unsigned int maxlen);
+       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,
-                      sector_t *total_sectors, sector_t *sectors_allocated,
-                      sector_t *metadata_sectors);
+       void (*usage)(struct dm_exception_store *store,
+                     sector_t *total_sectors, sector_t *sectors_allocated,
+                     sector_t *metadata_sectors);
 
        /* For internal device-mapper use only. */
        struct list_head list;
index 5cb85c35327513f6af662bf589030527ba4b4c82..7396dd65c0388ec836e96e5e1ef16af15d5edc1a 100644 (file)
@@ -54,10 +54,10 @@ struct hash_cell {
 };
 
 struct vers_iter {
-    size_t param_size;
-    struct dm_target_versions *vers, *old_vers;
-    char *end;
-    uint32_t flags;
+       size_t param_size;
+       struct dm_target_versions *vers, *old_vers;
+       char *end;
+       uint32_t flags;
 };
 
 
@@ -661,36 +661,34 @@ static int list_devices(struct file *filp, struct dm_ioctl *param, size_t param_
 
 static void list_version_get_needed(struct target_type *tt, void *needed_param)
 {
-    size_t *needed = needed_param;
+       size_t *needed = needed_param;
 
-    *needed += sizeof(struct dm_target_versions);
-    *needed += strlen(tt->name) + 1;
-    *needed += ALIGN_MASK;
+       *needed += sizeof(struct dm_target_versions);
+       *needed += strlen(tt->name) + 1;
+       *needed += ALIGN_MASK;
 }
 
 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 */
-    if ((char *)info->vers + sizeof(tt->version) + strlen(tt->name) + 1 >
-       info->end) {
+       /* Check space - it might have changed since the first iteration */
+       if ((char *)info->vers + sizeof(tt->version) + strlen(tt->name) + 1 > info->end) {
+               info->flags = DM_BUFFER_FULL_FLAG;
+               return;
+       }
 
-       info->flags = DM_BUFFER_FULL_FLAG;
-       return;
-    }
+       if (info->old_vers)
+               info->old_vers->next = (uint32_t) ((void *)info->vers - (void *)info->old_vers);
 
-    if (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];
-    info->vers->next = 0;
-    strcpy(info->vers->name, tt->name);
+       info->vers->version[0] = tt->version[0];
+       info->vers->version[1] = tt->version[1];
+       info->vers->version[2] = tt->version[2];
+       info->vers->next = 0;
+       strcpy(info->vers->name, tt->name);
 
-    info->old_vers = info->vers;
-    info->vers = align_ptr((void *)(info->vers + 1) + strlen(tt->name) + 1);
+       info->old_vers = info->vers;
+       info->vers = align_ptr((void *)(info->vers + 1) + strlen(tt->name) + 1);
 }
 
 static int __list_versions(struct dm_ioctl *param, size_t param_size, const char *name)
@@ -2095,9 +2093,9 @@ static const struct file_operations _ctl_fops = {
 
 static struct miscdevice _dm_misc = {
        .minor          = MAPPER_CTRL_MINOR,
-       .name           = DM_NAME,
+       .name           = DM_NAME,
        .nodename       = DM_DIR "/" DM_CONTROL_NODE,
-       .fops           = &_ctl_fops
+       .fops           = &_ctl_fops
 };
 
 MODULE_ALIAS_MISCDEV(MAPPER_CTRL_MINOR);
index aecf9673b51afcd110ae2908bdcadf3ae7b7daae..121a69dde55b243aab81cc603dd9066232ea5dbd 100644 (file)
@@ -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;
index 8a32ef92907be3bcbbc5e72fc94ce0d38782142d..3861b2d8b963cd072f4edbd576c7a17879cc6700 100644 (file)
@@ -53,44 +53,43 @@ 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 argc, char **argv, char **error);
+       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,
-                      status_type_t type, char *result, unsigned int maxlen);
+       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,
-                        size_t nr_bytes);
-       int (*end_io) (struct path_selector *ps, struct dm_path *path,
-                      size_t nr_bytes, u64 start_time);
+       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,
+                     size_t nr_bytes, u64 start_time);
 };
 
 /* Register a path selector */
index 387ec65ca0d7831c09c2d518766bb180af250cc5..e305f05ad1e5e804c663560383fe5ec74b3f4a87 100644 (file)
@@ -123,8 +123,8 @@ static int ql_add_path(struct path_selector *ps, struct dm_path *path,
 
        /*
         * Arguments: [<repeat_count>]
-        *      <repeat_count>: The number of I/Os before switching path.
-        *                      If not given, default (QL_MIN_IO) is used.
+        *      <repeat_count>: The number of I/Os before switching path.
+        *                      If not given, default (QL_MIN_IO) is used.
         */
        if (argc > 1) {
                *error = "queue-length ps: incorrect number of arguments";
index b623336ae55977f77b37017ea4b698c0f4e8e4c4..969d31c40272e25bf9b6712e50f6796a5e9b9d1f 100644 (file)
@@ -121,11 +121,11 @@ static int st_add_path(struct path_selector *ps, struct dm_path *path,
 
        /*
         * Arguments: [<repeat_count> [<relative_throughput>]]
-        *      <repeat_count>: The number of I/Os before switching path.
-        *                      If not given, default (ST_MIN_IO) is used.
-        *      <relative_throughput>: The relative throughput value of
+        *      <repeat_count>: The number of I/Os before switching path.
+        *                      If not given, default (ST_MIN_IO) is used.
+        *      <relative_throughput>: The relative throughput value of
         *                      the path among all paths in the path-group.
-        *                      The valid range: 0-<ST_MAX_RELATIVE_THROUGHPUT>
+        *                      The valid range: 0-<ST_MAX_RELATIVE_THROUGHPUT>
         *                      If not given, minimum value '1' is used.
         *                      If '0' is given, the path isn't selected while
         *                      other paths having a positive value are available.
index 640f199cf51c00e36373b0c913c04ade0202077a..741141449f0734d9752c43f1bfa08aa05c100dd1 100644 (file)
@@ -595,7 +595,7 @@ static void do_reads(struct mirror_set *ms, struct bio_list *reads)
  * We do different things with the write io depending on the
  * state of the region that it's in:
  *
- * SYNC:       increment pending, use kcopyd to write to *all* mirrors
+ * SYNC:       increment pending, use kcopyd to write to *all* mirrors
  * RECOVERING: delay the io until recovery completes
  * NOSYNC:     increment pending, just write to the default mirror
  *---------------------------------------------------------------------
index 40efa1af692ca0dfc0ce21b6fb9cb166b72e258f..570a7722c93665f60c2905a3373910c6221fcfbb 100644 (file)
@@ -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;
index 346c2105fab7480a3ee5a27d5ccd2dae643624b6..46dee495e7be7edc9b612df128bfb263089b3830 100644 (file)
@@ -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 */
index 6078c5386afa63cacaa25cfb50dadd15d6375b8d..6a0df6349e68d0caa146242253fd31c5be0e272c 100644 (file)
@@ -123,11 +123,11 @@ struct dm_snapshot {
         * The merge operation failed if this flag is set.
         * Failure modes are handled as follows:
         * - I/O error reading the header
-        *      => don't load the target; abort.
+        *      => don't load the target; abort.
         * - Header does not have "valid" flag set
-        *      => use the origin; forget about the snapshot.
+        *      => use the origin; forget about the snapshot.
         * - I/O error when reading exceptions
-        *      => don't load the target; abort.
+        *      => don't load the target; abort.
         *         (We can't use the intermediate origin state.)
         * - I/O error while merging
         *      => stop merging; set merge_failed; process I/O normally.
index a02b3f6ea47a8b0cac6109c06975b224238d7401..4917382632924f442c9916abd5de1716fd9c5f1a 100644 (file)
@@ -3,7 +3,7 @@
  * Device Mapper Uevent Support (dm-uevent)
  *
  * Copyright IBM Corporation, 2007
- *     Author: Mike Anderson <andmike@linux.vnet.ibm.com>
+ *     Author: Mike Anderson <andmike@linux.vnet.ibm.com>
  */
 #include <linux/list.h>
 #include <linux/slab.h>