Skip to content

Commit 6101167

Browse files
committed
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
2 parents 6133308 + 75af271 commit 6101167

16 files changed

Lines changed: 538 additions & 298 deletions

File tree

‎fs/dlm/ast.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ void dlm_callback_resume(struct dlm_ls *ls)
310310
}
311311
mutex_unlock(&ls->ls_cb_mutex);
312312

313-
log_debug(ls, "dlm_callback_resume %d", count);
313+
if (count)
314+
log_debug(ls, "dlm_callback_resume %d", count);
314315
}
315316

‎fs/dlm/dlm_internal.h‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include <linux/miscdevice.h>
3939
#include <linux/mutex.h>
4040
#include <linux/idr.h>
41+
#include <linux/ratelimit.h>
4142
#include <asm/uaccess.h>
4243

4344
#include <linux/dlm.h>
@@ -74,6 +75,13 @@ do { \
7475
(ls)->ls_name , ##args); \
7576
} while (0)
7677

78+
#define log_limit(ls, fmt, args...) \
79+
do { \
80+
if (dlm_config.ci_log_debug) \
81+
printk_ratelimited(KERN_DEBUG "dlm: %s: " fmt "\n", \
82+
(ls)->ls_name , ##args); \
83+
} while (0)
84+
7785
#define DLM_ASSERT(x, do) \
7886
{ \
7987
if (!(x)) \
@@ -263,6 +271,8 @@ struct dlm_lkb {
263271
ktime_t lkb_last_cast_time; /* for debugging */
264272
ktime_t lkb_last_bast_time; /* for debugging */
265273

274+
uint64_t lkb_recover_seq; /* from ls_recover_seq */
275+
266276
char *lkb_lvbptr;
267277
struct dlm_lksb *lkb_lksb; /* caller's status block */
268278
void (*lkb_astfn) (void *astparam);
@@ -317,7 +327,7 @@ enum rsb_flags {
317327
RSB_NEW_MASTER,
318328
RSB_NEW_MASTER2,
319329
RSB_RECOVER_CONVERT,
320-
RSB_LOCKS_PURGED,
330+
RSB_RECOVER_GRANT,
321331
};
322332

323333
static inline void rsb_set_flag(struct dlm_rsb *r, enum rsb_flags flag)
@@ -563,6 +573,7 @@ struct dlm_ls {
563573
struct mutex ls_requestqueue_mutex;
564574
struct dlm_rcom *ls_recover_buf;
565575
int ls_recover_nodeid; /* for debugging */
576+
unsigned int ls_recover_locks_in; /* for log info */
566577
uint64_t ls_rcom_seq;
567578
spinlock_t ls_rcom_spin;
568579
struct list_head ls_recover_list;
@@ -589,6 +600,7 @@ struct dlm_ls {
589600
#define LSFL_UEVENT_WAIT 5
590601
#define LSFL_TIMEWARN 6
591602
#define LSFL_CB_DELAY 7
603+
#define LSFL_NODIR 8
592604

593605
/* much of this is just saving user space pointers associated with the
594606
lock that we pass back to the user lib with an ast */
@@ -636,7 +648,7 @@ static inline int dlm_recovery_stopped(struct dlm_ls *ls)
636648

637649
static inline int dlm_no_directory(struct dlm_ls *ls)
638650
{
639-
return (ls->ls_exflags & DLM_LSFL_NODIR) ? 1 : 0;
651+
return test_bit(LSFL_NODIR, &ls->ls_flags);
640652
}
641653

642654
int dlm_netlink_init(void);

0 commit comments

Comments
 (0)