Merge tag 'xfs-for-linus-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / fs / xfs / xfs_mount.h
index d639795..c1b798c 100644 (file)
@@ -44,15 +44,23 @@ enum {
  * Error numbers define the errors that are configurable.
  */
 enum {
+       XFS_ERR_METADATA,
        XFS_ERR_CLASS_MAX,
 };
 enum {
+       XFS_ERR_DEFAULT,
+       XFS_ERR_EIO,
+       XFS_ERR_ENOSPC,
+       XFS_ERR_ENODEV,
        XFS_ERR_ERRNO_MAX,
 };
 
+#define XFS_ERR_RETRY_FOREVER  -1
+
 struct xfs_error_cfg {
        struct xfs_kobj kobj;
        int             max_retries;
+       unsigned long   retry_timeout;  /* in jiffies, 0 = no timeout */
 };
 
 typedef struct xfs_mount {
@@ -146,6 +154,7 @@ typedef struct xfs_mount {
                                                /* low free space thresholds */
        struct xfs_kobj         m_kobj;
        struct xfs_kobj         m_error_kobj;
+       struct xfs_kobj         m_error_meta_kobj;
        struct xfs_error_cfg    m_error_cfg[XFS_ERR_CLASS_MAX][XFS_ERR_ERRNO_MAX];
        struct xstats           m_stats;        /* per-fs stats */
 
@@ -168,6 +177,7 @@ typedef struct xfs_mount {
         */
        __uint32_t              m_generation;
 
+       bool                    m_fail_unmount;
 #ifdef DEBUG
        /*
         * DEBUG mode instrumentation to test and/or trigger delayed allocation
@@ -186,6 +196,7 @@ typedef struct xfs_mount {
 #define XFS_MOUNT_WSYNC                (1ULL << 0)     /* for nfs - all metadata ops
                                                   must be synchronous except
                                                   for space allocations */
+#define XFS_MOUNT_UNMOUNTING   (1ULL << 1)     /* filesystem is unmounting */
 #define XFS_MOUNT_WAS_CLEAN    (1ULL << 3)
 #define XFS_MOUNT_FS_SHUTDOWN  (1ULL << 4)     /* atomic stop of all filesystem
                                                   operations, typically for
@@ -251,12 +262,12 @@ static inline unsigned long
 xfs_preferred_iosize(xfs_mount_t *mp)
 {
        if (mp->m_flags & XFS_MOUNT_COMPAT_IOSIZE)
-               return PAGE_CACHE_SIZE;
+               return PAGE_SIZE;
        return (mp->m_swidth ?
                (mp->m_swidth << mp->m_sb.sb_blocklog) :
                ((mp->m_flags & XFS_MOUNT_DFLT_IOSIZE) ?
                        (1 << (int)MAX(mp->m_readio_log, mp->m_writeio_log)) :
-                       PAGE_CACHE_SIZE));
+                       PAGE_SIZE));
 }
 
 #define XFS_LAST_UNMOUNT_WAS_CLEAN(mp) \
@@ -384,4 +395,7 @@ extern void xfs_set_low_space_thresholds(struct xfs_mount *);
 int    xfs_zero_extent(struct xfs_inode *ip, xfs_fsblock_t start_fsb,
                        xfs_off_t count_fsb);
 
+struct xfs_error_cfg * xfs_error_get_cfg(struct xfs_mount *mp,
+               int error_class, int error);
+
 #endif /* __XFS_MOUNT_H__ */