summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-snap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-snap.c')
-rw-r--r--drivers/md/dm-snap.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index dc69f6588ff6..f61622d46c72 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -42,7 +42,7 @@ static const char dm_snapshot_merge_target_name[] = "snapshot-merge";
struct dm_exception_table {
uint32_t hash_mask;
- unsigned hash_shift;
+ unsigned int hash_shift;
struct hlist_bl_head *table;
};
@@ -107,7 +107,7 @@ struct dm_snapshot {
/* The on disk metadata handler */
struct dm_exception_store *store;
- unsigned in_progress;
+ unsigned int in_progress;
struct wait_queue_head in_progress_wait;
struct dm_kcopyd_client *kcopyd_client;
@@ -162,7 +162,7 @@ struct dm_snapshot {
*/
#define DEFAULT_COW_THRESHOLD 2048
-static unsigned cow_threshold = DEFAULT_COW_THRESHOLD;
+static unsigned int cow_threshold = DEFAULT_COW_THRESHOLD;
module_param_named(snapshot_cow_threshold, cow_threshold, uint, 0644);
MODULE_PARM_DESC(snapshot_cow_threshold, "Maximum number of chunks being copied on write");
@@ -325,7 +325,7 @@ struct origin {
struct dm_origin {
struct dm_dev *dev;
struct dm_target *ti;
- unsigned split_boundary;
+ unsigned int split_boundary;
struct list_head hash_list;
};
@@ -378,7 +378,7 @@ static void exit_origin_hash(void)
kfree(_dm_origins);
}
-static unsigned origin_hash(struct block_device *bdev)
+static unsigned int origin_hash(struct block_device *bdev)
{
return bdev->bd_dev & ORIGIN_MASK;
}
@@ -653,7 +653,7 @@ static void dm_exception_table_unlock(struct dm_exception_table_lock *lock)
}
static int dm_exception_table_init(struct dm_exception_table *et,
- uint32_t size, unsigned hash_shift)
+ uint32_t size, unsigned int hash_shift)
{
unsigned int i;
@@ -851,7 +851,7 @@ static int dm_add_exception(void *context, chunk_t old, chunk_t new)
static uint32_t __minimum_chunk_size(struct origin *o)
{
struct dm_snapshot *snap;
- unsigned chunk_size = rounddown_pow_of_two(UINT_MAX);
+ unsigned int chunk_size = rounddown_pow_of_two(UINT_MAX);
if (o)
list_for_each_entry(snap, &o->snapshots, list)
@@ -1011,7 +1011,7 @@ out:
}
static int origin_write_extent(struct dm_snapshot *merging_snap,
- sector_t sector, unsigned chunk_size);
+ sector_t sector, unsigned int chunk_size);
static void merge_callback(int read_err, unsigned long write_err,
void *context);
@@ -1184,7 +1184,7 @@ static int parse_snapshot_features(struct dm_arg_set *as, struct dm_snapshot *s,
struct dm_target *ti)
{
int r;
- unsigned argc;
+ unsigned int argc;
const char *arg_name;
static const struct dm_arg _args[] = {
@@ -1242,7 +1242,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
int r = -EINVAL;
char *origin_path, *cow_path;
dev_t origin_dev, cow_dev;
- unsigned args_used, num_flush_bios = 1;
+ unsigned int args_used, num_flush_bios = 1;
fmode_t origin_mode = FMODE_READ;
if (argc < 4) {
@@ -2316,11 +2316,11 @@ static void snapshot_merge_resume(struct dm_target *ti)
}
static void snapshot_status(struct dm_target *ti, status_type_t type,
- unsigned status_flags, char *result, unsigned maxlen)
+ unsigned int status_flags, char *result, unsigned int maxlen)
{
- unsigned sz = 0;
+ unsigned int sz = 0;
struct dm_snapshot *snap = ti->private;
- unsigned num_features;
+ unsigned int num_features;
switch (type) {
case STATUSTYPE_INFO:
@@ -2593,7 +2593,7 @@ again:
* size must be a multiple of merging_snap's chunk_size.
*/
static int origin_write_extent(struct dm_snapshot *merging_snap,
- sector_t sector, unsigned size)
+ sector_t sector, unsigned int size)
{
int must_wait = 0;
sector_t n;
@@ -2669,7 +2669,7 @@ static void origin_dtr(struct dm_target *ti)
static int origin_map(struct dm_target *ti, struct bio *bio)
{
struct dm_origin *o = ti->private;
- unsigned available_sectors;
+ unsigned int available_sectors;
bio_set_dev(bio, o->dev->bdev);
@@ -2680,7 +2680,7 @@ static int origin_map(struct dm_target *ti, struct bio *bio)
return DM_MAPIO_REMAPPED;
available_sectors = o->split_boundary -
- ((unsigned)bio->bi_iter.bi_sector & (o->split_boundary - 1));
+ ((unsigned int)bio->bi_iter.bi_sector & (o->split_boundary - 1));
if (bio_sectors(bio) > available_sectors)
dm_accept_partial_bio(bio, available_sectors);
@@ -2714,7 +2714,7 @@ static void origin_postsuspend(struct dm_target *ti)
}
static void origin_status(struct dm_target *ti, status_type_t type,
- unsigned status_flags, char *result, unsigned maxlen)
+ unsigned int status_flags, char *result, unsigned int maxlen)
{
struct dm_origin *o = ti->private;