1. 02 May, 2016 1 commit
  2. 19 Apr, 2016 1 commit
  3. 05 Apr, 2016 1 commit
  4. 22 Jan, 2016 1 commit
    • Al Viro's avatar
      wrappers for ->i_mutex access · 5955102c
      Al Viro authored
      parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
      inode_foo(inode) being mutex_foo(&inode->i_mutex).
      
      Please, use those for access to ->i_mutex; over the coming cycle
      ->i_mutex will become rwsem, with ->lookup() done with it held
      only shared.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      5955102c
  5. 22 Dec, 2015 1 commit
  6. 14 Dec, 2015 2 commits
    • Bob Peterson's avatar
      GFS2: Reduce size of incore inode · b58bf407
      Bob Peterson authored
      This patch makes no functional changes. Its goal is to reduce the
      size of the gfs2 inode in memory by rearranging structures and
      changing the size of some variables within the structure.
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      b58bf407
    • Bob Peterson's avatar
      GFS2: Make rgrp reservations part of the gfs2_inode structure · a097dc7e
      Bob Peterson authored
      Before this patch, multi-block reservation structures were allocated
      from a special slab. This patch folds the structure into the gfs2_inode
      structure. The disadvantage is that the gfs2_inode needs more memory,
      even when a file is opened read-only. The advantages are: (a) we don't
      need the special slab and the extra time it takes to allocate and
      deallocate from it. (b) we no longer need to worry that the structure
      exists for things like quota management. (c) This also allows us to
      remove the calls to get_write_access and put_write_access since we
      know the structure will exist.
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      a097dc7e
  7. 24 Nov, 2015 1 commit
    • Bob Peterson's avatar
      GFS2: Extract quota data from reservations structure (revert 5407e242) · b54e9a0b
      Bob Peterson authored
      This patch basically reverts the majority of patch 5407e242.
      That patch eliminated the gfs2_qadata structure in favor of just
      using the reservations structure. The problem with doing that is that
      it increases the size of the reservations structure. That is not an
      issue until it comes time to fold the reservations structure into the
      inode in memory so we know it's always there. By separating out the
      quota structure again, we aren't punishing the non-quota users by
      making all the inodes bigger, requiring more slab space. This patch
      creates a new slab area to allocate the quota stuff so it's managed
      a little more sanely.
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      b54e9a0b
  8. 10 Nov, 2015 1 commit
  9. 22 Oct, 2015 1 commit
  10. 22 Sep, 2015 1 commit
  11. 09 Jun, 2015 1 commit
  12. 05 May, 2015 1 commit
  13. 12 Apr, 2015 2 commits
  14. 26 Mar, 2015 1 commit
  15. 18 Mar, 2015 4 commits
  16. 10 Feb, 2015 1 commit
  17. 05 Feb, 2015 1 commit
    • Theodore Ts'o's avatar
      vfs: add support for a lazytime mount option · 0ae45f63
      Theodore Ts'o authored
      Add a new mount option which enables a new "lazytime" mode.  This mode
      causes atime, mtime, and ctime updates to only be made to the
      in-memory version of the inode.  The on-disk times will only get
      updated when (a) if the inode needs to be updated for some non-time
      related change, (b) if userspace calls fsync(), syncfs() or sync(), or
      (c) just before an undeleted inode is evicted from memory.
      
      This is OK according to POSIX because there are no guarantees after a
      crash unless userspace explicitly requests via a fsync(2) call.
      
      For workloads which feature a large number of random write to a
      preallocated file, the lazytime mount option significantly reduces
      writes to the inode table.  The repeated 4k writes to a single block
      will result in undesirable stress on flash devices and SMR disk
      drives.  Even on conventional HDD's, the repeated writes to the inode
      table block will trigger Adjacent Track Interference (ATI) remediation
      latencies, which very negatively impact long tail latencies --- which
      is a very big deal for web serving tiers (for example).
      
      Google-Bug-Id: 18297052
      Signed-off-by: Theodore Ts'o's avatarTheodore Ts'o <tytso@mit.edu>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      0ae45f63
  18. 14 Nov, 2014 3 commits
  19. 03 Nov, 2014 1 commit
    • Bob Peterson's avatar
      GFS2: Only increase rs_sizehint · 33ad5d54
      Bob Peterson authored
      If an application does a sequence of (1) big write, (2) little write
      we don't necessarily want to reset the size hint based on the smaller
      size. The fact that they did any big writes implies they may do more,
      and therefore we should try to allocate bigger block reservations, even
      if the last few were small writes. Therefore this patch changes function
      gfs2_size_hint so that the size hint can only grow; it cannot shrink.
      This is especially important where there are multiple writers.
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      Signed-off-by: Steven Whitehouse's avatarSteven Whitehouse <swhiteho@redhat.com>
      33ad5d54
  20. 09 Sep, 2014 1 commit
  21. 21 Aug, 2014 1 commit
    • Bob Peterson's avatar
      GFS2: Request demote when a "try" flock fails · 2ddfbdd6
      Bob Peterson authored
      This patch changes the flock code so that it uses the TRY_1CB flag
      instead of the TRY flag on the first attempt. That forces any holding
      nodes to issue a dlm callback, which requests a demote of the glock.
      Then, if the "try" failed, it sleeps a small amount of time for the
      demote to occur. Then it tries again, for an increasing amount of time.
      Subsequent attempts to gain the "try" lock don't use "_1CB" so that
      only one callback is issued.
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      Signed-off-by: Steven Whitehouse's avatarSteven Whitehouse <swhiteho@redhat.com>
      2ddfbdd6
  22. 18 Jul, 2014 2 commits
  23. 12 Jun, 2014 1 commit
    • Al Viro's avatar
      ->splice_write() via ->write_iter() · 8d020765
      Al Viro authored
      iter_file_splice_write() - a ->splice_write() instance that gathers the
      pipe buffers, builds a bio_vec-based iov_iter covering those and feeds
      it to ->write_iter().  A bunch of simple cases coverted to that...
      
      [AV: fixed the braino spotted by Cyrill]
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      8d020765
  24. 16 May, 2014 1 commit
  25. 14 May, 2014 1 commit
    • Benjamin Marzinski's avatar
      GFS2: remove transaction glock · 24972557
      Benjamin Marzinski authored
      GFS2 has a transaction glock, which must be grabbed for every
      transaction, whose purpose is to deal with freezing the filesystem.
      Aside from this involving a large amount of locking, it is very easy to
      make the current fsfreeze code hang on unfreezing.
      
      This patch rewrites how gfs2 handles freezing the filesystem. The
      transaction glock is removed. In it's place is a freeze glock, which is
      cached (but not held) in a shared state by every node in the cluster
      when the filesystem is mounted. This lock only needs to be grabbed on
      freezing, and actions which need to be safe from freezing, like
      recovery.
      
      When a node wants to freeze the filesystem, it grabs this glock
      exclusively.  When the freeze glock state changes on the nodes (either
      from shared to unlocked, or shared to exclusive), the filesystem does a
      special log flush.  gfs2_log_flush() does all the work for flushing out
      the and shutting down the incore log, and then it tries to grab the
      freeze glock in a shared state again.  Since the filesystem is stuck in
      gfs2_log_flush, no new transaction can start, and nothing can be written
      to disk. Unfreezing the filesytem simply involes dropping the freeze
      glock, allowing gfs2_log_flush() to grab and then release the shared
      lock, so it is cached for next time.
      
      However, in order for the unfreezing ioctl to occur, gfs2 needs to get a
      shared lock on the filesystem root directory inode to check permissions.
      If that glock has already been grabbed exclusively, fsfreeze will be
      unable to get the shared lock and unfreeze the filesystem.
      
      In order to allow the unfreeze, this patch makes gfs2 grab a shared lock
      on the filesystem root directory during the freeze, and hold it until it
      unfreezes the filesystem.  The functions which need to grab a shared
      lock in order to allow the unfreeze ioctl to be issued now use the lock
      grabbed by the freeze code instead.
      
      The freeze and unfreeze code take care to make sure that this shared
      lock will not be dropped while another process is using it.
      Signed-off-by: default avatarBenjamin Marzinski <bmarzins@redhat.com>
      Signed-off-by: Steven Whitehouse's avatarSteven Whitehouse <swhiteho@redhat.com>
      24972557
  26. 06 May, 2014 2 commits
  27. 07 Apr, 2014 1 commit
  28. 06 Feb, 2014 1 commit
  29. 02 Oct, 2013 1 commit
    • Steven Whitehouse's avatar
      GFS2: Add allocation parameters structure · 7b9cff46
      Steven Whitehouse authored
      This patch adds a structure to contain allocation parameters with
      the intention of future expansion of this structure. The idea is
      that we should be able to add more information about the allocation
      in the future in order to allow the allocator to make a better job
      of placing the requests on-disk.
      
      There is no functional difference from applying this patch.
      Signed-off-by: Steven Whitehouse's avatarSteven Whitehouse <swhiteho@redhat.com>
      7b9cff46
  30. 27 Sep, 2013 1 commit
    • Steven Whitehouse's avatar
      GFS2: Clean up reservation removal · af5c2697
      Steven Whitehouse authored
      The reservation for an inode should be cleared when it is truncated so
      that we can start again at a different offset for future allocations.
      We could try and do better than that, by resetting the search based on
      where the truncation started from, but this is only a first step.
      
      In addition, there are three callers of gfs2_rs_delete() but only one
      of those should really be testing the value of i_writecount. While
      we get away with that in the other cases currently, I think it would
      be better if we made that test specific to the one case which
      requires it.
      Signed-off-by: Steven Whitehouse's avatarSteven Whitehouse <swhiteho@redhat.com>
      af5c2697
  31. 05 Sep, 2013 1 commit
    • Benjamin Marzinski's avatar
      GFS2: dirty inode correctly in gfs2_write_end · 0c901809
      Benjamin Marzinski authored
      GFS2 was only setting I_DIRTY_DATASYNC on files that it wrote to, when
      it actually increased the file size.  If gfs2_fsync was called without
      I_DIRTY_DATASYNC set, it didn't flush the incore data to the log before
      returning, so any metadata or journaled data changes were not getting
      fsynced. This meant that writes to the middle of files were not always
      getting fsynced properly.
      
      This patch makes gfs2 set I_DIRTY_DATASYNC whenever metadata has been
      updated during a write. It also make gfs2_sync flush the incore log
      if I_DIRTY_PAGES is set, and the file is using data journalling. This
      will make sure that all incore logged data gets written to disk before
      returning from a fsync.
      Signed-off-by: default avatarBenjamin Marzinski <bmarzins@redhat.com>
      Signed-off-by: Steven Whitehouse's avatarSteven Whitehouse <swhiteho@redhat.com>
      0c901809