- Jan 24, 2008
-
-
Greg Kroah-Hartman authored
There is no need for kobject_unregister() anymore, thanks to Kay's kobject cleanup changes, so replace all instances of it with kobject_put(). Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Greg Kroah-Hartman authored
Stop using kobject_register, as this way we can control the sending of the uevent properly, after everything is properly initialized. Cc: Steven Whitehouse <swhiteho@redhat.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Greg Kroah-Hartman authored
kernel_kset does not need to be a kset, but a much simpler kobject now that we have kobj_attributes. We also rename kernel_kset to kernel_kobj to catch all users of this symbol with a build error instead of an easy-to-ignore build warning. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Greg Kroah-Hartman authored
Dynamically create the kset instead of declaring it statically. We also rename kernel_subsys to kernel_kset to catch all users of this symbol with a build error instead of an easy-to-ignore build warning. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Greg Kroah-Hartman authored
Dynamically create the kset instead of declaring it statically. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
Greg Kroah-Hartman authored
We don't need a "default" ktype for a kset. We should set this explicitly every time for each kset. This change is needed so that we can make ksets dynamic, and cleans up one of the odd, undocumented assumption that the kset/kobject/ktype model has. This patch is based on a lot of help from Kay Sievers. Nasty bug in the block code was found by Dave Young <hidave.darkstar@gmail.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Dave Young <hidave.darkstar@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
- Nov 07, 2007
-
-
David S. Miller authored
Use SO_RCVBUFFORCE instead. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Oct 19, 2007
-
-
Pavel Emelyanov authored
The task_struct->pid member is going to be deprecated, so start using the helpers (task_pid_nr/task_pid_vnr/task_pid_nr_ns) in the kernel. The first thing to start with is the pid, printed to dmesg - in this case we may safely use task_pid_nr(). Besides, printks produce more (much more) than a half of all the explicit pid usage. [akpm@linux-foundation.org: git-drm went and changed lots of stuff] Signed-off-by:
Pavel Emelyanov <xemul@openvz.org> Cc: Dave Airlie <airlied@linux.ie> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Oct 17, 2007
-
-
Jan Engelhardt authored
Changes NLS and DLM menus into a 'menuconfig' object so that it can be disabled at once without having to enter the menu first to disable the config option. Signed-off-by:
Jan Engelhardt <jengelh@gmx.de> Cc: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Oct 12, 2007
-
-
Greg Kroah-Hartman authored
A kset should not have its name set directly, so dynamically set the name at runtime. This is needed to remove the static array in the kobject structure which will be changed in a future patch. Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
-
- Oct 10, 2007
-
-
David Teigland authored
Introduce a per-lockspace rwsem that's held in read mode by dlm_recv threads while working in the dlm. This allows dlm_recv activity to be suspended when the lockspace transitions to, from and between recovery cycles. The specific bug prompting this change is one where an in-progress recovery cycle is aborted by a new recovery cycle. While dlm_recv was processing a recovery message, the recovery cycle was aborted and dlm_recoverd began cleaning up. dlm_recv decremented recover_locks_count on an rsb after dlm_recoverd had reset it to zero. This is fixed by suspending dlm_recv (taking write lock on the rwsem) before aborting the current recovery. The transitions to/from normal and recovery modes are simplified by using this new ability to block dlm_recv. The switch from normal to recovery mode means dlm_recv goes from processing locking messages, to saving them for later, and vice versa. Races are avoided by blocking dlm_recv when setting the flag that switches between modes. Signed-off-by:
David Teigland <teigland@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Patrick Caulfield authored
If the castaddr passed to the userland API is NULL then don't overwrite the existing castparam. This allows a different thread to cancel a lock request and the CANCEL AST gets delivered to the original thread. bz#306391 (for RHEL4) refers. Signed-Off-By:
Patrick Caulfield <pcaulfie@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Patrick Caulfield authored
Under high recovery loads dlm_sendd can monopolise the CPU and cause soft lockups. This one extra and one moved cond_resched() make it yield a little more during such times keeping work moving. Signed-Off-By:
Patrick Caulfield <pcaulfie@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Patrick Caulfield authored
This patch fixes the slight mess made in lowcomms closing by previous patches and fixes all sorts of DLM hangs. Signed-Off-By:
Patrick Caulfield <pcaulfie@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- Aug 14, 2007
-
-
David Teigland authored
Fix a long standing bug where a blocking callback would be missed when there's a granted lock in PR mode and waiting locks in both PR and CW modes (and the PR lock was added to the waiting queue before the CW lock). The logic simply compared the numerical values of the modes to determine if a blocking callback was required, but in the one case of PR and CW, the lower valued CW mode blocks the higher valued PR mode. We just need to add a special check for this PR/CW case in the tests that decide when a blocking callback is needed. Signed-off-by:
David Teigland <teigland@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Patrick Caulfield authored
The last patch to clean out 'othercon' structures only fixed half the problem. The attached addresses the other situations too, and fixes bz#238490 Signed-Off-By:
Patrick Caulfield <pcaulfie@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Jesper Juhl authored
There's a memory leak in fs/dlm/member.c::dlm_add_member(). If "dlm_node_weight(ls->ls_name, nodeid)" returns < 0, then we'll return without freeing the memory allocated to the (at that point yet unused) 'memb'. This patch frees the allocated memory in that case and thus avoids the leak. Signed-off-by:
Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by:
David Teigland <teigland@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Patrick Caulfield authored
When we build a sockaddr_storage for an IP address, clear the unused parts as they could be used for node comparisons. I have seen this occasionally make sctp connections fail. Signed-Off-By:
Patrick Caulfield <pcaulfie@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
David Teigland authored
Fix regression in recent patch "[DLM] variable allocation" which attempts to dereference an "ls" struct when it's NULL. Signed-off-by:
David Teigland <teigland@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Patrick Caulfield authored
This patch clears the othercon pointer and frees the memory when a connnection is closed. This could cause a small memory leak when nodes leave the cluster. Signed-Off-By:
Patrick Caulfield <pcaulfie@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
- Jul 19, 2007
-
-
Paul Mundt authored
Slab destructors were no longer supported after Christoph's c59def9f change. They've been BUGs for both slab and slub, and slob never supported them either. This rips out support for the dtor pointer from kmem_cache_create() completely and fixes up every single callsite in the kernel (there were about 224, not including the slab allocator definitions themselves, or the documentation references). Signed-off-by:
Paul Mundt <lethal@linux-sh.org>
-
Yoann Padioleau authored
Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc). Here is a short excerpt of the semantic patch performing this transformation: @@ type T2; expression x; identifier f,fld; expression E; expression E1,E2; expression e1,e2,e3,y; statement S; @@ x = - kmalloc + kzalloc (E1,E2) ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\) - memset((T2)x,0,E1); @@ expression E1,E2,E3; @@ - kzalloc(E1 * E2,E3) + kcalloc(E1,E2,E3) [akpm@linux-foundation.org: get kcalloc args the right way around] Signed-off-by:
Yoann Padioleau <padator@wanadoo.fr> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Acked-by:
Russell King <rmk@arm.linux.org.uk> Cc: Bryan Wu <bryan.wu@analog.com> Acked-by:
Jiri Slaby <jirislaby@gmail.com> Cc: Dave Airlie <airlied@linux.ie> Acked-by:
Roland Dreier <rolandd@cisco.com> Cc: Jiri Kosina <jkosina@suse.cz> Acked-by:
Dmitry Torokhov <dtor@mail.ru> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by:
Mauro Carvalho Chehab <mchehab@infradead.org> Acked-by:
Pierre Ossman <drzeus-list@drzeus.cx> Cc: Jeff Garzik <jeff@garzik.org> Cc: "David S. Miller" <davem@davemloft.net> Acked-by:
Greg KH <greg@kroah.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Jul 10, 2007
-
-
Joel Becker authored
Convert the su_sem member of struct configfs_subsystem to a struct mutex, as that's what it is. Also convert all the users and update Documentation/configfs.txt and Documentation/configfs_example.c accordingly. [ Conflict in fs/dlm/config.c with commit 3168b078 manually resolved. --Mark ] Inspired-by:
Satyam Sharma <ssatyam@cse.iitk.ac.in> Signed-off-by:
Joel Becker <joel.becker@oracle.com> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Satyam Sharma authored
Configfs being based upon sysfs code, config_group_find_obj() is probably so named because of the similar kset_find_obj() in sysfs. However, "kobject"s in sysfs become "config_item"s in configfs, so let's call it config_group_find_item() instead, for sake of uniformity, and make corresponding change in the users of this function. BTW a crucial difference between kset_find_obj and config_group_find_item is in locking expectations. kset_find_obj does its locking by itself, but config_group_find_item expects the *caller* to do the locking. The reason for this: kset's have their own locks, config_group's don't but instead rely on the subsystem mutex. And, subsystem needn't necessarily be around when config_group_find_item() is called. So let's state these locking semantics explicitly, and rectify the comment, otherwise bugs could continue to occur in future, as they did in the past (refer commit d82b8191e238 in gfs2-2.6-fixes.git). [ I also took the opportunity to fix some bad whitespace and double-empty lines. --Joel ] [ Conflict in fs/dlm/config.c with commit 3168b078 manually resolved. --Mark ] Signed-off-by:
Satyam Sharma <ssatyam@cse.iitk.ac.in> Cc: David Teigland <teigland@redhat.com> Signed-off-by:
Joel Becker <joel.becker@oracle.com> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
Satyam Sharma authored
fs/dlm/config.c contains a useful generic macro called __CONFIGFS_ATTR that is similar to sysfs' __ATTR macro that makes defining attributes easy for any user of configfs. Separate it out into configfs.h so that other users (forthcoming in dynamic netconsole patchset) can use it too. Signed-off-by:
Satyam Sharma <ssatyam@cse.iitk.ac.in> Cc: David Teigland <teigland@redhat.com> Signed-off-by:
Joel Becker <joel.becker@oracle.com> Signed-off-by:
Mark Fasheh <mark.fasheh@oracle.com>
-
- Jul 09, 2007
-
-
David Teigland authored
Add two more output fields (lkb_flags and rsb nodeid) to the new debugfs file that dumps one lock per line. Also, dump all locks instead of just mastered locks. Accordingly, use a suffix of _locks instead of _master. Signed-off-by:
David Teigland <teigland@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Andrew Morton authored
Cc: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Patrick Caulfield authored
This patch fixes Red Hat bz#245892 Opening a tcp connection from a cluster member to another cluster member targeting the dlm port it is enough to stop every dlm operation in the cluster. This means that GFS and rgmanager will hang. Signed-Off-By:
Patrick Caulfield <pcaulfie@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
David Teigland authored
Mask off the recently added DLM_LSFL_FS flag when setting the exflags. This way all the nodes in the lockspace aren't required to have the FS flag set, since we later check that exflags matches among all nodes. Signed-off-by:
Patrick Caulfield <pcaulfie@redhat.com> Signed-off-by:
David Teigland <teigland@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Patrick Caulfield authored
Add a new flag, DLM_LSFL_FS, to be used when a file system creates a lockspace. This flag causes the dlm to use GFP_NOFS for allocations instead of GFP_KERNEL. (This updated version of the patch uses gfp_t for ls_allocation.) Signed-Off-By:
Patrick Caulfield <pcaulfie@redhat.com> Signed-Off-By:
David Teigland <teigland@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Josef Bacik authored
This is a fix for the patch 021d2ff3a08019260a1dc002793c92d6bf18afb6 I left off a dlm_hold_rsb which causes the box to panic if you try to use debugfs. This patch fixes the problem. Sorry about that, Signed-off-by:
Josef Bacik <jwhiter@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Patrick Caulfield authored
This patch clears the user_data of active sockets as part of cleanup. This prevents any late-arriving data from trying to add jobs to the work queue while we are tidying up. Signed-Off-By:
Patrick Caulfield <pcaulfie@redhat.com> Signed-Off-By:
David Teigland <teigland@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
David Teigland authored
Display the initial value of the "protocol" config value in configfs. The default value has always been 0 in the past anyway, so it's always appeared to be correct. Signed-off-by:
David Teigland <teigland@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
David Teigland authored
Add a new debugfs file that dumps a compact list of mastered locks. This will be used by a userland daemon to collect state for deadlock detection. Also, for the existing function that prints all lock state, lock the rsb before going through the lock lists since they can be changing in the course of normal dlm activity. Signed-off-by:
David Teigland <teigland@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
David Teigland authored
Add a function that can be used through libdlm by a system daemon to cancel another process's deadlocked lock. A completion ast with EDEADLK is returned to the process waiting for the lock. Signed-off-by:
David Teigland <teigland@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
David Teigland authored
Various fixes related to the new timeout feature: - add_timeout() missed setting TIMEWARN flag on lkb's when the TIMEOUT flag was already set - clear_proc_locks should remove a dead process's locks from the timeout list - the end-of-life calculation for user locks needs to consider that ETIMEDOUT is equivalent to -DLM_ECANCEL - make initial default timewarn_cs config value visible in configfs - change bit position of TIMEOUT_CANCEL flag so it's not copied to a remote master node - set timestamp on remote lkb's so a lock dump will display the time they've been waiting Signed-off-by:
David Teigland <teigland@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
Steven Whitehouse authored
A one liner fix which got missed from the earlier patches. Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com> Cc: Fabio Massimo Di Nitto <fabbione@ubuntu.com> Cc: David Teigland <teigland@redhat.com>
-
David Teigland authored
In the rush to get the previous patch set sent, a compilation bug I fixed shortly before sending somehow got clobbered, probably by a missed quilt refresh or something. Signed-off-by:
David Teigland <teigland@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
David Teigland authored
Joining the lockspace should wait for the initial round of inter-node config checks to complete before returning. This way, if there's a configuration mismatch between the joining node and the existing nodes, the join can fail and return an error to the application. Signed-off-by:
David Teigland <teigland@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-
David Teigland authored
Fix the error path when exiting new_lockspace(). It was kfree'ing the lockspace struct at the end, but that's only valid if it exits before kobject_register occured. After kobject_register we have to let the kobject do the freeing. Signed-off-by:
David Teigland <teigland@redhat.com> Signed-off-by:
Steven Whitehouse <swhiteho@redhat.com>
-