- 20 10月, 2016 1 次提交
-
-
由 Paul Gortmaker 提交于
Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. In the case of some code where it is modular, we can extend that to also include files that are building basic support functionality but not related to loading or registering the final module; such files also have no need whatsoever for module.h The advantage in removing such instances is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h might have been the implicit source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each instance for the presence of either and replace as needed. In the dlm case, we remove module.h from a global header and only introduce it in the files where it is explicitly required, since there is nothing modular in dlm_internal.h itself. Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 21 6月, 2016 1 次提交
-
-
由 Zhilong Liu 提交于
This config option can be used to disable the LOG_INFO recovery messages. Signed-off-by: NZhilong Liu <zlliu@suse.com> Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 15 2月, 2014 1 次提交
-
-
由 David Teigland 提交于
The log messages relating to the progress of recovery are minimal and very often useful. Change these to the KERN_INFO level so they are always available. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 08 1月, 2013 1 次提交
-
-
由 David Teigland 提交于
Keep track of whether a toss list contains any shrinkable rsbs. If not, dlm_scand can avoid scanning the list for rsbs to shrink. Unnecessary scanning can otherwise waste a lot of time because the toss lists can contain a large number of rsbs that are non-shrinkable (directory records). Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 17 11月, 2012 1 次提交
-
-
由 David Teigland 提交于
When a node is removed that held a PW/EX lock, the existing master node should invalidate the lvb on the resource due to the purged lock. Previously, the existing master node was invalidating the lvb if it found only NL/CR locks on the resource during recovery for the removed node. This could lead to cases where it invalidated the lvb and shouldn't have, or cases where it should have invalidated and didn't. When recovery selects a *new* master node for a resource, and that new master finds only NL/CR locks on the resource after lock recovery, it should invalidate the lvb. This case was handled correctly (but was incorrectly applied to the existing master case also.) When a process exits while holding a PW/EX lock, the lvb on the resource should be invalidated. This was not happening. The lvb contents and VALNOTVALID flag should be recovered before granting locks in recovery so that the recovered lvb state is provided in the callback. The lvb was being recovered after the lock was granted. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 09 8月, 2012 1 次提交
-
-
由 David Teigland 提交于
The in_recovery rw_semaphore has always been acquired and released by different threads by design. To work around the "BUG: bad unlock balance detected!" messages, adjust things so the dlm_recoverd thread always does both down_write and up_write. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 17 7月, 2012 3 次提交
-
-
由 David Teigland 提交于
It was possible for a remove message on an old rsb to be sent after a lookup message on a new rsb, where the rsbs were for the same resource name. This could lead to a missing directory entry for the new rsb. It is fixed by keeping a copy of the resource name being removed until after the remove has been sent. A lookup checks if this in-progress remove matches the name it is looking up. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
由 David Teigland 提交于
When a large number of resources are being recovered, a linear search of the recover_list takes a long time. Use an idr in place of a list. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
由 David Teigland 提交于
Remove the dir hash table (dirtbl), and use the rsb hash table (rsbtbl) as the resource directory. It has always been an unnecessary duplication of information. This improves efficiency by using a single rsbtbl lookup in many cases where both rsbtbl and dirtbl lookups were needed previously. This eliminates the need to handle cases of rsbtbl and dirtbl being out of sync. In many cases there will be memory savings because the dir hash table no longer exists. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 03 5月, 2012 1 次提交
-
-
由 David Teigland 提交于
The "nodir" mode (statically assign master nodes instead of using the resource directory) has always been highly experimental, and never seriously used. This commit fixes a number of problems, making nodir much more usable. - Major change to recovery: recover all locks and restart all in-progress operations after recovery. In some cases it's not possible to know which in-progess locks to recover, so recover all. (Most require recovery in nodir mode anyway since rehashing changes most master nodes.) - Change the way nodir mode is enabled, from a command line mount arg passed through gfs2, into a sysfs file managed by dlm_controld, consistent with the other config settings. - Allow recovering MSTCPY locks on an rsb that has not yet been turned into a master copy. - Ignore RCOM_LOCK and RCOM_LOCK_REPLY recovery messages from a previous, aborted recovery cycle. Base this on the local recovery status not being in the state where any nodes should be sending LOCK messages for the current recovery cycle. - Hold rsb lock around dlm_purge_mstcpy_locks() because it may run concurrently with dlm_recover_master_copy(). - Maintain highbast on process-copy lkb's (in addition to the master as is usual), because the lkb can switch back and forth between being a master and being a process copy as the master node changes in recovery. - When recovering MSTCPY locks, flag rsb's that have non-empty convert or waiting queues for granting at the end of recovery. (Rename flag from LOCKS_PURGED to RECOVER_GRANT and similar for the recovery function, because it's not only resources with purged locks that need grant a grant attempt.) - Replace a couple of unnecessary assertion panics with error messages. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 27 4月, 2012 1 次提交
-
-
由 David Teigland 提交于
Unify the checking for both types of ignored rcom messages, and replace the two log_debug statements with a single, rate limited debug message. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 04 1月, 2012 2 次提交
-
-
由 David Teigland 提交于
These new callbacks notify the dlm user about lock recovery. GFS2, and possibly others, need to be aware of when the dlm will be doing lock recovery for a failed lockspace member. In the past, this coordination has been done between dlm and file system daemons in userspace, which then direct their kernel counterparts. These callbacks allow the same coordination directly, and more simply. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
由 David Teigland 提交于
Slot numbers are assigned to nodes when they join the lockspace. The slot number chosen is the minimum unused value starting at 1. Once a node is assigned a slot, that slot number will not change while the node remains a lockspace member. If the node leaves and rejoins it can be assigned a new slot number. A new generation number is also added to a lockspace. It is set and incremented during each recovery along with the slot collection/assignment. The slot numbers will be passed to gfs2 which will use them as journal id's. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 19 11月, 2011 1 次提交
-
-
由 Bob Peterson 提交于
Change the linked lists to rb_tree's in the rsb hash table to speed up searches. Slow rsb searches were having a large impact on gfs2 performance due to the large number of dlm locks gfs2 uses. Signed-off-by: NBob Peterson <rpeterso@redhat.com> Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 16 7月, 2011 1 次提交
-
-
由 David Teigland 提交于
Instead of creating our own kthread (dlm_astd) to deliver callbacks for all lockspaces, use a per-lockspace workqueue to deliver the callbacks. This eliminates complications and slowdowns from many lockspaces sharing the same thread. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 13 7月, 2011 1 次提交
-
-
由 David Teigland 提交于
By pre-allocating rsb structs before searching the hash table, they can be inserted immediately. This avoids always having to repeat the search when adding the struct to hash list. This also adds space to the rsb struct for a max resource name, so an rsb allocation can be used by any request. The constant size also allows us to finally use a slab for the rsb structs. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 11 7月, 2011 1 次提交
-
-
由 David Teigland 提交于
This is simpler and quicker than the hash table, and avoids needing to search the hash list for every new lkid to check if it's used. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 05 4月, 2011 1 次提交
-
-
由 David Teigland 提交于
kmalloc a stub message struct during recovery instead of sharing the struct in the lockspace. This leaves the lockspace stub_ms only for faking downconvert replies, where it is never modified and sharing is not a problem. Also improve the debug messages in the same recovery function. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 02 4月, 2011 1 次提交
-
-
由 David Teigland 提交于
Add an option (disabled by default) to print a warning message when a lock has been waiting a configurable amount of time for a reply message from another node. This is mainly for debugging. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 11 3月, 2011 1 次提交
-
-
由 David Teigland 提交于
Change how callbacks are recorded for locks. Previously, information about multiple callbacks was combined into a couple of variables that indicated what the end result should be. In some situations, we could not tell from this combined state what the exact sequence of callbacks were, and would end up either delivering the callbacks in the wrong order, or suppress redundant callbacks incorrectly. This new approach records all the data for each callback, leaving no uncertainty about what needs to be delivered. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 25 2月, 2010 1 次提交
-
-
由 David Teigland 提交于
When both blocking and completion callbacks are queued for lock, the dlm would always deliver the completion callback (cast) first. In some cases the blocking callback (bast) is queued before the cast, though, and should be delivered first. This patch keeps track of the order in which they were queued and delivers them in that order. This patch also keeps track of the granted mode in the last cast and eliminates the following bast if the bast mode is compatible with the preceding cast mode. This happens when a remotely mastered lock is demoted, e.g. EX->NL, in which case the local node queues a cast immediately after sending the demote message. In this way a cast can be queued for a mode, e.g. NL, that makes an in-transit bast extraneous. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 01 12月, 2009 1 次提交
-
-
由 David Teigland 提交于
Replace all GFP_KERNEL and ls_allocation with GFP_NOFS. ls_allocation would be GFP_KERNEL for userland lockspaces and GFP_NOFS for file system lockspaces. It was discovered that any lockspaces on the system can affect all others by triggering memory reclaim in the file system which could in turn call back into the dlm to acquire locks, deadlocking dlm threads that were shared by all lockspaces, like dlm_recv. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 29 1月, 2009 1 次提交
-
-
由 Steven Whitehouse 提交于
The ls_dirtbl[].lock was an rwlock, but since it was only used in write mode a spinlock will suffice. Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com> Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 09 1月, 2009 1 次提交
-
-
由 David Teigland 提交于
The rwlock is almost always used in write mode, so there's no reason to not use a spinlock instead. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 24 12月, 2008 3 次提交
-
-
由 David Teigland 提交于
The new debugfs entry dumps all rsb and lkb structures, and includes a lot more information than has been available before. This includes the new timestamps added by a previous patch for debugging callback issues. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
由 David Teigland 提交于
Record the time the latest blocking callback was queued for a lock. This will be used for debugging in combination with lock queue timestamp changes in the previous patch. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
由 David Teigland 提交于
Use ktime instead of jiffies for timestamping lkb's. Also stamp the time on every lkb whenever it's added to a resource queue, instead of just stamping locks subject to timeouts. This will allow us to use timestamps more widely for debugging all locks. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 29 8月, 2008 2 次提交
-
-
由 David Teigland 提交于
The dlm_scand thread needs to lock the list of lockspaces when going through it. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
由 David Teigland 提交于
Add a count for lockspace create and release so that create can be called multiple times to use the lockspace from different places. Also add the new flag DLM_LSFL_NEWEXCL to create a lockspace with the previous behavior of returning -EEXIST if the lockspace already exists. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 22 4月, 2008 3 次提交
-
-
由 David Teigland 提交于
Add central definitions for max lockspace name length and max resource name length. The lack of central definitions has resulted in scattered private definitions which we can now clean up, including an unused one in dlm_device.h. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
由 David Teigland 提交于
Move the code that handles cluster posix locks from gfs2 into the dlm so that it can be used by both gfs2 and ocfs2. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
由 David Teigland 提交于
If a node is removed from a lockspace, and then added back before the dlm is notified of the removal, the dlm will not detect the removal and won't clear the old state from the node. This is fixed by using a list of added nodes so the membership recovery can detect when a newly added node is already in the member list. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 19 4月, 2008 1 次提交
-
-
由 Matthew Wilcox 提交于
None of these files use any of the functionality promised by asm/semaphore.h. Signed-off-by: NMatthew Wilcox <willy@linux.intel.com>
-
- 07 2月, 2008 1 次提交
-
-
由 David Teigland 提交于
Put lkb_astparam in a union with a dlm_user_args pointer to eliminate a lot of type casting. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 06 2月, 2008 1 次提交
-
-
由 David Teigland 提交于
Use proper types for ast and bast functions, and use consistent type for ast param. Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 04 2月, 2008 4 次提交
-
-
由 Al Viro 提交于
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk> Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
由 Al Viro 提交于
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk> Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
由 Al Viro 提交于
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk> Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
由 Al Viro 提交于
* check that length is large enough to cover the non-variable part of message or rcom resp. (after checking that it's large enough to cover the header, of course). * kill more pointless casts Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk> Signed-off-by: NDavid Teigland <teigland@redhat.com>
-
- 30 1月, 2008 1 次提交
-
-
由 Adrian Bunk 提交于
This patch adds a proper prototype for some functions in fs/dlm/dlm_internal.h Signed-off-by: NAdrian Bunk <bunk@kernel.org> Signed-off-by: NDavid Teigland <teigland@redhat.com>
-