[PATCH 1/5] xfs: do eofb filtering before dirty check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reorder xfs_inode_free_eofblocks() so the explicit eofb filtering (i.e.,
uid, etc.) occurs before the dirty mapping check. This facilitates the
addition of a flush flag.

If we want to issue a flush, we should do so after the filtering logic
but before the dirty check since a flush reduces the likelihood we skip
an inode due to a dirty mapping.

Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>
---
 fs/xfs/xfs_icache.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
index 98d3524..7ff59c9 100644
--- a/fs/xfs/xfs_icache.c
+++ b/fs/xfs/xfs_icache.c
@@ -1223,14 +1223,6 @@ xfs_inode_free_eofblocks(
 		return 0;
 	}
 
-	/*
-	 * If the mapping is dirty the operation can block and wait for some
-	 * time. Unless we are waiting, skip it.
-	 */
-	if (!(flags & SYNC_WAIT) &&
-	    mapping_tagged(VFS_I(ip)->i_mapping, PAGECACHE_TAG_DIRTY))
-		return 0;
-
 	if (eofb) {
 		if (!xfs_inode_match_id(ip, eofb))
 			return 0;
@@ -1241,6 +1233,14 @@ xfs_inode_free_eofblocks(
 			return 0;
 	}
 
+	/*
+	 * If the mapping is dirty the operation can block and wait for some
+	 * time. Unless we are waiting, skip it.
+	 */
+	if (!(flags & SYNC_WAIT) &&
+	    mapping_tagged(VFS_I(ip)->i_mapping, PAGECACHE_TAG_DIRTY))
+		return 0;
+
 	ret = xfs_free_eofblocks(ip->i_mount, ip, true);
 
 	/* don't revisit the inode if we're not waiting */
-- 
1.8.3.1

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux