mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 23:29:46 +00:00
md: remove sparse waring "symbol xxx shadows an earlier one"
Rename some variable and remove some duplicate definitions to avoid there warnings. None of them are actual errors. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
7fa07729e4
commit
a9f326ebf2
@ -4575,10 +4575,10 @@ static int get_version(void __user * arg)
|
|||||||
static int get_array_info(mddev_t * mddev, void __user * arg)
|
static int get_array_info(mddev_t * mddev, void __user * arg)
|
||||||
{
|
{
|
||||||
mdu_array_info_t info;
|
mdu_array_info_t info;
|
||||||
int nr,working,active,failed,spare;
|
int nr,working,insync,failed,spare;
|
||||||
mdk_rdev_t *rdev;
|
mdk_rdev_t *rdev;
|
||||||
|
|
||||||
nr=working=active=failed=spare=0;
|
nr=working=insync=failed=spare=0;
|
||||||
list_for_each_entry(rdev, &mddev->disks, same_set) {
|
list_for_each_entry(rdev, &mddev->disks, same_set) {
|
||||||
nr++;
|
nr++;
|
||||||
if (test_bit(Faulty, &rdev->flags))
|
if (test_bit(Faulty, &rdev->flags))
|
||||||
@ -4586,7 +4586,7 @@ static int get_array_info(mddev_t * mddev, void __user * arg)
|
|||||||
else {
|
else {
|
||||||
working++;
|
working++;
|
||||||
if (test_bit(In_sync, &rdev->flags))
|
if (test_bit(In_sync, &rdev->flags))
|
||||||
active++;
|
insync++;
|
||||||
else
|
else
|
||||||
spare++;
|
spare++;
|
||||||
}
|
}
|
||||||
@ -4611,7 +4611,7 @@ static int get_array_info(mddev_t * mddev, void __user * arg)
|
|||||||
info.state = (1<<MD_SB_CLEAN);
|
info.state = (1<<MD_SB_CLEAN);
|
||||||
if (mddev->bitmap && mddev->bitmap_offset)
|
if (mddev->bitmap && mddev->bitmap_offset)
|
||||||
info.state = (1<<MD_SB_BITMAP_PRESENT);
|
info.state = (1<<MD_SB_BITMAP_PRESENT);
|
||||||
info.active_disks = active;
|
info.active_disks = insync;
|
||||||
info.working_disks = working;
|
info.working_disks = working;
|
||||||
info.failed_disks = failed;
|
info.failed_disks = failed;
|
||||||
info.spare_disks = spare;
|
info.spare_disks = spare;
|
||||||
@ -4721,7 +4721,7 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info)
|
|||||||
if (!list_empty(&mddev->disks)) {
|
if (!list_empty(&mddev->disks)) {
|
||||||
mdk_rdev_t *rdev0 = list_entry(mddev->disks.next,
|
mdk_rdev_t *rdev0 = list_entry(mddev->disks.next,
|
||||||
mdk_rdev_t, same_set);
|
mdk_rdev_t, same_set);
|
||||||
int err = super_types[mddev->major_version]
|
err = super_types[mddev->major_version]
|
||||||
.load_super(rdev, rdev0, mddev->minor_version);
|
.load_super(rdev, rdev0, mddev->minor_version);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING
|
||||||
|
@ -86,7 +86,7 @@ static void dump_zones(mddev_t *mddev)
|
|||||||
|
|
||||||
static int create_strip_zones(mddev_t *mddev)
|
static int create_strip_zones(mddev_t *mddev)
|
||||||
{
|
{
|
||||||
int i, c, j, err;
|
int i, c, err;
|
||||||
sector_t curr_zone_end, sectors;
|
sector_t curr_zone_end, sectors;
|
||||||
mdk_rdev_t *smallest, *rdev1, *rdev2, *rdev, **dev;
|
mdk_rdev_t *smallest, *rdev1, *rdev2, *rdev, **dev;
|
||||||
struct strip_zone *zone;
|
struct strip_zone *zone;
|
||||||
@ -198,6 +198,8 @@ static int create_strip_zones(mddev_t *mddev)
|
|||||||
/* now do the other zones */
|
/* now do the other zones */
|
||||||
for (i = 1; i < conf->nr_strip_zones; i++)
|
for (i = 1; i < conf->nr_strip_zones; i++)
|
||||||
{
|
{
|
||||||
|
int j;
|
||||||
|
|
||||||
zone = conf->strip_zone + i;
|
zone = conf->strip_zone + i;
|
||||||
dev = conf->devlist + i * mddev->raid_disks;
|
dev = conf->devlist + i * mddev->raid_disks;
|
||||||
|
|
||||||
@ -207,7 +209,6 @@ static int create_strip_zones(mddev_t *mddev)
|
|||||||
c = 0;
|
c = 0;
|
||||||
|
|
||||||
for (j=0; j<cnt; j++) {
|
for (j=0; j<cnt; j++) {
|
||||||
char b[BDEVNAME_SIZE];
|
|
||||||
rdev = conf->devlist[j];
|
rdev = conf->devlist[j];
|
||||||
printk(KERN_INFO "raid0: checking %s ...",
|
printk(KERN_INFO "raid0: checking %s ...",
|
||||||
bdevname(rdev->bdev, b));
|
bdevname(rdev->bdev, b));
|
||||||
|
@ -1773,7 +1773,7 @@ static sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, i
|
|||||||
max_sync = RESYNC_PAGES << (PAGE_SHIFT-9);
|
max_sync = RESYNC_PAGES << (PAGE_SHIFT-9);
|
||||||
if (!test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) {
|
if (!test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) {
|
||||||
/* recovery... the complicated one */
|
/* recovery... the complicated one */
|
||||||
int i, j, k;
|
int j, k;
|
||||||
r10_bio = NULL;
|
r10_bio = NULL;
|
||||||
|
|
||||||
for (i=0 ; i<conf->raid_disks; i++)
|
for (i=0 ; i<conf->raid_disks; i++)
|
||||||
|
@ -2756,7 +2756,8 @@ static bool handle_stripe5(struct stripe_head *sh)
|
|||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
for (i=disks; i--; ) {
|
for (i=disks; i--; ) {
|
||||||
mdk_rdev_t *rdev;
|
mdk_rdev_t *rdev;
|
||||||
struct r5dev *dev = &sh->dev[i];
|
|
||||||
|
dev = &sh->dev[i];
|
||||||
clear_bit(R5_Insync, &dev->flags);
|
clear_bit(R5_Insync, &dev->flags);
|
||||||
|
|
||||||
pr_debug("check %d: state 0x%lx toread %p read %p write %p "
|
pr_debug("check %d: state 0x%lx toread %p read %p write %p "
|
||||||
@ -3880,7 +3881,7 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
|
|||||||
INIT_LIST_HEAD(&stripes);
|
INIT_LIST_HEAD(&stripes);
|
||||||
for (i = 0; i < reshape_sectors; i += STRIPE_SECTORS) {
|
for (i = 0; i < reshape_sectors; i += STRIPE_SECTORS) {
|
||||||
int j;
|
int j;
|
||||||
int skipped = 0;
|
int skipped_disk = 0;
|
||||||
sh = get_active_stripe(conf, stripe_addr+i, 0, 0, 1);
|
sh = get_active_stripe(conf, stripe_addr+i, 0, 0, 1);
|
||||||
set_bit(STRIPE_EXPANDING, &sh->state);
|
set_bit(STRIPE_EXPANDING, &sh->state);
|
||||||
atomic_inc(&conf->reshape_stripes);
|
atomic_inc(&conf->reshape_stripes);
|
||||||
@ -3896,14 +3897,14 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
|
|||||||
continue;
|
continue;
|
||||||
s = compute_blocknr(sh, j, 0);
|
s = compute_blocknr(sh, j, 0);
|
||||||
if (s < raid5_size(mddev, 0, 0)) {
|
if (s < raid5_size(mddev, 0, 0)) {
|
||||||
skipped = 1;
|
skipped_disk = 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
memset(page_address(sh->dev[j].page), 0, STRIPE_SIZE);
|
memset(page_address(sh->dev[j].page), 0, STRIPE_SIZE);
|
||||||
set_bit(R5_Expanded, &sh->dev[j].flags);
|
set_bit(R5_Expanded, &sh->dev[j].flags);
|
||||||
set_bit(R5_UPTODATE, &sh->dev[j].flags);
|
set_bit(R5_UPTODATE, &sh->dev[j].flags);
|
||||||
}
|
}
|
||||||
if (!skipped) {
|
if (!skipped_disk) {
|
||||||
set_bit(STRIPE_EXPAND_READY, &sh->state);
|
set_bit(STRIPE_EXPAND_READY, &sh->state);
|
||||||
set_bit(STRIPE_HANDLE, &sh->state);
|
set_bit(STRIPE_HANDLE, &sh->state);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user