1. 18 9月, 2008 1 次提交
    • S
      GFS2: The war on bloat · 37ec89e8
      Steven Whitehouse 提交于
      The following patch shrinks the gfs2_args structure which is embedded in
      every GFS2 superblock. It cuts down the size of the options to a single
      unsigned int (the 13 bits of bitfields will be rounded up to that size
      by the compiler) from the current 11 unsigned ints. So on x86 thats 44
      bytes shrinking to 4 bytes, in each and every GFS2 superblock.
      Signed-off-by: NSteven Whitehouse <swhitho@redhat.com>
      37ec89e8
  2. 15 9月, 2008 2 次提交
  3. 05 9月, 2008 2 次提交
    • J
      GFS2: Use an IS_ERR test rather than a NULL test · bd1eb881
      Julien Brunel 提交于
      In case of error, the function gfs2_inode_lookup returns an
      ERR pointer, but never returns a NULL pointer. So a NULL test that
      necessarily comes after an IS_ERR test should be deleted, and a NULL
      test that may come after a call to this function should be
      strengthened by an IS_ERR test.
      
      The semantic match that finds this problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @match_bad_null_test@
      expression x, E;
      statement S1,S2;
      @@
      x = gfs2_inode_lookup(...)
      ... when != x = E
      * if (x != NULL)
      S1 else S2
      // </smpl>
      Signed-off-by: NJulien Brunel <brunel@diku.dk>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      bd1eb881
    • S
      GFS2: Fix race relating to glock min-hold time · dff52574
      Steven Whitehouse 提交于
      In the case that a request for a glock arrives right after the
      grant reply has arrived, it sometimes means that the gl_tstamp
      field hasn't been updated recently enough. The net result is that
      the min-hold time for the glock is ignored. If this happens
      often enough, it leads to poor performance.
      
      This patch adds an additional test, so that if the reply pending
      bit is set on a glock, then it will select the maximum length of
      time for the min-hold time, rather than looking at gl_tstamp.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      dff52574
  4. 27 8月, 2008 1 次提交
    • S
      GFS2: Fix & clean up GFS2 rename · 0188d6c5
      Steven Whitehouse 提交于
      This patch fixes a locking issue in the rename code by ensuring that we hold
      the per sb rename lock over both directory and "other" renames which involve
      different parent directories.
      
      At the same time, this moved the (only called from one place) function
      gfs2_ok_to_move into the file that its called from, so we can mark it
      static. This should make a code a bit easier to follow.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Cc: Peter Staubach <staubach@redhat.com>
      0188d6c5
  5. 13 8月, 2008 34 次提交