]> Pileus Git - ~andy/linux/commitdiff
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 8 Jan 2012 21:05:29 +0000 (13:05 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 8 Jan 2012 21:05:29 +0000 (13:05 -0800)
* 'for-linus' of git://oss.sgi.com/xfs/xfs: (22 commits)
  xfs: mark the xfssyncd workqueue as non-reentrant
  xfs: simplify xfs_qm_detach_gdquots
  xfs: fix acl count validation in xfs_acl_from_disk()
  xfs: remove unused XBT_FORCE_SLEEP bit
  xfs: remove XFS_QMOPT_DQSUSER
  xfs: kill xfs_qm_idtodq
  xfs: merge xfs_qm_dqinit_core into the only caller
  xfs: add a xfs_dqhold helper
  xfs: simplify xfs_qm_dqattach_grouphint
  xfs: nest qm_dqfrlist_lock inside the dquot qlock
  xfs: flatten the dquot lock ordering
  xfs: implement lazy removal for the dquot freelist
  xfs: remove XFS_DQ_INACTIVE
  xfs: cleanup xfs_qm_dqlookup
  xfs: cleanup dquot locking helpers
  xfs: remove the sync_mode argument to xfs_qm_dqflush_all
  xfs: remove xfs_qm_sync
  xfs: make sure to really flush all dquots in xfs_qm_quotacheck
  xfs: untangle SYNC_WAIT and SYNC_TRYLOCK meanings for xfs_qm_dqflush
  xfs: remove the lid_size field in struct log_item_desc
  ...

Fix up trivial conflict in fs/xfs/xfs_sync.c

1  2 
fs/xfs/xfs_super.c
fs/xfs/xfs_sync.c

diff --combined fs/xfs/xfs_super.c
index 7b7669507ee38f5e64db218bad4769635286325e,5f955f42377eb55614b5dc260a7c69ec0a64c8c1..281961c1d81a73df18ab8dcf31c39e6be3d94588
@@@ -199,7 -199,6 +199,6 @@@ xfs_parseargs
        mp->m_flags |= XFS_MOUNT_BARRIER;
        mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE;
        mp->m_flags |= XFS_MOUNT_SMALL_INUMS;
-       mp->m_flags |= XFS_MOUNT_DELAYLOG;
  
        /*
         * These can be overridden by the mount option parsing.
                        mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE);
                        mp->m_qflags &= ~XFS_OQUOTA_ENFD;
                } else if (!strcmp(this_char, MNTOPT_DELAYLOG)) {
-                       mp->m_flags |= XFS_MOUNT_DELAYLOG;
+                       xfs_warn(mp,
+       "delaylog is the default now, option is deprecated.");
                } else if (!strcmp(this_char, MNTOPT_NODELAYLOG)) {
-                       mp->m_flags &= ~XFS_MOUNT_DELAYLOG;
                        xfs_warn(mp,
-       "nodelaylog is deprecated and will be removed in Linux 3.3");
+       "nodelaylog support has been removed, option is deprecated.");
                } else if (!strcmp(this_char, MNTOPT_DISCARD)) {
                        mp->m_flags |= XFS_MOUNT_DISCARD;
                } else if (!strcmp(this_char, MNTOPT_NODISCARD)) {
                return EINVAL;
        }
  
-       if ((mp->m_flags & XFS_MOUNT_DISCARD) &&
-           !(mp->m_flags & XFS_MOUNT_DELAYLOG)) {
-               xfs_warn(mp,
-       "the discard option is incompatible with the nodelaylog option");
-               return EINVAL;
-       }
  #ifndef CONFIG_XFS_QUOTA
        if (XFS_IS_QUOTA_RUNNING(mp)) {
                xfs_warn(mp, "quota support not available in this kernel.");
@@@ -501,7 -493,6 +493,6 @@@ xfs_showargs
                { XFS_MOUNT_ATTR2,              "," MNTOPT_ATTR2 },
                { XFS_MOUNT_FILESTREAMS,        "," MNTOPT_FILESTREAM },
                { XFS_MOUNT_GRPID,              "," MNTOPT_GRPID },
-               { XFS_MOUNT_DELAYLOG,           "," MNTOPT_DELAYLOG },
                { XFS_MOUNT_DISCARD,            "," MNTOPT_DISCARD },
                { 0, NULL }
        };
@@@ -868,6 -859,27 +859,6 @@@ xfs_fs_dirty_inode
        XFS_I(inode)->i_update_core = 1;
  }
  
 -STATIC int
 -xfs_log_inode(
 -      struct xfs_inode        *ip)
 -{
 -      struct xfs_mount        *mp = ip->i_mount;
 -      struct xfs_trans        *tp;
 -      int                     error;
 -
 -      tp = xfs_trans_alloc(mp, XFS_TRANS_FSYNC_TS);
 -      error = xfs_trans_reserve(tp, 0, XFS_FSYNC_TS_LOG_RES(mp), 0, 0, 0);
 -      if (error) {
 -              xfs_trans_cancel(tp, 0);
 -              return error;
 -      }
 -
 -      xfs_ilock(ip, XFS_ILOCK_EXCL);
 -      xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
 -      xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
 -      return xfs_trans_commit(tp, 0);
 -}
 -
  STATIC int
  xfs_fs_write_inode(
        struct inode            *inode,
  
        if (XFS_FORCED_SHUTDOWN(mp))
                return -XFS_ERROR(EIO);
 -      if (!ip->i_update_core)
 -              return 0;
  
 -      if (wbc->sync_mode == WB_SYNC_ALL) {
 +      if (wbc->sync_mode == WB_SYNC_ALL || wbc->for_kupdate) {
                /*
                 * Make sure the inode has made it it into the log.  Instead
                 * of forcing it all the way to stable storage using a
                 * ->sync_fs call do that for thus, which reduces the number
                 * of synchronous log forces dramatically.
                 */
 -              error = xfs_log_inode(ip);
 +              error = xfs_log_dirty_inode(ip, NULL, 0);
                if (error)
                        goto out;
                return 0;
        } else {
 +              if (!ip->i_update_core)
 +                      return 0;
 +
                /*
                 * We make this non-blocking if the inode is contended, return
                 * EAGAIN to indicate to the caller that they did not succeed.
@@@ -1014,17 -1025,10 +1005,10 @@@ xfs_fs_sync_fs
        int                     error;
  
        /*
-        * Not much we can do for the first async pass.  Writing out the
-        * superblock would be counter-productive as we are going to redirty
-        * when writing out other data and metadata (and writing out a single
-        * block is quite fast anyway).
-        *
-        * Try to asynchronously kick off quota syncing at least.
+        * Doing anything during the async pass would be counterproductive.
         */
-       if (!wait) {
-               xfs_qm_sync(mp, SYNC_TRYLOCK);
+       if (!wait)
                return 0;
-       }
  
        error = xfs_quiesce_data(mp);
        if (error)
@@@ -1238,9 -1242,9 +1222,9 @@@ xfs_fs_unfreeze
  STATIC int
  xfs_fs_show_options(
        struct seq_file         *m,
 -      struct vfsmount         *mnt)
 +      struct dentry           *root)
  {
 -      return -xfs_showargs(XFS_M(mnt->mnt_sb), m);
 +      return -xfs_showargs(XFS_M(root->d_sb), m);
  }
  
  /*
@@@ -1621,12 -1625,12 +1605,12 @@@ STATIC int __ini
  xfs_init_workqueues(void)
  {
        /*
-        * max_active is set to 8 to give enough concurency to allow
-        * multiple work operations on each CPU to run. This allows multiple
-        * filesystems to be running sync work concurrently, and scales with
-        * the number of CPUs in the system.
+        * We never want to the same work item to run twice, reclaiming inodes
+        * or idling the log is not going to get any faster by multiple CPUs
+        * competing for ressources.  Use the default large max_active value
+        * so that even lots of filesystems can perform these task in parallel.
         */
-       xfs_syncd_wq = alloc_workqueue("xfssyncd", WQ_CPU_INTENSIVE, 8);
+       xfs_syncd_wq = alloc_workqueue("xfssyncd", WQ_NON_REENTRANT, 0);
        if (!xfs_syncd_wq)
                return -ENOMEM;
        return 0;
diff --combined fs/xfs/xfs_sync.c
index f0994aedcd158c2db3d6f9b2bf4d21a4f819bec6,5b9ec37a3e0734602fde55a8efb7c0b7f8e8be08..72c01a1c16e7d16ca0a49e284addf7d884dbfea6
@@@ -336,32 -336,6 +336,32 @@@ xfs_sync_fsdata
        return error;
  }
  
 +int
 +xfs_log_dirty_inode(
 +      struct xfs_inode        *ip,
 +      struct xfs_perag        *pag,
 +      int                     flags)
 +{
 +      struct xfs_mount        *mp = ip->i_mount;
 +      struct xfs_trans        *tp;
 +      int                     error;
 +
 +      if (!ip->i_update_core)
 +              return 0;
 +
 +      tp = xfs_trans_alloc(mp, XFS_TRANS_FSYNC_TS);
 +      error = xfs_trans_reserve(tp, 0, XFS_FSYNC_TS_LOG_RES(mp), 0, 0, 0);
 +      if (error) {
 +              xfs_trans_cancel(tp, 0);
 +              return error;
 +      }
 +
 +      xfs_ilock(ip, XFS_ILOCK_EXCL);
 +      xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
 +      xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
 +      return xfs_trans_commit(tp, 0);
 +}
 +
  /*
   * When remounting a filesystem read-only or freezing the filesystem, we have
   * two phases to execute. This first phase is syncing the data before we
@@@ -385,20 -359,7 +385,17 @@@ xfs_quiesce_data
  {
        int                     error, error2 = 0;
  
-       xfs_qm_sync(mp, SYNC_TRYLOCK);
-       xfs_qm_sync(mp, SYNC_WAIT);
-       /* force out the newly dirtied log buffers */
 +      /*
 +       * Log all pending size and timestamp updates.  The vfs writeback
 +       * code is supposed to do this, but due to its overagressive
 +       * livelock detection it will skip inodes where appending writes
 +       * were written out in the first non-blocking sync phase if their
 +       * completion took long enough that it happened after taking the
 +       * timestamp for the cut-off in the blocking phase.
 +       */
 +      xfs_inode_ag_iterator(mp, xfs_log_dirty_inode, 0);
 +
+       /* force out the log */
        xfs_log_force(mp, XFS_LOG_SYNC);
  
        /* write superblock and hoover up shutdown errors */
@@@ -506,7 -467,6 +503,6 @@@ xfs_sync_worker
                        error = xfs_fs_log_dummy(mp);
                else
                        xfs_log_force(mp, 0);
-               error = xfs_qm_sync(mp, SYNC_TRYLOCK);
  
                /* start pushing all the metadata that is currently dirty */
                xfs_ail_push_all(mp->m_ail);