lock_dlm.c (f1615bbe9be4def59c3b3eaddb60722efeed16c2) lock_dlm.c (743162013d40ca612b4cb53d3a200dff2d9ab26e)
1/*
2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
3 * Copyright 2004-2011 Red Hat, Inc.
4 *
5 * This copyrighted material is made available to anyone wishing to use,
6 * modify, copy, or redistribute it subject to the terms and conditions
7 * of the GNU General Public License version 2.
8 */

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

931 return 0;
932
933fail:
934 mounted_unlock(sdp);
935 control_unlock(sdp);
936 return error;
937}
938
1/*
2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
3 * Copyright 2004-2011 Red Hat, Inc.
4 *
5 * This copyrighted material is made available to anyone wishing to use,
6 * modify, copy, or redistribute it subject to the terms and conditions
7 * of the GNU General Public License version 2.
8 */

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

931 return 0;
932
933fail:
934 mounted_unlock(sdp);
935 control_unlock(sdp);
936 return error;
937}
938
939static int dlm_recovery_wait(void *word)
940{
941 schedule();
942 return 0;
943}
944
945static int control_first_done(struct gfs2_sbd *sdp)
946{
947 struct lm_lockstruct *ls = &sdp->sd_lockstruct;
948 uint32_t start_gen, block_gen;
949 int error;
950
951restart:
952 spin_lock(&ls->ls_recover_spin);

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

971 * callbacks between the recover_prep and next recover_done
972 * because we are still the first mounter and any failed nodes
973 * have not fully mounted, so they don't need recovery.
974 */
975 spin_unlock(&ls->ls_recover_spin);
976 fs_info(sdp, "control_first_done wait gen %u\n", start_gen);
977
978 wait_on_bit(&ls->ls_recover_flags, DFL_DLM_RECOVERY,
939static int control_first_done(struct gfs2_sbd *sdp)
940{
941 struct lm_lockstruct *ls = &sdp->sd_lockstruct;
942 uint32_t start_gen, block_gen;
943 int error;
944
945restart:
946 spin_lock(&ls->ls_recover_spin);

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

965 * callbacks between the recover_prep and next recover_done
966 * because we are still the first mounter and any failed nodes
967 * have not fully mounted, so they don't need recovery.
968 */
969 spin_unlock(&ls->ls_recover_spin);
970 fs_info(sdp, "control_first_done wait gen %u\n", start_gen);
971
972 wait_on_bit(&ls->ls_recover_flags, DFL_DLM_RECOVERY,
979 dlm_recovery_wait, TASK_UNINTERRUPTIBLE);
973 TASK_UNINTERRUPTIBLE);
980 goto restart;
981 }
982
983 clear_bit(DFL_FIRST_MOUNT, &ls->ls_recover_flags);
984 set_bit(DFL_FIRST_MOUNT_DONE, &ls->ls_recover_flags);
985 memset(ls->ls_recover_submit, 0, ls->ls_recover_size*sizeof(uint32_t));
986 memset(ls->ls_recover_result, 0, ls->ls_recover_size*sizeof(uint32_t));
987 spin_unlock(&ls->ls_recover_spin);

--- 355 unchanged lines hidden ---
974 goto restart;
975 }
976
977 clear_bit(DFL_FIRST_MOUNT, &ls->ls_recover_flags);
978 set_bit(DFL_FIRST_MOUNT_DONE, &ls->ls_recover_flags);
979 memset(ls->ls_recover_submit, 0, ls->ls_recover_size*sizeof(uint32_t));
980 memset(ls->ls_recover_result, 0, ls->ls_recover_size*sizeof(uint32_t));
981 spin_unlock(&ls->ls_recover_spin);

--- 355 unchanged lines hidden ---