07 Jun, 2014
1 commit
-
Replace obsolete functions.
Signed-off-by: Fabian Frederick
Cc: Christine Caulfield
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Feb, 2014
1 commit
-
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: David Teigland
16 Oct, 2013
1 commit
-
When dlm_release_lockspace(ls, 1) is invoked on a busy system
immediately after the last dlm_unlock() AST has finished it can occur
that lkb_idr_is_local() is invoked for the unlocked LKB since removal
from ls_lkbidr only occurs after the AST has returned. If that happens
dlm_release_lockspace(ls, 1) will return -EBUSY instead of releasing
the lockspace. Fix this race condition by changing lkb_idr_is_local()
such that it only returns true for LKB's that have not yet been
unlocked.Signed-off-by: Bart Van Assche
Signed-off-by: David Teigland
26 Jun, 2013
1 commit
-
Log an error message if the dlm user daemon exits
before all the lockspaces have been removed.Signed-off-by: David Teigland
28 Feb, 2013
1 commit
-
idr_destroy() can destroy idr by itself and idr_remove_all() is being
deprecated.The conversion isn't completely trivial for recover_idr_clear() as it's
the only place in kernel which makes legitimate use of idr_remove_all()
w/o idr_destroy(). Replace it with idr_remove() call inside
idr_for_each_entry() loop. It goes on top so that it matches the
operation order in recover_idr_del().Signed-off-by: Tejun Heo
Cc: Christine Caulfield
Cc: David Teigland
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Aug, 2012
1 commit
-
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: David Teigland
17 Jul, 2012
3 commits
-
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: 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: 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: David Teigland
03 May, 2012
1 commit
-
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: David Teigland
04 Jan, 2012
2 commits
-
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: 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: David Teigland
19 Nov, 2011
1 commit
-
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: Bob Peterson
Signed-off-by: David Teigland
16 Jul, 2011
1 commit
-
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: David Teigland
13 Jul, 2011
1 commit
-
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: David Teigland
11 Jul, 2011
1 commit
-
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: David Teigland
02 Jul, 2011
1 commit
-
Allocate dlm hash tables in the vmalloc area to allow a greater
maximum size without restructuring of the hash table code.Signed-off-by: Bryn M. Reeves
Signed-off-by: David Teigland
02 Apr, 2011
1 commit
-
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: David Teigland
08 Mar, 2010
1 commit
-
Constify struct sysfs_ops.
This is part of the ops structure constification
effort started by Arjan van de Ven et al.Benefits of this constification:
* prevents modification of data that is shared
(referenced) by many other structure instances
at runtime* detects/prevents accidental (but not intentional)
modification attempts on archs that enforce
read-only kernel data at runtime* potentially better optimized code as the compiler
can assume that the const data cannot be changed* the compiler/linker move const data into .rodata
and therefore exclude them from false sharingSigned-off-by: Emese Revfy
Acked-by: David Teigland
Acked-by: Matt Domsch
Acked-by: Maciej Sosnowski
Acked-by: Hans J. Koch
Acked-by: Pekka Enberg
Acked-by: Jens Axboe
Acked-by: Stephen Hemminger
Signed-off-by: Greg Kroah-Hartman
27 Feb, 2010
1 commit
-
Although it is possible to get this information from the path,
its much easier to provide the lockspace as a seperate env
variable.Signed-off-by: Steven Whitehouse
Signed-off-by: David Teigland
01 Dec, 2009
1 commit
-
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: David Teigland
07 May, 2009
2 commits
-
When a lockspace was joined multiple times, the global dlm
use count was incremented when it should not have been. This
caused the global dlm threads to not be stopped when all
lockspaces were eventually be removed.Signed-off-by: David Teigland
-
| fs/gfs2/lock_dlm.c:207: warning: passing argument 1 of 'dlm_new_lockspace' discards qualifiers from pointer target type
Signed-off-by: Geert Uytterhoeven
Signed-off-by: David Teigland
29 Jan, 2009
1 commit
-
The ls_dirtbl[].lock was an rwlock, but since it was only used in write
mode a spinlock will suffice.Signed-off-by: Steven Whitehouse
Signed-off-by: David Teigland
09 Jan, 2009
1 commit
-
The rwlock is almost always used in write mode, so there's no reason
to not use a spinlock instead.Signed-off-by: David Teigland
14 Nov, 2008
1 commit
-
Fixes a regression from commit 0f8e0d9a317406612700426fad3efab0b7bbc467,
"dlm: allow multiple lockspace creates".An extraneous 'else' slipped into a code fragment being moved from
release_lockspace() to dlm_release_lockspace(). The result of the
unwanted 'else' is that dlm threads and structures are not stopped
and cleaned up when the final dlm lockspace is removed. Trying to
create a new lockspace again afterward will fail with
"kmem_cache_create: duplicate cache dlm_conn" because the cache
was not previously destroyed.Signed-off-by: David Teigland
29 Aug, 2008
3 commits
-
The dlm_scand thread needs to lock the list of lockspaces
when going through it.Signed-off-by: David Teigland
-
If dlm_controld (the userspace daemon that controls the setup and
recovery of the dlm) fails, the kernel should shut down the lockspaces
in the kernel rather than leaving them running. This is detected by
having dlm_controld hold a misc device open while running, and if
the kernel detects a close while the daemon is still needed, it stops
the lockspaces in the kernel.Knowing that the userspace daemon isn't running also allows the
lockspace create/remove routines to avoid waiting on the daemon
for join/leave operations.Signed-off-by: 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: David Teigland
30 Apr, 2008
1 commit
-
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 Feb, 2008
1 commit
-
it moves 365 bytes from .text to .init.text, and 30 bytes from .text to
.exit.text, saves memory.Signed-off-by: Denis Cheng
Signed-off-by: David Teigland
30 Jan, 2008
2 commits
-
The dlm functions in memory.c should use the dlm_ prefix. Also, use
kzalloc/kfree directly for dlm_direntry's, removing the wrapper functions.Signed-off-by: David Teigland
-
This patch adds a proper prototype for some functions in
fs/dlm/dlm_internal.hSigned-off-by: Adrian Bunk
Signed-off-by: David Teigland
25 Jan, 2008
6 commits
-
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
Signed-off-by: Greg Kroah-Hartman -
Stop using kobject_register, as this way we can control the sending of
the uevent properly, after everything is properly initialized.Cc: Steven Whitehouse
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman -
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
Signed-off-by: Greg Kroah-Hartman -
Dynamically create the kset instead of declaring it statically.
Cc: Kay Sievers
Cc: Steven Whitehouse
Signed-off-by: Greg Kroah-Hartman -
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
Cc: Kay Sievers
Cc: Dave Young
Signed-off-by: Greg Kroah-Hartman
13 Oct, 2007
1 commit
-
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (75 commits)
PM: merge device power-management source files
sysfs: add copyrights
kobject: update the copyrights
kset: add some kerneldoc to help describe what these strange things are
Driver core: rename ktype_edd and ktype_efivar
Driver core: rename ktype_driver
Driver core: rename ktype_device
Driver core: rename ktype_class
driver core: remove subsystem_init()
sysfs: move sysfs file poll implementation to sysfs_open_dirent
sysfs: implement sysfs_open_dirent
sysfs: move sysfs_dirent->s_children into sysfs_dirent->s_dir
sysfs: make sysfs_root a regular directory dirent
sysfs: open code sysfs_attach_dentry()
sysfs: make s_elem an anonymous union
sysfs: make bin attr open get active reference of parent too
sysfs: kill unnecessary NULL pointer check in sysfs_release()
sysfs: kill unnecessary sysfs_get() in open paths
sysfs: reposition sysfs_dirent->s_mode.
sysfs: kill sysfs_update_file()
...