1. 18 4月, 2014 1 次提交
  2. 07 3月, 2014 2 次提交
  3. 04 10月, 2013 1 次提交
    • S
      GFS2: Remove obsolete quota tunable · bef292a7
      Steven Whitehouse 提交于
      There is no need for a paramater which relates to the internals
      of quota to be exposed to users. The only possible use would be
      to turn it up so large that the memory allocation fails. So lets
      remove it and set it to a sensible value which ensures that we
      don't ask for multipage allocations.
      
      Currently the size of struct gfs2_holder means that the caluclated
      value is identical to the previous default value, so there should
      be no functional change.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Cc: Abhijith Das <adas@redhat.com>
      bef292a7
  4. 26 2月, 2013 1 次提交
  5. 13 2月, 2013 2 次提交
  6. 29 1月, 2013 1 次提交
    • S
      GFS2: Clean up freeze code · d564053f
      Steven Whitehouse 提交于
      The freeze code has not been looked at a lot recently. Upstream has
      moved on, and this is an attempt to catch us back up again. There
      is a vfs level interface for the freeze code which can be called
      from our (obsolete, but kept for backward compatibility purposes)
      sysfs freeze interface. This means freezing this way vs. doing it
      from the ioctl should now work in identical fashion.
      
      As a result of this, the freeze function is only called once
      and we can drop our own special purpose code for counting the
      number of freezes.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      d564053f
  7. 23 7月, 2012 1 次提交
  8. 13 6月, 2012 1 次提交
  9. 03 5月, 2012 1 次提交
  10. 11 1月, 2012 1 次提交
  11. 12 7月, 2011 1 次提交
    • S
      GFS2: Fix race during filesystem mount · 3942ae53
      Steven Whitehouse 提交于
      There is a potential race during filesystem mounting which has recently
      been reported. It occurs when the userland gfs_controld is able to
      process requests fast enough that it tries to use the sysfs interface
      before the lock module is properly initialised. This is a pretty
      unusual case as normally the lock module initialisation is very quick
      compared with gfs_controld.
      
      This patch adds an interruptible completion which is used to ensure that
      userland will wait for the initialisation of the lock module to
      complete.
      
      There are other potential solutions to this problem, but this is the
      quickest at this stage and has been tested both with and without
      mount.gfs2 present in the system.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      Reported-by: NDavid Booher <dbooher@adams.net>
      3942ae53
  12. 10 5月, 2011 1 次提交
  13. 06 10月, 2010 1 次提交
  14. 29 9月, 2010 1 次提交
    • S
      GFS2: Improve journal allocation via sysfs · feb47ca9
      Steven Whitehouse 提交于
      Recently a feature was added to GFS2 to allow journal id allocation
      via sysfs. This patch builds upon that so that a negative journal id
      will be treated as an error code to be passed back as the return code
      from mount. This allows termination of the mount process if there is
      a failure.
      
      Also, the process has been updated so that the kernel will wait
      for a journal id, even in the "spectator" case. This is required
      in order to avoid mounting a filesystem in case there is an error
      while joining the cluster. In the spectator case, 0 is written into
      the file to indicate that all is well, and that mount should continue.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      feb47ca9
  15. 29 7月, 2010 1 次提交
    • S
      GFS2: Wait for journal id on mount if not specified on mount command line · ba6e9364
      Steven Whitehouse 提交于
      This patch implements a wait for the journal id in the case that it has
      not been specified on the command line. This is to allow the future
      removal of the mount.gfs2 helper. The journal id would instead be
      directly communicated by gfs_controld to the file system. Here is a
      comparison of the two systems:
      
      Current:
      1. mount calls mount.gfs2
      2. mount.gfs2 connects to gfs_controld to retrieve the journal id
      3. mount.gfs2 adds the journal id to the mount command line and calls
      the mount system call
      4. gfs_controld receives the status of the mount request via a uevent
      
      Proposed:
      1. mount calls the mount system call (no mount.gfs2 helper)
      2. gfs_controld receives a uevent for a gfs2 fs which it doesn't know
      about already
      3. gfs_controld assigns a journal id to it via sysfs
      4. the mount system call then completes as normal (sending a uevent
      according to status)
      
      The advantage of the proposed system is that it is completely backward
      compatible with the current system both at the kernel and at the
      userland levels. The "first" parameter can also be set the same way,
      with the restriction that it must be set before the journal id is
      assigned.
      
      In addition, if mount becomes stuck waiting for a reply from
      gfs_controld which never arrives, then it is killable and will abort the
      mount gracefully.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      ba6e9364
  16. 23 7月, 2010 1 次提交
    • T
      gfs2: use workqueue instead of slow-work · 6ecd7c2d
      Tejun Heo 提交于
      Workqueue can now handle high concurrency.  Convert gfs to use
      workqueue instead of slow-work.
      
      * Steven pointed out that recovery path might be run from allocation
        path and thus requires forward progress guarantee without memory
        allocation.  Create and use gfs_recovery_wq with rescuer.  Please
        note that forward progress wasn't guaranteed with slow-work.
      
      * Updated to use non-reentrant workqueue.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NSteven Whitehouse <swhiteho@redhat.com>
      6ecd7c2d
  17. 14 5月, 2010 1 次提交
  18. 06 5月, 2010 1 次提交
    • S
      GFS2: Add some useful messages · 913a71d2
      Steven Whitehouse 提交于
      The following patch adds a message to indicate when barriers have been
      disabled due to a block device which doesn't support them. You could
      already tell this via the mount options in /proc/mounts, but all the
      other filesystems also log a message at the same time.
      
      Also, the same mechanisms are used to indicate when the lock
      demote interface has been used (only ever used for debugging)
      which is a request from our support team.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      913a71d2
  19. 05 5月, 2010 1 次提交
    • B
      GFS2: Various gfs2_logd improvements · 5e687eac
      Benjamin Marzinski 提交于
      This patch contains various tweaks to how log flushes and active item writeback
      work. gfs2_logd is now managed by a waitqueue, and gfs2_log_reseve now waits
      for gfs2_logd to do the log flushing.  Multiple functions were rewritten to
      remove the need to call gfs2_log_lock(). Instead of using one test to see if
      gfs2_logd had work to do, there are now seperate tests to check if there
      are two many buffers in the incore log or if there are two many items on the
      active items list.
      
      This patch is a port of a patch Steve Whitehouse wrote about a year ago, with
      some minor changes.  Since gfs2_ail1_start always submits all the active items,
      it no longer needs to keep track of the first ai submitted, so this has been
      removed. In gfs2_log_reserve(), the order of the calls to
      prepare_to_wait_exclusive() and wake_up() when firing off the logd thread has
      been switched.  If it called wake_up first there was a small window for a race,
      where logd could run and return before gfs2_log_reserve was ready to get woken
      up. If gfs2_logd ran, but did not free up enough blocks, gfs2_log_reserve()
      would be left waiting for gfs2_logd to eventualy run because it timed out.
      Finally, gt_logd_secs, which controls how long to wait before gfs2_logd times
      out, and flushes the log, can now be set on mount with ar_commit.
      Signed-off-by: NBenjamin Marzinski <bmarzins@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      5e687eac
  20. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  21. 08 3月, 2010 2 次提交
  22. 05 3月, 2010 1 次提交
    • C
      quota: move code from sync_quota_sb into vfs_quota_sync · 5fb324ad
      Christoph Hellwig 提交于
      Currenly sync_quota_sb does a lot of sync and truncate action that only
      applies to "VFS" style quotas and is actively harmful for the sync
      performance in XFS.  Move it into vfs_quota_sync and add a wait parameter
      to ->quota_sync to tell if we need it or not.
      
      My audit of the GFS2 code says it's also not needed given the way GFS2
      implements quotas, but I'd be happy if this can get a detailed review.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJan Kara <jack@suse.cz>
      5fb324ad
  23. 01 3月, 2010 1 次提交
    • S
      GFS2: Remove loopy umount code · c1184f8a
      Steven Whitehouse 提交于
      As a consequence of the previous patch, we can now remove the
      loop which used to be required due to the circular dependency
      between the inodes and glocks. Instead we can just invalidate
      the inodes, and then clear up any glocks which are left.
      
      Also we no longer need the rwsem since there is no longer any
      danger of the inode invalidation calling back into the glock
      code (and from there back into the inode code).
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      c1184f8a
  24. 16 12月, 2009 1 次提交
  25. 03 12月, 2009 2 次提交
  26. 09 9月, 2009 1 次提交
  27. 17 8月, 2009 2 次提交
  28. 14 8月, 2009 1 次提交
  29. 26 5月, 2009 2 次提交
    • S
      GFS2: Remove args subdir from gfs2 sysfs files · f6eb5349
      Steven Whitehouse 提交于
      Since we can cat /proc/mounts there is no need to have this
      subdirectory in the gfs2 sysfs files. In fact this does not
      reflect the full range of possible mount argumenmts, where
      as /proc/mounts does.
      
      There was only one userland user of this set of sysfs files
      and it will function perfectly well without these files
      being present (in fact that subcommand of gfs2_tool is
      obsolete anyway).
      
      The tune/* subdirectory is also considered mostly obsolete,
      but there are a few uses of this until mount arguments can
      be added for the last few functions for which there are no
      equivalents currently. However the tune/* directory is still
      in my sights and new code should avoid using it. Only the gfs2_quota
      and gfs2_tool programs are know to use tune/* at the moment.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      f6eb5349
    • S
      GFS2: Remove lockstruct subdir from gfs2 sysfs files · e1b28aab
      Steven Whitehouse 提交于
      The lockstruct sub directory contained two entries, both of
      which are duplicated elsewhere in the gfs2 sysfs files as
      well as being available via /proc/mounts. There is no userland program
      using either of them, so this patch removes them.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      e1b28aab
  30. 19 5月, 2009 1 次提交
    • S
      GFS2: Umount recovery race fix · fe64d517
      Steven Whitehouse 提交于
      This patch fixes a race condition where we can receive recovery
      requests part way through processing a umount. This was causing
      problems since the recovery thread had already gone away.
      
      Looking in more detail at the recovery code, it was really trying
      to implement a slight variation on a work queue, and that happens to
      align nicely with the recently introduced slow-work subsystem. As a
      result I've updated the code to use slow-work, rather than its own home
      grown variety of work queue.
      
      When using the wait_on_bit() function, I noticed that the wait function
      that was supplied as an argument was appearing in the WCHAN field, so
      I've updated the function names in order to produce more meaningful
      output.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      fe64d517
  31. 13 5月, 2009 2 次提交
  32. 24 3月, 2009 2 次提交
    • S
      GFS2: Add a "demote a glock" interface to sysfs · 64d576ba
      Steven Whitehouse 提交于
      This adds a sysfs file called demote_rq to GFS2's
      per filesystem directory. Its possible to use this
      file to demote arbitrary glocks in exactly the same
      way as if a request had come in from a remote node.
      
      This is intended for testing issues relating to caching
      of data under glocks. Despite that, the interface is
      generic enough to send requests to any type of glock,
      but be careful as its not always safe to send an
      arbitrary message to an arbitrary glock. For that reason
      and to prevent DoS, this interface is restricted to root
      only.
      
      The messages look like this:
      
      <type>:<glocknumber> <mode>
      
      Example:
      
      echo -n "2:13324 EX" >/sys/fs/gfs2/unity:myfs/demote_rq
      
      Which means "please demote inode glock (type 2) number 13324 so that
      I can get an EX (exclusive) lock". The lock modes are those which
      would normally be sent by a remote node in its callback so if you
      want to unlock a glock, you use EX, to demote to shared, use SH or PR
      (depending on whether you like GFS2 or DLM lock modes better!).
      
      If the glock doesn't exist, you'll get -ENOENT returned. If the
      arguments don't make sense, you'll get -EINVAL returned.
      
      The plan is that this interface will be used in combination with
      the blktrace patch which I recently posted for comments although
      it is, of course, still useful in its own right.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      64d576ba
    • S
      GFS2: Expose UUID via sysfs/uevent · 02e3cc70
      Steven Whitehouse 提交于
      Since we have a UUID, we ought to expose it to the user via sysfs
      and uevents. We already have the fs name in both of these places
      (a combination of the lock proto and lock table name) so if we add
      the UUID as well, we have a full set.
      
      For older filesystems (i.e. those created before mkfs.gfs2 was writing
      UUIDs by default) the sysfs file will appear zero length, and no UUID
      env var will be added to the uevents.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      02e3cc70