1. 23 Aug, 2011 1 commit
  2. 25 May, 2011 1 commit
  3. 09 Mar, 2011 1 commit
    • Abhijith Das's avatar
      GFS2: quota allows exceeding hard limit · 662e3a55
      Abhijith Das authored
      
      
      Immediately after being synced to disk, cached quotas are zeroed out and a
      subsequent access of the cached quotas results in incorrect zero values. This
      meant that gfs2 assumed the actual usage to be the zero (or near-zero) usage
      values it found in the cached quotas and comparison against warn/limits never
      triggered a quota violation.
      
      This patch adds a new flag QDF_REFRESH that is set after a sync so that the
      cached quotas are forcefully refreshed from disk on a subsequent access on
      seeing this flag set.
      
      Resolves: rhbz#675944
      Signed-off-by: default avatarAbhi Das <adas@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      662e3a55
  4. 07 Feb, 2011 1 commit
  5. 30 Nov, 2010 1 commit
  6. 19 Nov, 2010 1 commit
  7. 28 Sep, 2010 1 commit
  8. 20 Sep, 2010 1 commit
  9. 29 Jul, 2010 1 commit
  10. 21 Jul, 2010 1 commit
  11. 18 Jul, 2010 1 commit
    • Dave Chinner's avatar
      mm: add context argument to shrinker callback · 7f8275d0
      Dave Chinner authored
      
      
      The current shrinker implementation requires the registered callback
      to have global state to work from. This makes it difficult to shrink
      caches that are not global (e.g. per-filesystem caches). Pass the shrinker
      structure to the callback so that users can embed the shrinker structure
      in the context the shrinker needs to operate on and get back to it in the
      callback via container_of().
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      7f8275d0
  12. 15 Jul, 2010 1 commit
  13. 21 May, 2010 2 commits
    • Christoph Hellwig's avatar
      quota: unify ->set_dqblk · c472b432
      Christoph Hellwig authored
      
      
      Pass the larger struct fs_disk_quota to the ->set_dqblk operation so
      that the Q_SETQUOTA and Q_XSETQUOTA operations can be implemented
      with a single filesystem operation and we can retire the ->set_xquota
      operation.  The additional information (RT-subvolume accounting and
      warn counts) are left zero for the VFS quota implementation.
      
      Add new fieldmask values for setting the numer of blocks and inodes
      values which is required for the VFS quota, but wasn't for XFS.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      c472b432
    • Christoph Hellwig's avatar
      quota: unify ->get_dqblk · b9b2dd36
      Christoph Hellwig authored
      
      
      Pass the larger struct fs_disk_quota to the ->get_dqblk operation so
      that the Q_GETQUOTA and Q_XGETQUOTA operations can be implemented
      with a single filesystem operation and we can retire the ->get_xquota
      operation.  The additional information (RT-subvolume accounting and
      warn counts) are left zero for the VFS quota implementation.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      b9b2dd36
  14. 10 May, 2010 1 commit
    • Abhijith Das's avatar
      GFS2: Fix writing to non-page aligned gfs2_quota structures · 7e619bc3
      Abhijith Das authored
      
      
      This is the upstream fix for this bug. This patch differs
      from the RHEL5 fix (Red Hat bz #555754) which simply writes to the 8-byte
      value field of the quota. In upstream quota code, we're
      required to write the entire quota (88 bytes) which can be split
      across a page boundary. We check for such quotas, and read/write
      the two parts from/to the corresponding pages holding these parts.
      
      With this patch, I don't see the bug anymore using the reproducer
      in Red Hat bz 555754. I successfully ran a couple of simple tests/mounts/
      umounts and it doesn't seem like this patch breaks anything else.
      Signed-off-by: default avatarAbhi Das <adas@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      7e619bc3
  15. 05 May, 2010 1 commit
  16. 04 Mar, 2010 1 commit
    • Christoph Hellwig's avatar
      quota: move code from sync_quota_sb into vfs_quota_sync · 5fb324ad
      Christoph Hellwig authored
      
      
      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: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      5fb324ad
  17. 03 Dec, 2009 11 commits
  18. 22 May, 2009 1 commit
    • Steven Whitehouse's avatar
      GFS2: Clean up some file names · b1e71b06
      Steven Whitehouse authored
      
      
      This patch renames the ops_*.c files which have no counterpart
      without the ops_ prefix in order to shorten the name and make
      it more readable. In addition, ops_address.h (which was very
      small) is moved into inode.h and inode.h is cleaned up by
      adding extern where required.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      b1e71b06
  19. 15 Apr, 2009 2 commits
  20. 24 Mar, 2009 3 commits
    • Steven Whitehouse's avatar
      GFS2: Merge lock_dlm module into GFS2 · f057f6cd
      Steven Whitehouse authored
      
      
      This is the big patch that I've been working on for some time
      now. There are many reasons for wanting to make this change
      such as:
       o Reducing overhead by eliminating duplicated fields between structures
       o Simplifcation of the code (reduces the code size by a fair bit)
       o The locking interface is now the DLM interface itself as proposed
         some time ago.
       o Fewer lookups of glocks when processing replies from the DLM
       o Fewer memory allocations/deallocations for each glock
       o Scope to do further optimisations in the future (but this patch is
         more than big enough for now!)
      
      Please note that (a) this patch relates to the lock_dlm module and
      not the DLM itself, that is still a separate module; and (b) that
      we retain the ability to build GFS2 as a standalone single node
      filesystem with out requiring the DLM.
      
      This patch needs a lot of testing, hence my keeping it I restarted
      my -git tree after the last merge window. That way, this has the maximum
      exposure before its merged. This is (modulo a few minor bug fixes) the
      same patch that I've been posting on and off the the last three months
      and its passed a number of different tests so far.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      f057f6cd
    • Steven Whitehouse's avatar
      GFS2: Remove "double" locking in quota · 22077f57
      Steven Whitehouse authored
      
      
      We only really need a single spin lock for the quota data, so
      lets just use the lru lock for now.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      Cc: Abhijith Das <adas@redhat.com>
      22077f57
    • Abhijith Das's avatar
      GFS2: change gfs2_quota_scan into a shrinker · 0a7ab79c
      Abhijith Das authored
      
      
      Deallocation of gfs2_quota_data objects now happens on-demand through a
      shrinker instead of routinely deallocating through the quotad daemon.
      Signed-off-by: default avatarAbhijith Das <adas@redhat.com>
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      0a7ab79c
  21. 05 Jan, 2009 4 commits
    • Steven Whitehouse's avatar
      GFS2: Fix "truncate in progress" hang · 813e0c46
      Steven Whitehouse authored
      
      
      Following on from the recent clean up of gfs2_quotad, this patch moves
      the processing of "truncate in progress" inodes from the glock workqueue
      into gfs2_quotad. This fixes a hang due to the "truncate in progress"
      processing requiring glocks in order to complete.
      
      It might seem odd to use gfs2_quotad for this particular item, but
      we have to use a pre-existing thread since creating a thread implies
      a GFP_KERNEL memory allocation which is not allowed from the glock
      workqueue context. Of the existing threads, gfs2_logd and gfs2_recoverd
      may deadlock if used for this operation. gfs2_scand and gfs2_glockd are
      both scheduled for removal at some (hopefully not too distant) future
      point. That leaves only gfs2_quotad whose workload is generally fairly
      light and is easily adapted for this extra task.
      
      Also, as a result of this change, it opens the way for a future patch to
      make the reading of the inode's information asynchronous with respect to
      the glock workqueue, which is another improvement that has been on the list
      for some time now.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      813e0c46
    • Steven Whitehouse's avatar
      GFS2: Clean up & move gfs2_quotad · 37b2c837
      Steven Whitehouse authored
      
      
      This patch is a clean up of gfs2_quotad prior to giving it an
      extra job to do in addition to the current portfolio of updating
      the quota and statfs information from time to time.
      
      As a result it has been moved into quota.c allowing one of the
      functions it calls to be made static. Also the clean up allows
      the two existing functions to have separate timeouts and also
      to coexist with its future role of dealing with the "truncate in
      progress" inode flag.
      
      The (pointless) setting of gfs2_quotad_secs is removed since we
      arrange to only wake up quotad when one of the two timers expires.
      
      In addition the struct gfs2_quota_data is moved into a slab cache,
      mainly for easier debugging. It should also be possible to use
      a shrinker in the future, rather than the current scheme of scanning
      the quota data entries from time to time.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      37b2c837
    • Steven Whitehouse's avatar
      GFS2: Banish struct gfs2_dinode_host · 383f01fb
      Steven Whitehouse authored
      
      
      The final field in gfs2_dinode_host was the i_flags field. Thats
      renamed to i_diskflags in order to avoid confusion with the existing
      inode flags, and moved into the inode proper at a suitable location
      to avoid creating a "hole".
      
      At that point struct gfs2_dinode_host is no longer needed and as
      promised (quite some time ago!) it can now be removed completely.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      383f01fb
    • Steven Whitehouse's avatar
      GFS2: Move i_size from gfs2_dinode_host and rename it to i_disksize · c9e98886
      Steven Whitehouse authored
      
      
      This patch moved the i_size field from the gfs2_dinode_host and
      following the ext3 convention renames it i_disksize.
      Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
      c9e98886
  22. 11 Jul, 2008 1 commit
  23. 10 Apr, 2008 1 commit