1. 12 Oct, 2007 3 commits
  2. 11 Oct, 2007 1 commit
    • Denis V. Lunev's avatar
      [NET]: make netlink user -> kernel interface synchronious · cd40b7d3
      Denis V. Lunev authored
      
      
      This patch make processing netlink user -> kernel messages synchronious.
      This change was inspired by the talk with Alexey Kuznetsov about current
      netlink messages processing. He says that he was badly wrong when introduced 
      asynchronious user -> kernel communication.
      
      The call netlink_unicast is the only path to send message to the kernel
      netlink socket. But, unfortunately, it is also used to send data to the
      user.
      
      Before this change the user message has been attached to the socket queue
      and sk->sk_data_ready was called. The process has been blocked until all
      pending messages were processed. The bad thing is that this processing
      may occur in the arbitrary process context.
      
      This patch changes nlk->data_ready callback to get 1 skb and force packet
      processing right in the netlink_unicast.
      
      Kernel -> user path in netlink_unicast remains untouched.
      
      EINTR processing for in netlink_run_queue was changed. It forces rtnl_lock
      drop, but the process remains in the cycle until the message will be fully
      processed. So, there is no need to use this kludges now.
      Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
      Acked-by: default avatarAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cd40b7d3
  3. 10 Oct, 2007 36 commits
    • Pavel Emelyanov's avatar
      [FS] seq_file: Introduce the seq_open_private() · 39699037
      Pavel Emelyanov authored
      
      
      This function allocates the zeroed chunk of memory and
      call seq_open(). The __seq_open_private() helper returns
      the allocated memory to make it possible for the caller
      to initialize it.
      Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      39699037
    • Pavel Emelyanov's avatar
      [NETNS]: Move some code into __init section when CONFIG_NET_NS=n · 4665079c
      Pavel Emelyanov authored
      
      
      With the net namespaces many code leaved the __init section,
      thus making the kernel occupy more memory than it did before.
      Since we have a config option that prohibits the namespace
      creation, the functions that initialize/finalize some netns
      stuff are simply not needed and can be freed after the boot.
      
      Currently, this is almost not noticeable, since few calls
      are no longer in __init, but when the namespaces will be
      merged it will be possible to free more code. I propose to
      use the __net_init, __net_exit and __net_initdata "attributes"
      for functions/variables that are not used if the CONFIG_NET_NS
      is not set to save more space in memory.
      
      The exiting functions cannot just reside in the __exit section,
      as noticed by David, since the init section will have
      references on it and the compilation will fail due to modpost
      checks. These references can exist, since the init namespace
      never dies and the exit callbacks are never called. So I
      introduce the __exit_refok attribute just like it is already
      done with the __init_refok.
      Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4665079c
    • Eric W. Biederman's avatar
      [NET]: Fix race when opening a proc file while a network namespace is exiting. · 077130c0
      Eric W. Biederman authored
      
      
      The problem:  proc_net files remember which network namespace the are
      against but do not remember hold a reference count (as that would pin
      the network namespace).   So we currently have a small window where
      the reference count on a network namespace may be incremented when opening
      a /proc file when it has already gone to zero.
      
      To fix this introduce maybe_get_net and get_proc_net.
      
      maybe_get_net increments the network namespace reference count only if it is
      greater then zero, ensuring we don't increment a reference count after it
      has gone to zero.
      
      get_proc_net handles all of the magic to go from a proc inode to the network
      namespace instance and call maybe_get_net on it.
      
      PROC_NET the old accessor is removed so that we don't get confused and use
      the wrong helper function.
      
      Then I fix up the callers to use get_proc_net and handle the case case
      where get_proc_net returns NULL.  In that case I return -ENXIO because
      effectively the network namespace has already gone away so the files
      we are trying to access don't exist anymore.
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Acked-by: default avatarPaul E. McKenney <paulmck@us.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      077130c0
    • Daniel Lezcano's avatar
      [NETNS]: Fix export symbols. · 36ac3135
      Daniel Lezcano authored
      
      
      Add the appropriate EXPORT_SYMBOLS for proc_net_create,
      proc_net_fops_create and proc_net_remove to fix errors when
      compiling allmodconfig
      Signed-off-by: default avatarMark Nelson <markn@au1.ibm.com>
      Acked-by: default avatarBenjamin Thery <benjamin.thery@bull.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      36ac3135
    • David S. Miller's avatar
      3c12afe7
    • Eric W. Biederman's avatar
      [NET]: Make the device list and device lookups per namespace. · 881d966b
      Eric W. Biederman authored
      
      
      This patch makes most of the generic device layer network
      namespace safe.  This patch makes dev_base_head a
      network namespace variable, and then it picks up
      a few associated variables.  The functions:
      dev_getbyhwaddr
      dev_getfirsthwbytype
      dev_get_by_flags
      dev_get_by_name
      __dev_get_by_name
      dev_get_by_index
      __dev_get_by_index
      dev_ioctl
      dev_ethtool
      dev_load
      wireless_process_ioctl
      
      were modified to take a network namespace argument, and
      deal with it.
      
      vlan_ioctl_set and brioctl_set were modified so their
      hooks will receive a network namespace argument.
      
      So basically anthing in the core of the network stack that was
      affected to by the change of dev_base was modified to handle
      multiple network namespaces.  The rest of the network stack was
      simply modified to explicitly use &init_net the initial network
      namespace.  This can be fixed when those components of the network
      stack are modified to handle multiple network namespaces.
      
      For now the ifindex generator is left global.
      
      Fundametally ifindex numbers are per namespace, or else
      we will have corner case problems with migration when
      we get that far.
      
      At the same time there are assumptions in the network stack
      that the ifindex of a network device won't change.  Making
      the ifindex number global seems a good compromise until
      the network stack can cope with ifindex changes when
      you change namespaces, and the like.
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      881d966b
    • Eric W. Biederman's avatar
      [NET]: Support multiple network namespaces with netlink · b4b51029
      Eric W. Biederman authored
      
      
      Each netlink socket will live in exactly one network namespace,
      this includes the controlling kernel sockets.
      
      This patch updates all of the existing netlink protocols
      to only support the initial network namespace.  Request
      by clients in other namespaces will get -ECONREFUSED.
      As they would if the kernel did not have the support for
      that netlink protocol compiled in.
      
      As each netlink protocol is updated to be multiple network
      namespace safe it can register multiple kernel sockets
      to acquire a presence in the rest of the network namespaces.
      
      The implementation in af_netlink is a simple filter implementation
      at hash table insertion and hash table look up time.
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b4b51029
    • Eric W. Biederman's avatar
      [NET]: Make /proc/net per network namespace · 457c4cbc
      Eric W. Biederman authored
      
      
      This patch makes /proc/net per network namespace.  It modifies the global
      variables proc_net and proc_net_stat to be per network namespace.
      The proc_net file helpers are modified to take a network namespace argument,
      and all of their callers are fixed to pass &init_net for that argument.
      This ensures that all of the /proc/net files are only visible and
      usable in the initial network namespace until the code behind them
      has been updated to be handle multiple network namespaces.
      
      Making /proc/net per namespace is necessary as at least some files
      in /proc/net depend upon the set of network devices which is per
      network namespace, and even more files in /proc/net have contents
      that are relevant to a single network namespace.
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      457c4cbc
    • Eric W. Biederman's avatar
      [NET]: Don't implement dev_ifname32 inline · 32da477a
      Eric W. Biederman authored
      
      
      The current implementation of dev_ifname makes maintenance difficult
      because updates to the implementation of the ioctl have to made in two
      places.  So this patch updates dev_ifname32 to do a classic 32/64
      structure conversion and call sys_ioctl like the rest of the
      compat calls do.
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      32da477a
    • David Teigland's avatar
      [DLM] block dlm_recv in recovery transition · c36258b5
      David Teigland authored
      
      
      Introduce a per-lockspace rwsem that's held in read mode by dlm_recv
      threads while working in the dlm.  This allows dlm_recv activity to be
      suspended when the lockspace transitions to, from and between recovery
      cycles.
      
      The specific bug prompting this change is one where an in-progress
      recovery cycle is aborted by a new recovery cycle.  While dlm_recv was
      processing a recovery message, the recovery cycle was aborted and
      dlm_recoverd began cleaning up.  dlm_recv decremented recover_locks_count
      on an rsb after dlm_recoverd had reset it to zero.  This is fixed by
      suspending dlm_recv (taking write lock on the rwsem) before aborting the
      current recovery.
      
      The transitions to/from normal and recovery modes are simplified by using
      this new ability to block dlm_recv.  The switch from normal to recovery
      mode means dlm_recv goes from processing locking messages, to saving them
      for later, and vice versa.  Races are avoided by blocking dlm_recv when
      setting the flag that switches between modes.
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      c36258b5
    • Patrick Caulfield's avatar
      [DLM] don't overwrite castparam if it's NULL · b434eda6
      Patrick Caulfield authored
      
      
      If the castaddr passed to the userland API is NULL then don't overwrite the
      existing castparam. This allows a different thread to cancel a lock request and
      the CANCEL AST gets delivered to the original thread.
      
      bz#306391 (for RHEL4) refers.
      Signed-Off-By: default avatarPatrick Caulfield <pcaulfie@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      b434eda6
    • Steven Whitehouse's avatar
      [GFS2] Get superblock a different way · 5a60c532
      Steven Whitehouse authored
      
      
      The mapping may be NULL by the time the I/O has completed, so
      we now get the superblock by a different route (via the bd and glock)
      to avoid this problem.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      Cc: Wendy Cheng <wcheng@redhat.com>
      5a60c532
    • Steven Whitehouse's avatar
    • Benjamin Marzinski's avatar
      [GFS2] Alternate gfs2_iget to avoid looking up inodes being freed · 7a9f53b3
      Benjamin Marzinski authored
      
      
      There is a possible deadlock between two processes on the same node, where one
      process is deleting an inode, and another process is looking for allocated but
      unused inodes to delete in order to create more space.
      
      process A does an iput() on inode X, and it's i_count drops to 0. This causes
      iput_final() to be called, which puts an inode into state I_FREEING at
      generic_delete_inode(). There no point between when iput_final() is called, and
      when I_FREEING is set where GFS2 could acquire any glocks. Once I_FREEING is
      set, no other process on that node can successfully look up that inode until
      the delete finishes.
      
      process B locks the the resource group for the same inode in get_local_rgrp(),
      which is called by gfs2_inplace_reserve_i()
      
      process A tries to lock the resource group for the inode in
      gfs2_dinode_dealloc(), but it's already locked by process B
      
      process B waits in find_inode for the inode to have the I_FREEING state cleared.
      
      Deadlock.
      
      This patch solves the problem by adding an alternative to gfs2_iget(),
      gfs2_iget_skip(), that simply skips any inodes that are in the I_FREEING
      state.o The alternate test function is just like the original one, except that
      it fails if the inode is being freed, and sets a skipped flag. The alternate
      set function is just like the original, except that it fails if the skipped
      flag is set. Only try_rgrp_unlink() calls gfs2_iget_skip() instead of
      gfs2_iget().
      Signed-off-by: default avatarBenjamin E. Marzinski <bmarzins@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      7a9f53b3
    • Wendy Cheng's avatar
      [GFS2] Data corruption fix · de986e85
      Wendy Cheng authored
      
      
      * GFS2 has been using i_cache array to store its indirect meta blocks.
      Its flush routine doesn't correctly clean up all the entries. The
      problem would show while multiple nodes do simultaneous writes to the
      same file. Upon glock exclusive lock transfer, if the file is a sparse
      file with large file size where the indirect meta blocks span multiple
      array entries with "zero" entries in between. The flush routine
      prematurely stops the flushing that leaves old (stale) entries around.
      This leads to several nasty issues, including data corruption.
      * Fix gfs2_get_block_noalloc checking to correctly return EIO upon
      unmapped buffer.
      Signed-off-by: default avatarWendy Cheng <wcheng@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      de986e85
    • Steven Whitehouse's avatar
      [GFS2] Clean up journaled data writing · 16615be1
      Steven Whitehouse authored
      
      
      This patch cleans up the code for writing journaled data into the log.
      It also removes the need to allocate a small "tag" structure for each
      block written into the log. Instead we just keep count of the outstanding
      I/O so that we can be sure that its all been written at the correct time.
      Another result of this patch is that a number of ll_rw_block() calls
      have become submit_bh() calls, closing some races at the same time.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      16615be1
    • Bob Peterson's avatar
      [GFS2] GFS2: chmod hung - fix race in thread creation · 55c0c4ac
      Bob Peterson authored
      
      
      The problem boiled down to a race between the gdlm_init_threads()
      function initializing thread1 and its setting of blist = 1.
      Essentially, "if (current == ls->thread1)" was checked by the thread
      before the thread creator set ls->thread1.
      
      Since thread1 is the only thread who is allowed to work on the
      blocking queue, and since neither thread thought it was thread1, no one
      was working on the queue.  So everything just sat.
      
      This patch reuses the ls->async_lock spin_lock to fix the race,
      and it fixes the problem.  I've done more than 2000 iterations of the
      loop that was recreating the failure and it seems to work.
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      
      --
      55c0c4ac
    • Patrick Caulfield's avatar
      [DLM] Make dlm_sendd cond_resched more · d66f8277
      Patrick Caulfield authored
      
      
      Under high recovery loads dlm_sendd can monopolise the CPU and cause soft lockups.
      
      This one extra and one moved cond_resched() make it yield a little more during
      such times keeping work moving.
      Signed-Off-By: default avatarPatrick Caulfield <pcaulfie@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      d66f8277
    • Wendy Cheng's avatar
      [GFS2] Move inode deletion out of blocking_cb · 49e61f2e
      Wendy Cheng authored
      
      
      Move inode deletion code out of blocking_cb handle_callback route to
      avoid racy conditions that end up blocking lock_dlm1 thread. Fix
      bugzilla 286821.
      Signed-off-by: default avatarWendy Cheng <wcheng@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      49e61f2e
    • Abhijith Das's avatar
      [GFS2] flocks from same process trip kernel BUG at fs/gfs2/glock.c:1118! · b4c20166
      Abhijith Das authored
      
      
      This patch adds a new flag to the gfs2_holder structure GL_FLOCK.
      It is set on holders of glocks representing flocks. This flag is
      checked in add_to_queue() and a process is permitted to queue more
      than one holder onto a glock if it is set. This solves the issue
      of a process not being able to do multiple flocks on the same file.
      Through a single descriptor, a process can now promote and demote
      flocks. Through multiple descriptors a process can now queue
      multiple flocks on the same file. There's still the problem of
      a process deadlocking itself (because gfs2 blocking locks are not
      interruptible) by queueing incompatible deadlock.
      Signed-off-by: default avatarAbhijith Das <adas@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      b4c20166
    • Steven Whitehouse's avatar
      [GFS2] Clean up gfs2_trans_add_revoke() · 1ad38c43
      Steven Whitehouse authored
      
      
      The following alters gfs2_trans_add_revoke() to take a struct
      gfs2_bufdata as an argument. This eliminates the memory allocation which
      was previously required by making use of the already existing struct
      gfs2_bufdata. It makes some sanity checks to ensure that the
      gfs2_bufdata has been removed from all the lists before its recycled as
      a revoke structure. This saves one memory allocation and one free per
      revoke structure.
      
      Also as a result, and to simplify the locking, since there is no longer
      any blocking code in gfs2_trans_add_revoke() we must hold the log lock
      whenever this function is called. This reduces the amount of times we
      take and unlock the log lock.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      1ad38c43
    • Steven Whitehouse's avatar
      [GFS2] Use slab operations for all gfs2_bufdata allocations · 0820ab51
      Steven Whitehouse authored
      
      
      The old revoke structure was allocated using kalloc/kfree but
      there is a slab cache for gfs2_bufdata, so we should use that
      now that the structures have been converted.
      
      This is part two of the patch series to merge the revoke
      and gfs2_bufdata structures.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      0820ab51
    • Steven Whitehouse's avatar
      [GFS2] Replace revoke structure with bufdata structure · 82e86087
      Steven Whitehouse authored
      
      
      Both the revoke structure and the bufdata structure are quite similar.
      They are basically small tags which are put on lists. In addition to
      which the revoke structure is always allocated when there is a bufdata
      structure which is (or can be) freed. As such it should be possible to
      reduce the number of frees and allocations by using the same structure
      for both purposes.
      
      This patch is the first step along that path. It replaces existing uses
      of the revoke structure with the bufdata structure.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      82e86087
    • Bob Peterson's avatar
    • Steven Whitehouse's avatar
      [GFS2] Clean up ordered write code · d7b616e2
      Steven Whitehouse authored
      
      
      The following patch removes the ordered write processing from
      databuf_lo_before_commit() and moves it to log.c. This has the effect of
      greatly simplyfying databuf_lo_before_commit() and well as potentially
      making the ordered write code more efficient.
      
      As a side effect of this, its now possible to remove ordered buffers
      from the ordered buffer list at any time, so we now make use of this in
      invalidatepage and releasepage to ensure timely release of these
      buffers.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      d7b616e2
    • Steven Whitehouse's avatar
      [GFS2] Move pin/unpin into lops.c, clean up locking · 9b9107a5
      Steven Whitehouse authored
      
      
      gfs2_pin and gfs2_unpin are only used in lops.c, despite being
      defined in meta_io.c, so this patch moves them into lops.c and
      makes them static. At the same time, its possible to clean up
      the locking in the buf and databuf _lo_add() functions so that
      we only need to grab the spinlock once. Also we have to move
      lock_buffer() around the _lo_add() functions since we can't
      do that in gfs2_pin() any more since we hold the spinlock
      for the duration of that function.
      
      As a result, the code shrinks by 12 lines and we do far fewer
      operations when adding buffers to the log. It also makes the
      code somewhat easier to read & understand.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      9b9107a5
    • Steven Whitehouse's avatar
      [GFS2] Don't mark jdata dirty in gfs2_unstuffer_page() · eaf96527
      Steven Whitehouse authored
      
      
      Journaled data is marked dirty by gfs2_unpin and should not be marked
      dirty here.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      eaf96527
    • Steven Whitehouse's avatar
      [GFS2] Introduce gfs2_remove_from_ail · 1e1a3d03
      Steven Whitehouse authored
      
      
      This collects together the operations required to remove a gfs2_bufdata
      from the ail lists. Its only called from two places to start with, but
      expect to see more of this function in future.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      1e1a3d03
    • Steven Whitehouse's avatar
      [GFS2] Correct lock ordering in unlink · 8497a46e
      Steven Whitehouse authored
      
      
      This patch corrects the lock ordering in unlink to be the same as
      that in the rest of GFS2, i.e. parent -> child -> rgrp.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      8497a46e
    • Wendy Cheng's avatar
      [GFS2] fix inode meta data corruption · e9bd2b3b
      Wendy Cheng authored
      
      
      Fix a nasty inode meta data corruption issue by keeping the buffer head in
      icache array. This buffer needs to stay in memory until journal flush occurs
      Otherwise, gfs2_meta_inode_buffer could do a disk read before the inode hits
      disk. It ends up with meta data corruptions. The buffer will be released as
      part of the existing journal flush logic.
      Signed-off-by: default avatarS. Wendy Cheng <wcheng@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      e9bd2b3b
    • Benjamin Marzinski's avatar
      [GFS2] delay glock demote for a minimum hold time · c4f68a13
      Benjamin Marzinski authored
      
      
      When a lot of IO, with some distributed mmap IO, is run on a GFS2 filesystem in
      a cluster, it will deadlock. The reason is that do_no_page() will repeatedly
      call gfs2_sharewrite_nopage(), because each node keeps giving up the glock
      too early, and is forced to call unmap_mapping_range(). This bumps the
      mapping->truncate_count sequence count, forcing do_no_page() to retry. This
      patch institutes a minimum glock hold time a tenth a second.  This insures
      that even in heavy contention cases, the node has enough time to get some
      useful work done before it gives up the glock.
      
      A second issue is that when gfs2_glock_dq() is called from within a page fault
      to demote a lock, and the associated page needs to be written out, it will
      try to acqire a lock on it, but it has already been locked at a higher level.
      This patch puts makes gfs2_glock_dq() use the work queue as well, to avoid this
      issue. This is the same patch as Steve Whitehouse originally proposed to fix
      this issue, execpt that gfs2_glock_dq() now grabs a reference to the glock
      before it queues up the work on it.
      Signed-off-by: default avatarBenjamin E. Marzinski <bmarzins@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      c4f68a13
    • Abhijith Das's avatar
      [GFS2] panic after can't parse mount arguments · d1e2777d
      Abhijith Das authored
      
      
      When you try to mount gfs2 with -o garbage, the mount fails and the gfs2
      superblock is deallocated and becomes NULL. The vfs comes around later
      on and calls gfs2_kill_sb. At this point the hidden gfs2 superblock
      pointer (sb->s_fs_info) is NULL and dereferencing it through
      gfs2_meta_syncfs causes the panic. (the other function call to
      gfs2_delete_debugfs_file() succeeds because this function already checks
      for a NULL pointer)
      Signed-off-by: default avatarAbhijith Das <adas@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      d1e2777d
    • Bob Peterson's avatar
      [GFS2] Patch to protect sd_log_num_jdata · ec217e0e
      Bob Peterson authored
      
      
      This is a patch to GFS2 to protect sd_log_num_jdata with the
      gfs2_log_lock.  Without this patch, there is a timing window
      where you can get hit the following assert from function
      gfs2_log_flush():
      
      gfs2_assert_withdraw(sdp,
      			sdp->sd_log_num_buf + sdp->sd_log_num_jdata ==
      			sdp->sd_log_commited_buf +
      			sdp->sd_log_commited_databuf);
      
      I've tested it on my roth cluster and it fixes the problem.
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      ec217e0e
    • Abhijith Das's avatar
      [GFS2] Wendy's dump lockname in hex & fix glock dump · a947e033
      Abhijith Das authored
      
      
      With this patch, gfs2 glockdump through the debugfs filesystem will only
      dump glocks for the specified filesystem instead of all glocks. Also, to
      aid debugging, the glock number is dumped in hex instead of decimal.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      Signed-off-by: default avatarS. Wendy Cheng <wcheng@redhat.com>
      Signed-off-by: default avatarAbhijith Das <adas@redhat.com>
      a947e033
    • Patrick Caulfield's avatar
      [DLM] Fix lowcomms socket closing · 61d96be0
      Patrick Caulfield authored
      
      
      This patch fixes the slight mess made in lowcomms closing by previous patches
      and fixes all sorts of DLM hangs.
      Signed-Off-By: default avatarPatrick Caulfield <pcaulfie@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      61d96be0
    • Wendy Cheng's avatar
      [GFS2] Reduce truncate IO traffic · a13b8c5f
      Wendy Cheng authored
      
      
      Current GFS2 setattr call unconditionally invokes do_shrink even the
      requested size and actual file size are equal. This has generated large
      amount of extra IOs found during NFS benchmark runs. This patch moves
      the relevant logic out of shrink code path. Since setattr is a system
      call, the time stamps update is still required.
      Signed-off-by: default avatarS. Wendy Cheng <wcheng@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      a13b8c5f