]> Git Repo - linux.git/blobdiff - fs/xfs/xfs_super.c
s390/mm: remember the int code for the last gmap fault
[linux.git] / fs / xfs / xfs_super.c
index b412bb1c5fd395f10ee8a023fd33672301bc8e4b..11ea5d51db56715cf2815dbda8ab3577ee0fd686 100644 (file)
@@ -556,10 +556,10 @@ xfs_max_file_offset(
        /* Figure out maximum filesize, on Linux this can depend on
         * the filesystem blocksize (on 32 bit platforms).
         * __block_write_begin does this in an [unsigned] long...
-        *      page->index << (PAGE_CACHE_SHIFT - bbits)
+        *      page->index << (PAGE_SHIFT - bbits)
         * So, for page sized blocks (4K on 32 bit platforms),
         * this wraps at around 8Tb (hence MAX_LFS_FILESIZE which is
-        *      (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
+        *      (((u64)PAGE_SIZE << (BITS_PER_LONG-1))-1)
         * but for smaller blocksizes it is less (bbits = log2 bsize).
         * Note1: get_block_t takes a long (implicit cast from above)
         * Note2: The Large Block Device (LBD and HAVE_SECTOR_T) patch
@@ -570,10 +570,10 @@ xfs_max_file_offset(
 #if BITS_PER_LONG == 32
 # if defined(CONFIG_LBDAF)
        ASSERT(sizeof(sector_t) == 8);
-       pagefactor = PAGE_CACHE_SIZE;
+       pagefactor = PAGE_SIZE;
        bitshift = BITS_PER_LONG;
 # else
-       pagefactor = PAGE_CACHE_SIZE >> (PAGE_CACHE_SHIFT - blockshift);
+       pagefactor = PAGE_SIZE >> (PAGE_SHIFT - blockshift);
 # endif
 #endif
 
@@ -928,7 +928,7 @@ xfs_fs_alloc_inode(
 
 /*
  * Now that the generic code is guaranteed not to be accessing
- * the linux inode, we can reclaim the inode.
+ * the linux inode, we can inactivate and reclaim the inode.
  */
 STATIC void
 xfs_fs_destroy_inode(
@@ -938,9 +938,14 @@ xfs_fs_destroy_inode(
 
        trace_xfs_destroy_inode(ip);
 
-       XFS_STATS_INC(ip->i_mount, vn_reclaim);
+       ASSERT(!rwsem_is_locked(&ip->i_iolock.mr_lock));
+       XFS_STATS_INC(ip->i_mount, vn_rele);
+       XFS_STATS_INC(ip->i_mount, vn_remove);
+
+       xfs_inactive(ip);
 
        ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_blks == 0);
+       XFS_STATS_INC(ip->i_mount, vn_reclaim);
 
        /*
         * We should never get here with one of the reclaim flags already set.
@@ -987,24 +992,6 @@ xfs_fs_inode_init_once(
                     "xfsino", ip->i_ino);
 }
 
-STATIC void
-xfs_fs_evict_inode(
-       struct inode            *inode)
-{
-       xfs_inode_t             *ip = XFS_I(inode);
-
-       ASSERT(!rwsem_is_locked(&ip->i_iolock.mr_lock));
-
-       trace_xfs_evict_inode(ip);
-
-       truncate_inode_pages_final(&inode->i_data);
-       clear_inode(inode);
-       XFS_STATS_INC(ip->i_mount, vn_rele);
-       XFS_STATS_INC(ip->i_mount, vn_remove);
-
-       xfs_inactive(ip);
-}
-
 /*
  * We do an unlocked check for XFS_IDONTCACHE here because we are already
  * serialised against cache hits here via the inode->i_lock and igrab() in
@@ -1568,14 +1555,12 @@ xfs_fs_fill_super(
 
        if (mp->m_flags & XFS_MOUNT_DAX) {
                xfs_warn(mp,
-       "DAX enabled. Warning: EXPERIMENTAL, use at your own risk");
-               if (sb->s_blocksize != PAGE_SIZE) {
-                       xfs_alert(mp,
-               "Filesystem block size invalid for DAX Turning DAX off.");
-                       mp->m_flags &= ~XFS_MOUNT_DAX;
-               } else if (!sb->s_bdev->bd_disk->fops->direct_access) {
+               "DAX enabled. Warning: EXPERIMENTAL, use at your own risk");
+
+               error = bdev_dax_supported(sb, sb->s_blocksize);
+               if (error) {
                        xfs_alert(mp,
-               "Block device does not support DAX Turning DAX off.");
+                       "DAX unsupported by block device. Turning off DAX.");
                        mp->m_flags &= ~XFS_MOUNT_DAX;
                }
        }
@@ -1673,7 +1658,6 @@ xfs_fs_free_cached_objects(
 static const struct super_operations xfs_super_operations = {
        .alloc_inode            = xfs_fs_alloc_inode,
        .destroy_inode          = xfs_fs_destroy_inode,
-       .evict_inode            = xfs_fs_evict_inode,
        .drop_inode             = xfs_fs_drop_inode,
        .put_super              = xfs_fs_put_super,
        .sync_fs                = xfs_fs_sync_fs,
This page took 0.034707 seconds and 4 git commands to generate.