1. 26 Sep, 2008 1 commit
    • Steven Whitehouse's avatar
      GFS2: Support for I/O barriers · 254db57f
      Steven Whitehouse authored
      This patch adds barrier support to GFS2. There is not a lot of change
      really... we just add the barrier flag when we write journal header
      blocks. If the underlying device refuses to support them, we fall back
      to the previous way of doing things (wait for the I/O and hope) since
      there is nothing else we can do. There is no user configuration,
      barriers will always be on unless the device refuses to support them.
      This seems a reasonable solution to me since this is a correctness
      issue.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      254db57f
  2. 22 Sep, 2008 1 commit
    • Steven Whitehouse's avatar
      GFS2: Add UUID to GFS2 sb · 6d80c39f
      Steven Whitehouse authored
      This patch adds a UUID to the GFS2 sb structure. This field is not
      actually referenced from kernel space at all, but is added for
      completeness and due to the userland tools which get their on-disk
      structure information from the gfs2_ondisk.h header file.
      
      Since we have to be backwards compatible, we will assume that any GFS2
      sb for which the UUID is all 0 does not have a UUID as such.
      
      We should then be (after some userland changes) able to support the -U
      mount option. This addresses Fedora bugzilla #242689
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      6d80c39f
  3. 18 Sep, 2008 2 commits
    • Steven Whitehouse's avatar
      GFS2: high time to take some time over atime · 719ee344
      Steven Whitehouse authored
      Until now, we've used the same scheme as GFS1 for atime. This has failed
      since atime is a per vfsmnt flag, not a per fs flag and as such the
      "noatime" flag was not getting passed down to the filesystems. This
      patch removes all the "special casing" around atime updates and we
      simply use the VFS's atime code.
      
      The net result is that GFS2 will now support all the same atime related
      mount options of any other filesystem on a per-vfsmnt basis. We do lose
      the "lazy atime" updates, but we gain "relatime". We could add lazy
      atime to the VFS at a later date, if there is a requirement for that
      variant still - I suspect relatime will be enough.
      
      Also we lose about 100 lines of code after this patch has been applied,
      and I have a suspicion that it will speed things up a bit, even when
      atime is "on". So it seems like a nice clean up as well.
      
      From a user perspective, everything stays the same except the loss of
      the per-fs atime quantum tweekable (ought to be per-vfsmnt at the very
      least, and to be honest I don't think anybody ever used it) and that a
      number of options which were ignored before now work correctly.
      
      Please let me know if you've got any comments. I'm pushing this out
      early so that you can all see what my plans are.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      719ee344
    • Steven Whitehouse's avatar
      GFS2: The war on bloat · 37ec89e8
      Steven Whitehouse authored
      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: default avatarSteven Whitehouse <swhitho@redhat.com>
      37ec89e8
  4. 15 Sep, 2008 2 commits
  5. 05 Sep, 2008 2 commits
    • Julien Brunel's avatar
      GFS2: Use an IS_ERR test rather than a NULL test · bd1eb881
      Julien Brunel authored
      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: default avatarJulien Brunel <brunel@diku.dk>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      bd1eb881
    • Steven Whitehouse's avatar
      GFS2: Fix race relating to glock min-hold time · dff52574
      Steven Whitehouse authored
      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: default avatarSteven Whitehouse <swhiteho@redhat.com>
      dff52574
  6. 27 Aug, 2008 1 commit
    • Steven Whitehouse's avatar
      GFS2: Fix & clean up GFS2 rename · 0188d6c5
      Steven Whitehouse authored
      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: default avatarSteven Whitehouse <swhiteho@redhat.com>
      Cc: Peter Staubach <staubach@redhat.com>
      0188d6c5
  7. 13 Aug, 2008 4 commits
    • Bob Peterson's avatar
      GFS2: rm on multiple nodes causes panic · 72dbf479
      Bob Peterson authored
      This patch fixes a problem whereby simultaneous unlink, rmdir,
      rename and link operations (e.g. rm -fR *) from multiple nodes
      on the same GFS2 file system can cause kernel panics, hangs,
      and/or memory corruption.  It also gets rid of all the non-rgrp
      calls to gfs2_glock_nq_m.
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      72dbf479
    • Steven Whitehouse's avatar
      GFS2: Fix metafs mounts · 9b8df98f
      Steven Whitehouse authored
      This patch is intended to fix the issues reported in bz #457798. Instead
      of having the metafs as a separate filesystem, it becomes a second root
      of gfs2. As a result it will appear as type gfs2 in /proc/mounts, but it
      is still possible (for backwards compatibility purposes) to mount it as
      type gfs2meta. A new mount flag "meta" is introduced so that its possible
      to tell the two cases apart in /proc/mounts.
      
      As a result it becomes possible to mount type gfs2 with -o meta and
      get the same result as mounting type gfs2meta. So it is possible to
      mount just the metafs on its own. Currently if you do this, its then
      impossible to mount the "normal" root of the gfs2 filesystem without
      first unmounting the metafs root. I'm not sure if thats a feature or
      a bug :-)
      
      Either way, this is a great improvement on the previous scheme and I've
      verified that it works ok with bind mounts on both the "normal" root
      and the metafs root in various combinations.
      
      There were also a bunch of functions in super.c which didn't belong there,
      so this moves them into ops_fstype.c where they can be static. Hopefully
      the mount/umount sequence is now more obvious as a result.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      Cc: Alexander Viro <aviro@redhat.com>
      9b8df98f
    • Steven Whitehouse's avatar
      GFS2: Fix debugfs glock file iterator · c1e817d0
      Steven Whitehouse authored
      Due to an incorrect iterator, some glocks were being missed from the
      glock dumps obtained via debugfs. This patch fixes the problem and
      ensures that we don't miss any glocks in future.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      c1e817d0
    • Linus Torvalds's avatar
      Linux 2.6.27-rc3 · 30a2f3c6
      Linus Torvalds authored
      30a2f3c6
  8. 12 Aug, 2008 27 commits