1. 25 Jan, 2008 9 commits
    • Steven Whitehouse's avatar
      [GFS2] Add writepages for GFS2 jdata · b8e7cbb6
      Steven Whitehouse authored
      This patch resolves a lock ordering issue where we had been getting
      a transaction lock in the wrong order with respect to the page lock.
      By using writepages rather than just writepage, it is then possible
      to start a transaction before locking the page, and thus matching the
      locking order elsewhere in the code.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      b8e7cbb6
    • Steven Whitehouse's avatar
      [GFS2] Split gfs2_writepage into three cases · 9ff8ec32
      Steven Whitehouse authored
      This patch splits gfs2_writepage into separate functions for each of
      the three cases: writeback, ordered and journalled. As a result
      it becomes a lot easier to see what each one is doing. The common
      code is moved into gfs2_writepage_common.
      
      This fixes a performance bug where we were doing more work than
      strictly required in the ordered write case.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      9ff8ec32
    • Steven Whitehouse's avatar
      [GFS2] Introduce gfs2_set_aops() · 5561093e
      Steven Whitehouse authored
      Just like ext3 we now have three sets of address space operations
      to cover the cases of writeback, ordered and journalled data
      writes. This means that the individual operations can now become
      less complicated as we are able to remove some of the tests for
      file data mode from the code.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      5561093e
    • Steven Whitehouse's avatar
      [GFS2] Add gfs2_is_writeback() · bf36a713
      Steven Whitehouse authored
      This adds a function "gfs2_is_writeback()" along the lines of the
      existing "gfs2_is_jdata()" in order to clean up the code and make
      the various tests for the inode mode more obvious. It also fixes
      the PageChecked() logic where we were resetting the flag too early
      in the case of an error path.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      bf36a713
    • Steven Whitehouse's avatar
      [GFS2] Remove unused field in struct gfs2_inode · e7e36f14
      Steven Whitehouse authored
      Removes a field that is not used.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      e7e36f14
    • Steven Whitehouse's avatar
      [GFS2] Remove useless i_cache from inodes · f91a0d3e
      Steven Whitehouse authored
      The i_cache was designed to keep references to the indirect blocks
      used during block mapping so that they didn't have to be looked
      up continually. The idea failed because there are too many places
      where the i_cache needs to be freed, and this has in the past been
      the cause of many bugs.
      
      In addition there was no performance benefit being gained since the
      disk blocks in question were cached anyway. So this patch removes
      it in order to simplify the code to prepare for other changes which
      would otherwise have had to add further support for this feature.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      f91a0d3e
    • Steven Whitehouse's avatar
      [GFS2] Use ->page_mkwrite() for mmap() · 3cc3f710
      Steven Whitehouse authored
      This cleans up the mmap() code path for GFS2 by implementing the
      page_mkwrite function for GFS2. We are thus able to use the
      generic filemap_fault function for our ->fault() implementation.
      
      This now means that shared writable mappings will be much more
      efficiently shared across the cluster if there is a reasonable
      proportion of read activity (the greater proportion, the better).
      
      As a side effect, it also reduces the size of the code, removes
      special cases from readpage and readpages, and makes the code
      path easier to follow.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      3cc3f710
    • Steven Whitehouse's avatar
      [GFS2] Clean up internal read function · 51ff87bd
      Steven Whitehouse authored
      As requested by Christoph, this patch cleans up GFS2's internal
      read function so that it no longer uses the do_generic_mapping_read
      function. This function is obsolete and GFS2 is the last user of it.
      
      As a side effect the internal read code gets smaller and easier
      to read and gfs2_readpage is split into two. One function has the locking
      and the other function has the rest of the logic.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      51ff87bd
    • Wendy Cheng's avatar
      [GFS2] Handle multiple glock demote requests · cc7e79b1
      Wendy Cheng authored
      Fix a race condition where multiple glock demote requests are sent to
      a node back-to-back. This patch does a check inside handle_callback()
      to see whether a demote request is in progress. If true, it sets a flag
      to make sure run_queue() will loop again to handle the new request,
      instead of erronously setting gl_demote_state to a different state.
      Signed-off-by: default avatarS. Wendy Cheng <wcheng@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      cc7e79b1
  2. 24 Jan, 2008 31 commits