1. 20 4月, 2011 2 次提交
    • S
      GFS2: Alter point of entry to glock lru list for glocks with an address_space · 29687a2a
      Steven Whitehouse 提交于
      Rather than allowing the glocks to be scheduled for possible
      reclaim as soon as they have exited the journal, this patch
      delays their entry to the list until the glocks in question
      are no longer in use.
      
      This means that we will rely on the vm for writeback of all
      dirty data and metadata from now on. When glocks are added
      to the lru list they should be freeable much faster since all
      the I/O required to free them should have already been completed.
      
      This should lead to much better I/O patterns under low memory
      conditions.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      29687a2a
    • S
      GFS2: Make ->write_inode() really write · 1027efaa
      Steven Whitehouse 提交于
      The GFS2 ->write_inode function should be more aggressive at writing
      back to the filesystem. This adopts the XFS system of returning
      -EAGAIN when the writeback has not been completely done. Also, we
      now kick off in-place writeback when called with WB_SYNC_NONE,
      but we only wait for it and flush the log when WB_SYNC_ALL is
      requested.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      1027efaa
  2. 18 4月, 2011 2 次提交
  3. 31 3月, 2011 1 次提交
  4. 18 1月, 2011 1 次提交
    • B
      GFS2: remove iopen glocks from cache on failed deletes · 23c30108
      Benjamin Marzinski 提交于
      When a file gets deleted on GFS2, if a node can't get an exclusive lock on the
      file's iopen glock, it punts on actually freeing up the space, because another
      node is using the file.  When it does this, it needs to drop the iopen glock
      from its cache so that the other node can get an exclusive lock on it. Now,
      gfs2_delete_inode() sets GL_NOCACHE before dropping the shared lock on the
      iopen glock in preparation for grabbing it in the exclusive state.  Since the
      node needs the glock in the exclusive state, dropping the shared lock from the
      cache doesn't slow down the case where no other nodes are using the file.
      Signed-off-by: NBenjamin Marzinski <bmarzins@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      23c30108
  5. 07 1月, 2011 1 次提交
    • N
      fs: icache RCU free inodes · fa0d7e3d
      Nick Piggin 提交于
      RCU free the struct inode. This will allow:
      
      - Subsequent store-free path walking patch. The inode must be consulted for
        permissions when walking, so an RCU inode reference is a must.
      - sb_inode_list_lock to be moved inside i_lock because sb list walkers who want
        to take i_lock no longer need to take sb_inode_list_lock to walk the list in
        the first place. This will simplify and optimize locking.
      - Could remove some nested trylock loops in dcache code
      - Could potentially simplify things a bit in VM land. Do not need to take the
        page lock to follow page->mapping.
      
      The downsides of this is the performance cost of using RCU. In a simple
      creat/unlink microbenchmark, performance drops by about 10% due to inability to
      reuse cache-hot slab objects. As iterations increase and RCU freeing starts
      kicking over, this increases to about 20%.
      
      In cases where inode lifetimes are longer (ie. many inodes may be allocated
      during the average life span of a single inode), a lot of this cache reuse is
      not applicable, so the regression caused by this patch is smaller.
      
      The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU,
      however this adds some complexity to list walking and store-free path walking,
      so I prefer to implement this at a later date, if it is shown to be a win in
      real situations. I haven't found a regression in any non-micro benchmark so I
      doubt it will be a problem.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fa0d7e3d
  6. 26 10月, 2010 1 次提交
    • A
      gfs2: invalidate_inodes() is no-op there · 9dcefee5
      Al Viro 提交于
      In fill_super() we hadn't MS_ACTIVE set yet, so there won't
      be any inodes with zero i_count sitting around.
      
      In put_super() we already have MS_ACTIVE removed *and* we
      had called invalidate_inodes() since then.  So again there
      won't be any inodes with zero i_count...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      9dcefee5
  7. 29 9月, 2010 1 次提交
  8. 24 9月, 2010 1 次提交
  9. 23 9月, 2010 2 次提交
    • S
      GFS2: Remove localcaching mount option · c2048b00
      Steven Whitehouse 提交于
      This option defaulted to on for lock_nolock mounts and off
      otherwise. The only function was to avoid the revalidation of
      dentries. In the cluster case, that is entirely pointless and
      liable to cause coherency problems.
      
      The patch changes the revalidation to depend upon whether the
      fs is a local or cluster fs (i.e. it follows the existing default
      behaviour). I very much doubt anybody ever used this option as
      there is no reason to. Even so we will continue to accept it
      on the mount command line, but ignore it.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      c2048b00
    • S
      GFS2: Remove ignore_local_fs mount argument · f57a024e
      Steven Whitehouse 提交于
      This is been a no-op for a very long time now. I'm pretty sure
      nobody uses it, but just in case we'll still accept it on the
      command line, but ignore it.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      f57a024e
  10. 20 9月, 2010 1 次提交
  11. 10 8月, 2010 2 次提交
  12. 29 7月, 2010 1 次提交
  13. 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
  14. 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
  15. 06 3月, 2010 1 次提交
  16. 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
  17. 01 3月, 2010 2 次提交
    • 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
    • S
      GFS2: Metadata address space clean up · 009d8518
      Steven Whitehouse 提交于
      Since the start of GFS2, an "extra" inode has been used to store
      the metadata belonging to each inode. The only reason for using
      this inode was to have an extra address space, the other fields
      were unused. This means that the memory usage was rather inefficient.
      
      The reason for keeping each inode's metadata in a separate address
      space is that when glocks are requested on remote nodes, we need to
      be able to efficiently locate the data and metadata which relating
      to that glock (inode) in order to sync or sync and invalidate it
      (depending on the remotely requested lock mode).
      
      This patch adds a new type of glock, which has in addition to
      its normal fields, has an address space. This applies to all
      inode and rgrp glocks (but to no other glock types which remain
      as before). As a result, we no longer need to have the second
      inode.
      
      This results in three major improvements:
       1. A saving of approx 25% of memory used in caching inodes
       2. A removal of the circular dependency between inodes and glocks
       3. No confusion between "normal" and "metadata" inodes in super.c
      
      Although the first of these is the more immediately apparent, the
      second is just as important as it now enables a number of clean
      ups at umount time. Those will be the subject of future patches.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      009d8518
  18. 03 2月, 2010 2 次提交
  19. 03 12月, 2009 6 次提交
  20. 09 9月, 2009 1 次提交
    • S
      GFS2: Be extra careful about deallocating inodes · acf7e244
      Steven Whitehouse 提交于
      There is a potential race in the inode deallocation code if two
      nodes try to deallocate the same inode at the same time. Most of
      the issue is solved by the iopen locking. There is still a small
      window which is not covered by the iopen lock. This patches fixes
      that and also makes the deallocation code more robust in the face of
      any errors in the rgrp bitmaps, or erroneous iopen callbacks from
      other nodes.
      
      This does introduce one extra disk read, but that is generally not
      an issue since its the same block that must be written to later
      in the deallocation process. The total disk accesses therefore stay
      the same,
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      acf7e244
  21. 27 8月, 2009 2 次提交
    • S
      GFS2: Remove no_formal_ino generating code · 8d8291ae
      Steven Whitehouse 提交于
      The inum structure used throughout GFS2 has two fields. One
      no_addr is the disk block number of the inode in question and
      is used everywhere as the inode number. The other, no_formal_ino,
      is used only as the generation number for NFS.
      
      Historically the no_formal_ino field was set using a complicated
      system of one global and one per-node file containing inode numbers
      in order to ensure that each no_formal_ino was unique. Also this
      code made no provision for what would happen when eventually the
      (64 bit) numbers ran out. Now I know that is pretty unlikely to
      happen given the large space of numbers, but it is possible
      nevertheless.
      
      The only guarantee required for no_formal_ino is that, for any
      single inode, the same number doesn't get reused too quickly.
      
      We already have a generation number which is kept in the inode
      and initialised from a counter in the resource group (almost
      no overhead, since we have to touch the resource group anyway
      in order to allocate an inode in the first place). Aside from
      ensuring that we never use the value 0 in the no_formal_ino
      field, we can use that counter directly.
      
      As a result of that change, we lose about 200 lines of code and
      also gain about 10 creates/sec on the postmark benchmark (on
      my test machine).
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      8d8291ae
    • S
      GFS2: Rename eattr.[ch] as xattr.[ch] · 307cf6e6
      Steven Whitehouse 提交于
      Use the more conventional name for the extended attribute
      support code. Update all the places which care.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      307cf6e6
  22. 24 8月, 2009 1 次提交
    • B
      GFS2: Add "-o errors=panic|withdraw" mount options · d34843d0
      Bob Peterson 提交于
      This patch adds "-o errors=panic" and "-o errors=withdraw" to the
      gfs2 mount options.  The "errors=withdraw" option is today's
      current behaviour, meaning to withdraw from the file system if a
      non-serious gfs2 error occurs.  The new "errors=panic" option
      tells gfs2 to force a kernel panic if a non-serious gfs2 file
      system error occurs.  This may be useful, for example, where
      fabric-level fencing is used that has no way to reboot (such as
      fence_scsi).
      Signed-off-by: NBob Peterson <rpeterso@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      d34843d0
  23. 17 8月, 2009 1 次提交
    • S
      GFS2: Add online uevent to GFS2 · 8633ecfa
      Steven Whitehouse 提交于
      We already have an offline uevent (used when a withdraw occurs)
      but no online uevent. This adds an online uevent so that userspace
      will be able to detect a successful mount by means other than
      not receiving a remove event after the add & recovery (change)
      uevents.
      
      It has also been added to the remount path as well - we can't use
      a change uevent there as older GFS2 userspace acts on change uevents
      according to the state that it thinks the fs is in, so we can't
      easily add any new ones.
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      8633ecfa
  24. 30 7月, 2009 2 次提交
    • B
      GFS2: remove dcache entries for remote deleted inodes · b94a170e
      Benjamin Marzinski 提交于
      When a file is deleted from a gfs2 filesystem on one node, a dcache
      entry for it may still exist on other nodes in the cluster. If this
      happens, gfs2 will be unable to free this file on disk. Because of this,
      it's possible to have a gfs2 filesystem with no files on it and no free
      space. With this patch, when a node receives a callback notifying it
      that the file is being deleted on another node, it schedules a new
      workqueue thread to remove the file's dcache entry.
      Signed-off-by: NBenjamin Marzinski <bmarzins@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      b94a170e
    • B
      GFS2: keep statfs info in sync on grows · 1946f70a
      Benjamin Marzinski 提交于
      GFS2 wasn't syncing its statfs info on grows.  This causes a problem
      when you grow the filesystem on multiple nodes.  GFS2 would calculate
      the new space based on the resource groups (which are always current),
      and then assume that the filesystem had grown the from the existing
      statfs size.  If you grew the filesystem on two different nodes in a
      short time, the second node wouldn't see the statfs size change from the
      first node, and would assume that it was grown by a larger amount than
      it was.  When all these changes were synced out, the total fileystem
      size would be incorrect (the first grow would be counted twice).
      
      This patch syncs makes GFS2 read in the statfs changes from disk before
      a grow, and write them out after the grow, while the master statfs inode
      is locked.
      Signed-off-by: NBenjamin Marzinski <bmarzins@redhat.com>
      Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
      1946f70a
  25. 12 6月, 2009 3 次提交