aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-22 22:31:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-22 22:31:38 -0400
commit6101167727932a929e37fb8a6eeb68bdbf54d58e (patch)
treeda3e9c8244f86082c6ea4d150f7fa653a7843192 /fs/gfs2
parent6133308ad1a386e7e7f776003a1c44e8b54e2166 (diff)
parent75af271ed5f51b1f3506c7c1d567b1f32e5c9206 (diff)
Merge tag 'dlm-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm
Pull dlm updates from David Teigland: "This set includes some minor fixes and improvements. The one large patch addresses the special "nodir" mode, which has been a long neglected proof of concept, but with these fixes seems to be quite usable. It allows the resource master to be assigned statically instead of dynamically, which can improve performance if there is little locality and most resources are shared." * tag 'dlm-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: dlm: NULL dereference on failure in kmem_cache_create() gfs2: fix recovery during unmount dlm: fixes for nodir mode dlm: improve error and debug messages dlm: avoid unnecessary search in search_rsb dlm: limit rcom debug messages dlm: fix waiter recovery dlm: prevent connections during shutdown
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/incore.h1
-rw-r--r--fs/gfs2/lock_dlm.c2
-rw-r--r--fs/gfs2/ops_fstype.c7
-rw-r--r--fs/gfs2/sys.c10
4 files changed, 7 insertions, 13 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index aa9949e5de26..67fd6beffece 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -543,7 +543,6 @@ struct gfs2_sb_host {
543struct lm_lockstruct { 543struct lm_lockstruct {
544 int ls_jid; 544 int ls_jid;
545 unsigned int ls_first; 545 unsigned int ls_first;
546 unsigned int ls_nodir;
547 const struct lm_lockops *ls_ops; 546 const struct lm_lockops *ls_ops;
548 dlm_lockspace_t *ls_dlm; 547 dlm_lockspace_t *ls_dlm;
549 548
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c
index 5f5e70e047dc..4a38db739ca0 100644
--- a/fs/gfs2/lock_dlm.c
+++ b/fs/gfs2/lock_dlm.c
@@ -1209,8 +1209,6 @@ static int gdlm_mount(struct gfs2_sbd *sdp, const char *table)
1209 fsname++; 1209 fsname++;
1210 1210
1211 flags = DLM_LSFL_FS | DLM_LSFL_NEWEXCL; 1211 flags = DLM_LSFL_FS | DLM_LSFL_NEWEXCL;
1212 if (ls->ls_nodir)
1213 flags |= DLM_LSFL_NODIR;
1214 1212
1215 /* 1213 /*
1216 * create/join lockspace 1214 * create/join lockspace
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index c5871ae40561..b8c250fc4922 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -993,6 +993,7 @@ static int gfs2_lm_mount(struct gfs2_sbd *sdp, int silent)
993 ls->ls_jid = option; 993 ls->ls_jid = option;
994 break; 994 break;
995 case Opt_id: 995 case Opt_id:
996 case Opt_nodir:
996 /* Obsolete, but left for backward compat purposes */ 997 /* Obsolete, but left for backward compat purposes */
997 break; 998 break;
998 case Opt_first: 999 case Opt_first:
@@ -1001,12 +1002,6 @@ static int gfs2_lm_mount(struct gfs2_sbd *sdp, int silent)
1001 goto hostdata_error; 1002 goto hostdata_error;
1002 ls->ls_first = option; 1003 ls->ls_first = option;
1003 break; 1004 break;
1004 case Opt_nodir:
1005 ret = match_int(&tmp[0], &option);
1006 if (ret || (option != 0 && option != 1))
1007 goto hostdata_error;
1008 ls->ls_nodir = option;
1009 break;
1010 case Opt_err: 1005 case Opt_err:
1011 default: 1006 default:
1012hostdata_error: 1007hostdata_error:
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c
index d33172c291ba..9c2592b1d5ff 100644
--- a/fs/gfs2/sys.c
+++ b/fs/gfs2/sys.c
@@ -368,10 +368,7 @@ int gfs2_recover_set(struct gfs2_sbd *sdp, unsigned jid)
368 struct gfs2_jdesc *jd; 368 struct gfs2_jdesc *jd;
369 int rv; 369 int rv;
370 370
371 rv = -ESHUTDOWN;
372 spin_lock(&sdp->sd_jindex_spin); 371 spin_lock(&sdp->sd_jindex_spin);
373 if (test_bit(SDF_NORECOVERY, &sdp->sd_flags))
374 goto out;
375 rv = -EBUSY; 372 rv = -EBUSY;
376 if (sdp->sd_jdesc->jd_jid == jid) 373 if (sdp->sd_jdesc->jd_jid == jid)
377 goto out; 374 goto out;
@@ -396,8 +393,13 @@ static ssize_t recover_store(struct gfs2_sbd *sdp, const char *buf, size_t len)
396 if (rv != 1) 393 if (rv != 1)
397 return -EINVAL; 394 return -EINVAL;
398 395
399 rv = gfs2_recover_set(sdp, jid); 396 if (test_bit(SDF_NORECOVERY, &sdp->sd_flags)) {
397 rv = -ESHUTDOWN;
398 goto out;
399 }
400 400
401 rv = gfs2_recover_set(sdp, jid);
402out:
401 return rv ? rv : len; 403 return rv ? rv : len;
402} 404}
403 405