Source
71
71
if (uc->unstripe > uc->stripes && uc->stripes > 1) {
72
72
ti->error = "Please provide stripe between [0, # of stripes]";
73
73
goto err;
74
74
}
75
75
76
76
if (dm_get_device(ti, argv[3], dm_table_get_mode(ti->table), &uc->dev)) {
77
77
ti->error = "Couldn't get striped device";
78
78
goto err;
79
79
}
80
80
81
-
if (sscanf(argv[4], "%llu%c", &start, &dummy) != 1) {
81
+
if (sscanf(argv[4], "%llu%c", &start, &dummy) != 1 || start != (sector_t)start) {
82
82
ti->error = "Invalid striped device offset";
83
83
goto err;
84
84
}
85
85
uc->physical_start = start;
86
86
87
87
uc->unstripe_offset = uc->unstripe * uc->chunk_size;
88
88
uc->unstripe_width = (uc->stripes - 1) * uc->chunk_size;
89
89
uc->chunk_shift = is_power_of_2(uc->chunk_size) ? fls(uc->chunk_size) - 1 : 0;
90
90
91
91
tmp_len = ti->len;