Commit 0ac55489d9e3898987b2ae305844cf2af86e6b8d
1 parent
16ad3d103d
Exists in
master
and in
20 other branches
dm: use bool bitfields in struct dm_target
Use boolean bit fields for flags in struct dm_target. Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Showing 4 changed files with 9 additions and 9 deletions Side-by-side Diff
drivers/md/dm-crypt.c
drivers/md/dm-raid1.c
... | ... | @@ -1088,7 +1088,7 @@ |
1088 | 1088 | |
1089 | 1089 | ti->num_flush_requests = 1; |
1090 | 1090 | ti->num_discard_requests = 1; |
1091 | - ti->discard_zeroes_data_unsupported = 1; | |
1091 | + ti->discard_zeroes_data_unsupported = true; | |
1092 | 1092 | |
1093 | 1093 | ms->kmirrord_wq = alloc_workqueue("kmirrord", |
1094 | 1094 | WQ_NON_REENTRANT | WQ_MEM_RECLAIM, 0); |
drivers/md/dm-thin.c
... | ... | @@ -2053,7 +2053,7 @@ |
2053 | 2053 | * stacking of discard limits (this keeps the pool and |
2054 | 2054 | * thin devices' discard limits consistent). |
2055 | 2055 | */ |
2056 | - ti->discards_supported = 1; | |
2056 | + ti->discards_supported = true; | |
2057 | 2057 | } |
2058 | 2058 | ti->private = pt; |
2059 | 2059 | |
2060 | 2060 | |
2061 | 2061 | |
... | ... | @@ -2656,11 +2656,11 @@ |
2656 | 2656 | |
2657 | 2657 | /* In case the pool supports discards, pass them on. */ |
2658 | 2658 | if (tc->pool->pf.discard_enabled) { |
2659 | - ti->discards_supported = 1; | |
2659 | + ti->discards_supported = true; | |
2660 | 2660 | ti->num_discard_requests = 1; |
2661 | - ti->discard_zeroes_data_unsupported = 1; | |
2661 | + ti->discard_zeroes_data_unsupported = true; | |
2662 | 2662 | /* Discard requests must be split on a block boundary */ |
2663 | - ti->split_discard_requests = 1; | |
2663 | + ti->split_discard_requests = true; | |
2664 | 2664 | } |
2665 | 2665 | |
2666 | 2666 | dm_put(pool_md); |
include/linux/device-mapper.h
... | ... | @@ -221,18 +221,18 @@ |
221 | 221 | * Set if this target needs to receive discards regardless of |
222 | 222 | * whether or not its underlying devices have support. |
223 | 223 | */ |
224 | - unsigned discards_supported:1; | |
224 | + bool discards_supported:1; | |
225 | 225 | |
226 | 226 | /* |
227 | 227 | * Set if the target required discard request to be split |
228 | 228 | * on max_io_len boundary. |
229 | 229 | */ |
230 | - unsigned split_discard_requests:1; | |
230 | + bool split_discard_requests:1; | |
231 | 231 | |
232 | 232 | /* |
233 | 233 | * Set if this target does not return zeroes on discarded blocks. |
234 | 234 | */ |
235 | - unsigned discard_zeroes_data_unsupported:1; | |
235 | + bool discard_zeroes_data_unsupported:1; | |
236 | 236 | }; |
237 | 237 | |
238 | 238 | /* Each target can link one of these into the table */ |