25 Jul, 2011

3 commits


16 Dec, 2010

1 commit


08 Aug, 2010

2 commits

  • In the following situation, there remains an incorrect bit in refmap on the
    recovery master. Finally the recovery master will fail at purging the lockres
    due to the incorrect bit in refmap.

    1) node A has no interest on lockres A any longer, so it is purging it.
    2) the owner of lockres A is node B, so node A is sending de-ref message
    to node B.
    3) at this time, node B crashed. node C becomes the recovery master. it recovers
    lockres A(because the master is the dead node B).
    4) node A migrated lockres A to node C with a refbit there.
    5) node A failed to send de-ref message to node B because it crashed. The failure
    is ignored. no other action is done for lockres A any more.

    For mormal, re-send the deref message to it to recovery master can fix it. Well,
    ignoring the failure of deref to the original master and not recovering the lockres
    to recovery master has the same effect. And the later is simpler.

    Signed-off-by: Wengang Wang
    Acked-by: Srinivas Eeda
    Cc: stable@kernel.org
    Signed-off-by: Joel Becker

    Wengang Wang
     
  • This patch fixes two problems in dlm_run_purgelist

    1. If a lockres is found to be in use, dlm_run_purgelist keeps trying to purge
    the same lockres instead of trying the next lockres.

    2. When a lockres is found unused, dlm_run_purgelist releases lockres spinlock
    before setting DLM_LOCK_RES_DROPPING_REF and calls dlm_purge_lockres.
    spinlock is reacquired but in this window lockres can get reused. This leads
    to BUG.

    This patch modifies dlm_run_purgelist to skip lockres if it's in use and purge
    next lockres. It also sets DLM_LOCK_RES_DROPPING_REF before releasing the
    lockres spinlock protecting it from getting reused.

    Signed-off-by: Srinivas Eeda
    Acked-by: Sunil Mushran
    Cc: stable@kernel.org
    Signed-off-by: Joel Becker

    Srinivas Eeda
     

21 May, 2010

1 commit

  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: (47 commits)
    ocfs2: Silence a gcc warning.
    ocfs2: Don't retry xattr set in case value extension fails.
    ocfs2:dlm: avoid dlm->ast_lock lockres->spinlock dependency break
    ocfs2: Reset xattr value size after xa_cleanup_value_truncate().
    fs/ocfs2/dlm: Use kstrdup
    fs/ocfs2/dlm: Drop memory allocation cast
    Ocfs2: Optimize punching-hole code.
    Ocfs2: Make ocfs2_find_cpos_for_left_leaf() public.
    Ocfs2: Fix hole punching to correctly do CoW during cluster zeroing.
    Ocfs2: Optimize ocfs2 truncate to use ocfs2_remove_btree_range() instead.
    ocfs2: Block signals for mkdir/link/symlink/O_CREAT.
    ocfs2: Wrap signal blocking in void functions.
    ocfs2/dlm: Increase o2dlm lockres hash size
    ocfs2: Make ocfs2_extend_trans() really extend.
    ocfs2/trivial: Code cleanup for allocation reservation.
    ocfs2: make ocfs2_adjust_resv_from_alloc simple.
    ocfs2: Make nointr a default mount option
    ocfs2/dlm: Make o2dlm domain join/leave messages KERN_NOTICE
    o2net: log socket state changes
    ocfs2: print node # when tcp fails
    ...

    Linus Torvalds
     

19 May, 2010

1 commit

  • Currently we process a dirty lockres with the lockres->spinlock taken. While
    during the process, we may need to lock on dlm->ast_lock. This breaks the
    dependency of dlm->ast_lock(lock first) and lockres->spinlock(lock second).

    This patch fixes the problem.
    Since we can't release lockres->spinlock, we have to take dlm->ast_lock
    just before taking the lockres->spinlock and release it after lockres->spinlock
    is released. And use __dlm_queue_bast()/__dlm_queue_ast(), the nolock version,
    in dlm_shuffle_lists(). There are no too many locks on a lockres, so there is no
    performance harm.

    Signed-off-by: Wengang Wang
    Signed-off-by: Joel Becker

    Wengang Wang
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

24 Sep, 2009

1 commit

  • * remove asm/atomic.h inclusion from linux/utsname.h --
    not needed after kref conversion
    * remove linux/utsname.h inclusion from files which do not need it

    NOTE: it looks like fs/binfmt_elf.c do not need utsname.h, however
    due to some personality stuff it _is_ needed -- cowardly leave ELF-related
    headers and files alone.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

23 Sep, 2009

1 commit


04 Apr, 2009

1 commit


27 Feb, 2009

1 commit

  • Mainline commit d4f7e650e55af6b235871126f747da88600e8040 attempts to delay
    the dlm_thread from sending the drop ref message if the lockres is being
    migrated. The problem is that we make the dlm_thread wait for the migration
    to complete. This causes a deadlock as dlm_thread also participates in the
    lockres migration process.

    A better fix for the original oss bugzilla#1012 is in testing.

    Signed-off-by: Sunil Mushran
    Acked-by: Joel Becker
    Signed-off-by: Mark Fasheh

    Sunil Mushran
     

06 Jan, 2009

1 commit


11 Mar, 2008

1 commit


03 May, 2007

1 commit


27 Mar, 2007

1 commit


15 Mar, 2007

1 commit


08 Feb, 2007

4 commits


27 Jun, 2006

7 commits


04 Jan, 2006

2 commits