]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Use boolean bit fields for flags in struct dm_target.
authorAlasdair G Kergon <agk@redhat.com>
Tue, 24 Jul 2012 23:25:21 +0000 (09:25 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 24 Jul 2012 23:25:21 +0000 (09:25 +1000)
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-crypt.c
drivers/md/dm-raid1.c
drivers/md/dm-thin.c
include/linux/device-mapper.h

index e2b32401ecc7b3345c148b9518885ce466d849af..7a53b20ca833eae95907ceb274a5d2a3789c2b72 100644 (file)
@@ -1699,7 +1699,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
        }
 
        ti->num_flush_requests = 1;
-       ti->discard_zeroes_data_unsupported = 1;
+       ti->discard_zeroes_data_unsupported = true;
 
        return 0;
 
index 819ccba6591253ae5be1624b8298223175329780..596a3a1164a75d9c2d188195ca24bf78b7fb54c2 100644 (file)
@@ -1088,7 +1088,7 @@ static int mirror_ctr(struct dm_target *ti, unsigned int argc, char **argv)
 
        ti->num_flush_requests = 1;
        ti->num_discard_requests = 1;
-       ti->discard_zeroes_data_unsupported = 1;
+       ti->discard_zeroes_data_unsupported = true;
 
        ms->kmirrord_wq = alloc_workqueue("kmirrord",
                                          WQ_NON_REENTRANT | WQ_MEM_RECLAIM, 0);
index e3b5563ef808a16340d12c43a807bd5f038a04db..99fc6fb7ea7a4243abcae5de92bd76b722b8b5b3 100644 (file)
@@ -2053,7 +2053,7 @@ static int pool_ctr(struct dm_target *ti, unsigned argc, char **argv)
                 * stacking of discard limits (this keeps the pool and
                 * thin devices' discard limits consistent).
                 */
-               ti->discards_supported = 1;
+               ti->discards_supported = true;
        }
        ti->private = pt;
 
@@ -2656,11 +2656,11 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv)
 
        /* In case the pool supports discards, pass them on. */
        if (tc->pool->pf.discard_enabled) {
-               ti->discards_supported = 1;
+               ti->discards_supported = true;
                ti->num_discard_requests = 1;
-               ti->discard_zeroes_data_unsupported = 1;
+               ti->discard_zeroes_data_unsupported = true;
                /* Discard requests must be split on a block boundary */
-               ti->split_discard_requests = 1;
+               ti->split_discard_requests = true;
        }
 
        dm_put(pool_md);
index bdd65e97a1290501df5240dcd8bcb5e79af35972..eb753633b576c364f443d0e1f4984620375e45a7 100644 (file)
@@ -221,18 +221,18 @@ struct dm_target {
         * Set if this target needs to receive discards regardless of
         * whether or not its underlying devices have support.
         */
-       unsigned discards_supported:1;
+       bool discards_supported:1;
 
        /*
         * Set if the target required discard request to be split
         * on max_io_len boundary.
         */
-       unsigned split_discard_requests:1;
+       bool split_discard_requests:1;
 
        /*
         * Set if this target does not return zeroes on discarded blocks.
         */
-       unsigned discard_zeroes_data_unsupported:1;
+       bool discard_zeroes_data_unsupported:1;
 };
 
 /* Each target can link one of these into the table */