aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ocfs2/dlm/dlmrecovery.c46
1 files changed, 38 insertions, 8 deletions
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index 9d67894cda6d..cfb2ae9ab538 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -1750,6 +1750,7 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm,
1750 struct dlm_lock *lock = NULL; 1750 struct dlm_lock *lock = NULL;
1751 u8 from = O2NM_MAX_NODES; 1751 u8 from = O2NM_MAX_NODES;
1752 unsigned int added = 0; 1752 unsigned int added = 0;
1753 __be64 c;
1753 1754
1754 mlog(0, "running %d locks for this lockres\n", mres->num_locks); 1755 mlog(0, "running %d locks for this lockres\n", mres->num_locks);
1755 for (i=0; i<mres->num_locks; i++) { 1756 for (i=0; i<mres->num_locks; i++) {
@@ -1797,19 +1798,48 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm,
1797 /* lock is always created locally first, and 1798 /* lock is always created locally first, and
1798 * destroyed locally last. it must be on the list */ 1799 * destroyed locally last. it must be on the list */
1799 if (!lock) { 1800 if (!lock) {
1800 __be64 c = ml->cookie; 1801 c = ml->cookie;
1801 mlog(ML_ERROR, "could not find local lock " 1802 mlog(ML_ERROR, "Could not find local lock "
1802 "with cookie %u:%llu!\n", 1803 "with cookie %u:%llu, node %u, "
1804 "list %u, flags 0x%x, type %d, "
1805 "conv %d, highest blocked %d\n",
1803 dlm_get_lock_cookie_node(be64_to_cpu(c)), 1806 dlm_get_lock_cookie_node(be64_to_cpu(c)),
1804 dlm_get_lock_cookie_seq(be64_to_cpu(c))); 1807 dlm_get_lock_cookie_seq(be64_to_cpu(c)),
1808 ml->node, ml->list, ml->flags, ml->type,
1809 ml->convert_type, ml->highest_blocked);
1810 __dlm_print_one_lock_resource(res);
1811 BUG();
1812 }
1813
1814 if (lock->ml.node != ml->node) {
1815 c = lock->ml.cookie;
1816 mlog(ML_ERROR, "Mismatched node# in lock "
1817 "cookie %u:%llu, name %.*s, node %u\n",
1818 dlm_get_lock_cookie_node(be64_to_cpu(c)),
1819 dlm_get_lock_cookie_seq(be64_to_cpu(c)),
1820 res->lockname.len, res->lockname.name,
1821 lock->ml.node);
1822 c = ml->cookie;
1823 mlog(ML_ERROR, "Migrate lock cookie %u:%llu, "
1824 "node %u, list %u, flags 0x%x, type %d, "
1825 "conv %d, highest blocked %d\n",
1826 dlm_get_lock_cookie_node(be64_to_cpu(c)),
1827 dlm_get_lock_cookie_seq(be64_to_cpu(c)),
1828 ml->node, ml->list, ml->flags, ml->type,
1829 ml->convert_type, ml->highest_blocked);
1805 __dlm_print_one_lock_resource(res); 1830 __dlm_print_one_lock_resource(res);
1806 BUG(); 1831 BUG();
1807 } 1832 }
1808 BUG_ON(lock->ml.node != ml->node);
1809 1833
1810 if (tmpq != queue) { 1834 if (tmpq != queue) {
1811 mlog(0, "lock was on %u instead of %u for %.*s\n", 1835 c = ml->cookie;
1812 j, ml->list, res->lockname.len, res->lockname.name); 1836 mlog(0, "Lock cookie %u:%llu was on list %u "
1837 "instead of list %u for %.*s\n",
1838 dlm_get_lock_cookie_node(be64_to_cpu(c)),
1839 dlm_get_lock_cookie_seq(be64_to_cpu(c)),
1840 j, ml->list, res->lockname.len,
1841 res->lockname.name);
1842 __dlm_print_one_lock_resource(res);
1813 spin_unlock(&res->spinlock); 1843 spin_unlock(&res->spinlock);
1814 continue; 1844 continue;
1815 } 1845 }
@@ -1906,7 +1936,7 @@ skip_lvb:
1906 spin_lock(&res->spinlock); 1936 spin_lock(&res->spinlock);
1907 list_for_each_entry(lock, queue, list) { 1937 list_for_each_entry(lock, queue, list) {
1908 if (lock->ml.cookie == ml->cookie) { 1938 if (lock->ml.cookie == ml->cookie) {
1909 __be64 c = lock->ml.cookie; 1939 c = lock->ml.cookie;
1910 mlog(ML_ERROR, "%s:%.*s: %u:%llu: lock already " 1940 mlog(ML_ERROR, "%s:%.*s: %u:%llu: lock already "
1911 "exists on this lockres!\n", dlm->name, 1941 "exists on this lockres!\n", dlm->name,
1912 res->lockname.len, res->lockname.name, 1942 res->lockname.len, res->lockname.name,