]> Git Repo - linux.git/commitdiff
Merge branch 'xfs-4.7-error-cfg' into for-next
authorDave Chinner <[email protected]>
Fri, 20 May 2016 00:33:38 +0000 (10:33 +1000)
committerDave Chinner <[email protected]>
Fri, 20 May 2016 00:33:38 +0000 (10:33 +1000)
1  2 
fs/xfs/xfs_mount.c
fs/xfs/xfs_trace.h

diff --combined fs/xfs/xfs_mount.c
index 654799f716fc3918802c06914751bee4f4beaf50,7c05a22c1a73badc95c6579cd475d064a4677c6f..3b67b1470664a81f73ce214309a2102234ecf221
@@@ -89,6 -89,7 +89,6 @@@ xfs_uuid_mount
        if (hole < 0) {
                xfs_uuid_table = kmem_realloc(xfs_uuid_table,
                        (xfs_uuid_table_size + 1) * sizeof(*xfs_uuid_table),
 -                      xfs_uuid_table_size  * sizeof(*xfs_uuid_table),
                        KM_SLEEP);
                hole = xfs_uuid_table_size++;
        }
@@@ -680,6 -681,9 +680,9 @@@ xfs_mountfs
  
        xfs_set_maxicount(mp);
  
+       /* enable fail_at_unmount as default */
+       mp->m_fail_unmount = 1;
        error = xfs_sysfs_init(&mp->m_kobj, &xfs_mp_ktype, NULL, mp->m_fsname);
        if (error)
                goto out;
        if (error)
                goto out_remove_sysfs;
  
-       error = xfs_uuid_mount(mp);
+       error = xfs_error_sysfs_init(mp);
        if (error)
                goto out_del_stats;
  
+       error = xfs_uuid_mount(mp);
+       if (error)
+               goto out_remove_error_sysfs;
        /*
         * Set the minimum read and write sizes
         */
        cancel_delayed_work_sync(&mp->m_reclaim_work);
        xfs_reclaim_inodes(mp, SYNC_WAIT);
   out_log_dealloc:
+       mp->m_flags |= XFS_MOUNT_UNMOUNTING;
        xfs_log_mount_cancel(mp);
   out_fail_wait:
        if (mp->m_logdev_targp && mp->m_logdev_targp != mp->m_ddev_targp)
        xfs_da_unmount(mp);
   out_remove_uuid:
        xfs_uuid_unmount(mp);
+  out_remove_error_sysfs:
+       xfs_error_sysfs_del(mp);
   out_del_stats:
        xfs_sysfs_del(&mp->m_stats.xs_kobj);
   out_remove_sysfs:
@@@ -1004,6 -1016,14 +1015,14 @@@ xfs_unmountfs
         */
        xfs_log_force(mp, XFS_LOG_SYNC);
  
+       /*
+        * We now need to tell the world we are unmounting. This will allow
+        * us to detect that the filesystem is going away and we should error
+        * out anything that we have been retrying in the background. This will
+        * prevent neverending retries in AIL pushing from hanging the unmount.
+        */
+       mp->m_flags |= XFS_MOUNT_UNMOUNTING;
        /*
         * Flush all pending changes from the AIL.
         */
  #endif
        xfs_free_perag(mp);
  
+       xfs_error_sysfs_del(mp);
        xfs_sysfs_del(&mp->m_stats.xs_kobj);
        xfs_sysfs_del(&mp->m_kobj);
  }
diff --combined fs/xfs/xfs_trace.h
index 840d52e38f10bf1371c9e56b30a09ccab4040cb5,a133dd4c43bc17854e694a58ce5316cc541d8c67..ea94ee0fe5ea2b8e9e089b857d82a30057e0b950
@@@ -364,7 -364,6 +364,6 @@@ DEFINE_BUF_EVENT(xfs_buf_delwri_split)
  DEFINE_BUF_EVENT(xfs_buf_get_uncached);
  DEFINE_BUF_EVENT(xfs_bdstrat_shut);
  DEFINE_BUF_EVENT(xfs_buf_item_relse);
- DEFINE_BUF_EVENT(xfs_buf_item_iodone);
  DEFINE_BUF_EVENT(xfs_buf_item_iodone_async);
  DEFINE_BUF_EVENT(xfs_buf_error_relse);
  DEFINE_BUF_EVENT(xfs_buf_wait_buftarg);
@@@ -944,6 -943,7 +943,6 @@@ DECLARE_EVENT_CLASS(xfs_loggrant_class
        TP_ARGS(log, tic),
        TP_STRUCT__entry(
                __field(dev_t, dev)
 -              __field(unsigned, trans_type)
                __field(char, ocnt)
                __field(char, cnt)
                __field(int, curr_res)
        ),
        TP_fast_assign(
                __entry->dev = log->l_mp->m_super->s_dev;
 -              __entry->trans_type = tic->t_trans_type;
                __entry->ocnt = tic->t_ocnt;
                __entry->cnt = tic->t_cnt;
                __entry->curr_res = tic->t_curr_res;
                __entry->curr_block = log->l_curr_block;
                __entry->tail_lsn = atomic64_read(&log->l_tail_lsn);
        ),
 -      TP_printk("dev %d:%d type %s t_ocnt %u t_cnt %u t_curr_res %u "
 +      TP_printk("dev %d:%d t_ocnt %u t_cnt %u t_curr_res %u "
                  "t_unit_res %u t_flags %s reserveq %s "
                  "writeq %s grant_reserve_cycle %d "
                  "grant_reserve_bytes %d grant_write_cycle %d "
                  "grant_write_bytes %d curr_cycle %d curr_block %d "
                  "tail_cycle %d tail_block %d",
                  MAJOR(__entry->dev), MINOR(__entry->dev),
 -                __print_symbolic(__entry->trans_type, XFS_TRANS_TYPES),
                  __entry->ocnt,
                  __entry->cnt,
                  __entry->curr_res,
@@@ -1050,21 -1052,19 +1049,21 @@@ DECLARE_EVENT_CLASS(xfs_log_item_class
  )
  
  TRACE_EVENT(xfs_log_force,
 -      TP_PROTO(struct xfs_mount *mp, xfs_lsn_t lsn),
 -      TP_ARGS(mp, lsn),
 +      TP_PROTO(struct xfs_mount *mp, xfs_lsn_t lsn, unsigned long caller_ip),
 +      TP_ARGS(mp, lsn, caller_ip),
        TP_STRUCT__entry(
                __field(dev_t, dev)
                __field(xfs_lsn_t, lsn)
 +              __field(unsigned long, caller_ip)
        ),
        TP_fast_assign(
                __entry->dev = mp->m_super->s_dev;
                __entry->lsn = lsn;
 +              __entry->caller_ip = caller_ip;
        ),
 -      TP_printk("dev %d:%d lsn 0x%llx",
 +      TP_printk("dev %d:%d lsn 0x%llx caller %ps",
                  MAJOR(__entry->dev), MINOR(__entry->dev),
 -                __entry->lsn)
 +                __entry->lsn, (void *)__entry->caller_ip)
  )
  
  #define DEFINE_LOG_ITEM_EVENT(name) \
This page took 0.076816 seconds and 4 git commands to generate.