01 May, 2008
6 commits
-
kmalloc() during a localalloc window move can trigger the mm to prune
the dcache which inturn can trigger the fs to delete an inode causing
it start a recursive transaction.The fix also makes the change in kmalloc during localalloc shutdown
just to be safe.Fixes oss bugzilla#901
http://oss.oracle.com/bugzilla/show_bug.cgi?id=901Signed-off-by: Sunil Mushran
Signed-off-by: Mark Fasheh -
This patch adds the ability to change attributes of a symlink.
Fixes oss bugzilla#963
http://oss.oracle.com/bugzilla/show_bug.cgi?id=963Signed-off-by: Sunil Mushran
Signed-off-by: Mark Fasheh -
This patch makes the following needlessly global functions static:
- stringify_lockname()
- dlm_debug_put()Signed-off-by: Adrian Bunk
Acked-by: Sunil Mushran
Signed-off-by: Mark Fasheh -
This patch makes the needlessly global struct o2cb_stack_ops static.
Signed-off-by: Adrian Bunk
Acked-by: Joel Becker
Signed-off-by: Mark Fasheh -
This patch makes the needlessly global struct ocfs2_control_device
static.Signed-off-by: Adrian Bunk
Acked-by: Joel Becker
Signed-off-by: Mark Fasheh -
Commit 52f7c21b613f80cb425d115c9e5b4ed958a133c0 was intended to move
/sys/o2cb to /sys/fs/o2cb, providing /sys/o2cb as a symlink for
backwards compatibility. However, the merge apparently added the
symlink but failed to move the directory, resulting in a duplicate
filename error. It's a one-line change that was missing.Signed-off-by: Joel Becker
Acked-by: Randy Dunlap
Signed-off-by: Mark Fasheh
30 Apr, 2008
1 commit
-
Add a new BDI capability flag: BDI_CAP_NO_ACCT_WB. If this flag is
set, then don't update the per-bdi writeback stats from
test_set_page_writeback() and test_clear_page_writeback().Misc cleanups:
- convert bdi_cap_writeback_dirty() and friends to static inline functions
- create a flag that includes all three dirty/writeback related flags,
since almst all users will want to have them toghetherSigned-off-by: Miklos Szeredi
Cc: Peter Zijlstra
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
19 Apr, 2008
1 commit
-
Some ioctl()s can cause writes to the filesystem. Take these, and make them
use mnt_want/drop_write() instead.[AV: updated]
Acked-by: Al Viro
Signed-off-by: Christoph Hellwig
Signed-off-by: Dave Hansen
Signed-off-by: Andrew Morton
Signed-off-by: Al Viro
18 Apr, 2008
32 commits
-
This patch exposes o2net information via debugfs. The information includes
the list of sockets (sock_containers) as well as the list of outstanding
messages (send_tracking). Useful for o2dlm debugging.(This patch is derived from an earlier one written by Zach Brown that
exposed the same information via /proc.)[Mark: checkpatch fixes]
Signed-off-by: Sunil Mushran
Reviewed-by: Joel Becker
Signed-off-by: Mark Fasheh -
fs/ocfs2/dlm/ocfs2_dlm.ko and fs/ocfs2/dlm/ocfs2_dlmfs.ko get built if
CONFIG_FS_OCFS2 is specified. This isn't quite how it should happen any more
- the "o2cb" dlm modules should only be built if CONFIG_FS_OCFS2_O2CB is
set, so update the dlm Makefile accordingly.Signed-off-by: Mark Fasheh
Acked-by: Randy Dunlap
Acked-by: Joel Becker -
We keep seeing bug reports related to NULL pointer derefs in
o2net_set_nn_state(). When I originally wrote up the configurable timeout
patch, I had tried to plan for multiple clusters. This was silly.The timeout routines all use o2nm_single_cluster so there's no point in
passing an argument at all. This patch removes the arguments and kills those
bugs dead.Signed-off-by: Jeff Mahoney
Signed-off-by: Mark Fasheh -
if (...) BUG(); should be replaced with BUG_ON(...) when the test has no
side-effects to allow a definition of BUG_ON that drops the code completely.The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)//
@ disable unlikely @ expression E,f; @@(
if () { BUG(); }
|
- if (unlikely(E)) { BUG(); }
+ BUG_ON(E);
)@@ expression E,f; @@
(
if () { BUG(); }
|
- if (E) { BUG(); }
+ BUG_ON(E);
)
//Signed-off-by: Julia Lawall
Signed-off-by: Andrew Morton
Signed-off-by: Mark Fasheh -
As far as I can see there is nothing in ocfs2_ioctl that requires the BKL,
so use unlocked_ioctlSigned-off-by: Andi Kleen
Signed-off-by: Mark Fasheh -
ocfs2_rename() was being too aggressive with the rename lock - we only need
it for certain forms of directory rename.Signed-off-by: Jan Kara
Signed-off-by: Mark Fasheh -
The function ocfs2_start_trans always returns either a valid pointer or a
value made with ERR_PTR, so its result should be tested with IS_ERR, not
with a test for 0.Signed-off-by: Julia Lawall
Signed-off-by: Andrew Morton
Signed-off-by: Mark Fasheh -
Inode allocation is modified to look in other nodes allocators during
extreme out of space situations. We retry our own slot when space is freed
back to the global bitmap, or whenever we've allocated more than 1024 inodes
from another slot.Signed-off-by: Tao Ma
Signed-off-by: Mark Fasheh -
In inode stealing, we no longer restrict the allocation to
happen in the local node. So it is neccessary for us to add
a new member in ocfs2_alloc_context to indicate which slot
we are using for allocation. We also modify the process of
local alloc so that this member can be used there also.Signed-off-by: Tao Ma
Signed-off-by: Sunil Mushran
Signed-off-by: Mark Fasheh -
In some cases(Inode stealing from other nodes), we may not want
ocfs2_reserve_suballoc_bits to allocate new groups from the
global_bitmap since it may already be full. So add a new parameter
for this.Signed-off-by: Tao Ma
Signed-off-by: Sunil Mushran
Signed-off-by: Mark Fasheh -
In ocfs2_figure_merge_contig_type, we judge whether there exists
a cross extent block merge and enable it by setting CONTIG_LEFT
and CONTIG_RIGHT accordingly.Signed-off-by: Tao Ma
Signed-off-by: Mark Fasheh -
In ocfs2_merge_rec_left, when we find the merge extent is "CONTIG_RIGHT"
with the first extent record of the next extent block, we will merge it to
the next extent block and change all the related extent blocks accordingly.In ocfs2_merge_rec_right, when we find the merge extent is "CONTIG_LEFT"
with the last extent record of the previous extent block, we will merge
it to the prevoius extent block and change all the related extent blocks
accordingly.As for CONTIG_LEFTRIGHT, we will handle CONTIG_RIGHT first so that when
the index is zero, the merge process will be more efficient and easier.Signed-off-by: Tao Ma
Signed-off-by: Mark Fasheh -
/sys/fs is where we really want file system specific sysfs objects.
Ocfs2-tools has been updated to look in /sys/fs/o2cb. We can maintain
backwards compatibility with old ocfs2-tools by using a sysfs symlink. After
some time (2 years), the symlink can be safely removed. This patch also adds
documentation to make it easier for people to figure out what /sys/fs/o2cb
is used for.Signed-off-by: Mark Fasheh
-
Currently, o2net connects to a node on hb_up and disconnects on
hb_down and net timeout.It disconnects on net timeout is ok, but it should attempt to
reconnect back. This is because sometimes nodes get overloaded
enough that the network connection breaks but the disk hb does not.
And if we get into that situation, we either fence (unnecessarily)
or wait for its disk hb to die (and sometimes hang in the process).So in this updated scheme, when the network disconnects, we keep
attempting to reconnect till we succeed or we get a disk hb down
event.If the other node is really dead, then we will eventually get a
node down event. If not, we should be able to connect again and
continue.Signed-off-by: Tao Ma
Signed-off-by: Mark Fasheh -
A previous patch added KERN_NOTICE to printks printing the lockres that
cluttered the output. This patch removes the log level. For people concerned
with syslog clutter, please note we now use this facility to print lockres
only during an error.Signed-off-by: Sunil Mushran
Signed-off-by: Mark Fasheh -
__dlm_print_one_lock_resource was printing lockname incorrectly.
Also, we now use printk directly instead of mlog as the latter prints
the line context which is not useful for this print.Signed-off-by: Sunil Mushran
Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
This patch helps in consolidating debugging related functions in dlmdebug.c.
Signed-off-by: Sunil Mushran
Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
This patch dumps all the lockres' on the purgelist it can fit in one page
into a debugfs file. Useful for debugging.Signed-off-by: Sunil Mushran
Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
This patch dumps all mles it can fit in one page into a debugfs file.
Useful for debugging.Signed-off-by: Sunil Mushran
Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
This patch moves some mle related definitions from dlmmaster.c
to dlmcommon.h. Future patches need these definitions to dump mle
debugging information.Signed-off-by: Sunil Mushran
Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
This patch dumps all the lockres' alongwith all the locks into
a debugfs file. Useful for debugging.Signed-off-by: Sunil Mushran
Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
This patch dumps the dlm state (dlm_ctxt) into a debugfs file.
Useful for debugging.Signed-off-by: Sunil Mushran
Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
This patch creates the debugfs directories that will hold the
files to be used to dump the dlm state.Signed-off-by: Sunil Mushran
Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
This patch links all the lockres' to a tracking list in dlm_ctxt.
We will use this in an upcoming patch that will walk the entire
list and to dump the lockres states to a debugfs file.Signed-off-by: Sunil Mushran
Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
This patch makes the o2dlm allocate memory for lockres, lockname and lock
structures from slabcaches rather than kmalloc. This allows us to not only
make these allocs more efficient but also allows us to track the memory being
consumed by these structures.Signed-off-by: Sunil Mushran
Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
This patch renames dlm_mle_slabcache to prevent namespace clashes with fs/dlm.
Signed-off-by: Sunil Mushran
Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
ocfs2 now supports plug-ins for the classic O2CB stack as well as
userspace cluster stacks in conjunction with fs/dlm. This allows zero,
one, or both of the plug-ins to be selected in Kconfig. For local mounts
(non-clustered), neither plug-in is needed. Both plugins can be loaded
at one time, the runtime will select the one needed for the cluster
systme in use.Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
Add ocfs2_stack_user.ko to the Makefile so that it builds.
Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
The masklog code is in the o2cb stack, but ocfs2_lockid.h now needs to
be included by the user stack. The BUG() in ocfs2_lock_type_string()
does not need masklog support, so change it to a regular BUG_ON().Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
Add code to use fs/dlm.
[ Modified to be part of the stack_user module -- Joel ]
Signed-off-by: David Teigland
Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
The "SETV" message sets the filesystem locking protocol version as
negotiated by the client. The client negotiates based on the maximum
version advertised in /sys/fs/ocfs2/max_locking_protocol.Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh -
This is the second part of the ocfs2_control handshake. After
negotiating the ocfs2_control protocol, the daemon tells the filesystem
what the local node id is via the SETN message.Signed-off-by: Joel Becker
Signed-off-by: Mark Fasheh