md-cluster.c (935fe0983e09f4f7331ebf5ea4ae2124f6e9f9e8) md-cluster.c (b03e0ccb5ab9df3efbe51c87843a1ffbecbafa1f)
1/*
2 * Copyright (C) 2015, SUSE
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2, or (at your option)
7 * any later version.
8 *

--- 428 unchanged lines hidden (view full) ---

437 kfree(s);
438 break;
439 }
440}
441
442static void remove_suspend_info(struct mddev *mddev, int slot)
443{
444 struct md_cluster_info *cinfo = mddev->cluster_info;
1/*
2 * Copyright (C) 2015, SUSE
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2, or (at your option)
7 * any later version.
8 *

--- 428 unchanged lines hidden (view full) ---

437 kfree(s);
438 break;
439 }
440}
441
442static void remove_suspend_info(struct mddev *mddev, int slot)
443{
444 struct md_cluster_info *cinfo = mddev->cluster_info;
445 mddev->pers->quiesce(mddev, 1);
445 spin_lock_irq(&cinfo->suspend_lock);
446 __remove_suspend_info(cinfo, slot);
447 spin_unlock_irq(&cinfo->suspend_lock);
446 spin_lock_irq(&cinfo->suspend_lock);
447 __remove_suspend_info(cinfo, slot);
448 spin_unlock_irq(&cinfo->suspend_lock);
448 mddev->pers->quiesce(mddev, 2);
449 mddev->pers->quiesce(mddev, 0);
449}
450
451
452static void process_suspend_info(struct mddev *mddev,
453 int slot, sector_t lo, sector_t hi)
454{
455 struct md_cluster_info *cinfo = mddev->cluster_info;
456 struct suspend_info *s;

--- 30 unchanged lines hidden (view full) ---

487
488 s = kzalloc(sizeof(struct suspend_info), GFP_KERNEL);
489 if (!s)
490 return;
491 s->slot = slot;
492 s->lo = lo;
493 s->hi = hi;
494 mddev->pers->quiesce(mddev, 1);
450}
451
452
453static void process_suspend_info(struct mddev *mddev,
454 int slot, sector_t lo, sector_t hi)
455{
456 struct md_cluster_info *cinfo = mddev->cluster_info;
457 struct suspend_info *s;

--- 30 unchanged lines hidden (view full) ---

488
489 s = kzalloc(sizeof(struct suspend_info), GFP_KERNEL);
490 if (!s)
491 return;
492 s->slot = slot;
493 s->lo = lo;
494 s->hi = hi;
495 mddev->pers->quiesce(mddev, 1);
495 mddev->pers->quiesce(mddev, 0);
496 spin_lock_irq(&cinfo->suspend_lock);
497 /* Remove existing entry (if exists) before adding */
498 __remove_suspend_info(cinfo, slot);
499 list_add(&s->list, &cinfo->suspend_list);
500 spin_unlock_irq(&cinfo->suspend_lock);
496 spin_lock_irq(&cinfo->suspend_lock);
497 /* Remove existing entry (if exists) before adding */
498 __remove_suspend_info(cinfo, slot);
499 list_add(&s->list, &cinfo->suspend_list);
500 spin_unlock_irq(&cinfo->suspend_lock);
501 mddev->pers->quiesce(mddev, 2);
501 mddev->pers->quiesce(mddev, 0);
502}
503
504static void process_add_new_disk(struct mddev *mddev, struct cluster_msg *cmsg)
505{
506 char disk_uuid[64];
507 struct md_cluster_info *cinfo = mddev->cluster_info;
508 char event_name[] = "EVENT=ADD_DEVICE";
509 char raid_slot[16];

--- 987 unchanged lines hidden ---
502}
503
504static void process_add_new_disk(struct mddev *mddev, struct cluster_msg *cmsg)
505{
506 char disk_uuid[64];
507 struct md_cluster_info *cinfo = mddev->cluster_info;
508 char event_name[] = "EVENT=ADD_DEVICE";
509 char raid_slot[16];

--- 987 unchanged lines hidden ---