26 Mar, 2016

1 commit

  • This patch fixes a deadlock, as follows:

    Node 1 Node 2 Node 3
    1)volume a and b are only mount vol a only mount vol b
    mounted

    2) start to mount b start to mount a

    3) check hb of Node 3 check hb of Node 2
    in vol a, qs_holds++ in vol b, qs_holds++

    4) -------------------- all nodes' network down --------------------

    5) progress of mount b the same situation as
    failed, and then call Node 2
    ocfs2_dismount_volume.
    but the process is hung,
    since there is a work
    in ocfs2_wq cannot beo
    completed. This work is
    about vol a, because
    ocfs2_wq is global wq.
    BTW, this work which is
    scheduled in ocfs2_wq is
    ocfs2_orphan_scan_work,
    and the context in this work
    needs to take inode lock
    of orphan_dir, because
    lockres owner are Node 1 and
    all nodes' nework has been down
    at the same time, so it can't
    get the inode lock.

    6) Why can't this node be fenced
    when network disconnected?
    Because the process of
    mount is hung what caused qs_holds
    is not equal 0.

    Because all works in the ocfs2_wq are relative to the super block.

    The solution is to change the ocfs2_wq from global to local. In other
    words, move it into struct ocfs2_super.

    Signed-off-by: Yiwen Jiang
    Reviewed-by: Joseph Qi
    Cc: Xue jiufei
    Cc: Mark Fasheh
    Cc: Joel Becker
    Cc: Cc: Junxiao Bi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    jiangyiwen
     

05 Sep, 2015

2 commits

  • These uses sometimes do and sometimes don't have '\n' terminations. Make
    the uses consistently use '\n' terminations and remove the newline from
    the functions.

    Miscellanea:

    o Coalesce formats
    o Realign arguments

    Signed-off-by: Joe Perches
    Reviewed-by: Mark Fasheh
    Cc: Joel Becker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     
  • OCFS2 is often used in high-availaibility systems. However, ocfs2
    converts the filesystem to read-only at the drop of the hat. This may
    not be necessary, since turning the filesystem read-only would affect
    other running processes as well, decreasing availability.

    This attempt is to add errors=continue, which would return the EIO to
    the calling process and terminate furhter processing so that the
    filesystem is not corrupted further. However, the filesystem is not
    converted to read-only.

    As a future plan, I intend to create a small utility or extend
    fsck.ocfs2 to fix small errors such as in the inode. The input to the
    utility such as the inode can come from the kernel logs so we don't have
    to schedule a downtime for fixing small-enough errors.

    The patch changes the ocfs2_error to return an error. The error
    returned depends on the mount option set. If none is set, the default
    is to turn the filesystem read-only.

    Perhaps errors=continue is not the best option name. Historically it is
    used for making an attempt to progress in the current process itself.
    Should we call it errors=eio? or errors=killproc? Suggestions/Comments
    welcome.

    Sources are available at:
    https://github.com/goldwynr/linux/tree/error-cont

    Signed-off-by: Goldwyn Rodrigues
    Signed-off-by: Mark Fasheh
    Cc: Joel Becker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Goldwyn Rodrigues
     

01 Nov, 2011

1 commit

  • Standardize the style for compiler based printf format verification.
    Standardized the location of __printf too.

    Done via script and a little typing.

    $ grep -rPl --include=*.[ch] -w "__attribute__" * | \
    grep -vP "^(tools|scripts|include/linux/compiler-gcc.h)" | \
    xargs perl -n -i -e 'local $/; while (<>) { s/\b__attribute__\s*\(\s*\(\s*format\s*\(\s*printf\s*,\s*(.+)\s*,\s*(.+)\s*\)\s*\)\s*\)/__printf($1, $2)/g ; print; }'

    [akpm@linux-foundation.org: revert arch bits]
    Signed-off-by: Joe Perches
    Cc: "Kirill A. Shutemov"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

11 May, 2010

1 commit

  • ocfs2 sometimes needs to block signals around dlm operations, but it
    currently does it with sigprocmask(). Even worse, it's checking the
    error code of sigprocmask(). The in-kernel sigprocmask() can only error
    if you get the SIG_* argument wrong. We don't.

    Wrap the sigprocmask() calls with ocfs2_[un]block_signals(). These
    functions are void, but they will BUG() if somehow sigprocmask() returns
    an error.

    Signed-off-by: Joel Becker

    Joel Becker
     

10 Aug, 2007

1 commit


11 Jul, 2007

1 commit

  • We re-use the RESVSP/UNRESVSP ioctls from xfs which allow the user to
    allocate and deallocate regions to a file without zeroing data or changing
    i_size.

    Though renamed, the structure passed in from user is identical to struct
    xfs_flock64. The three fields that are actually used right now are l_whence,
    l_start and l_len.

    This should get ocfs2 immediate compatibility with userspace software using
    the pre-existing xfs ioctls.

    Signed-off-by: Mark Fasheh

    Mark Fasheh
     

25 Mar, 2006

1 commit


04 Jan, 2006

1 commit