xfs_release & xfs_inactive both had early returns for readonly mounts. Ultimately, this means that when we do log recovery on a read-only mount, we do not process unlinked inodes, because of this misguided effort to not do /any/ IO, ever, on a readonly mount. IO at mount time is fine, and expected - after all we just got done doing log recovery! Even ro mounts, without the norecovery flag, can do enough IO to put the filesystem in a consistent state. We should not get here after mount is complete; at that point the vfs will not allow anything from userspace to make modifications which would get us here with any IO to do - we can't unlink files, or create blocks past eof, etc. So it's safe to just remove these checks. Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx> --- diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index edfa6a5..bf74165 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -1658,10 +1658,6 @@ if (!S_ISREG(VFS_I(ip)->i_mode) || (VFS_I(ip)->i_mode == 0)) return 0; - /* If this is a read-only mount, don't do this (would generate I/O) */ - if (mp->m_flags & XFS_MOUNT_RDONLY) - return 0; - if (!XFS_FORCED_SHUTDOWN(mp)) { int truncated; @@ -1896,10 +1892,6 @@ mp = ip->i_mount; ASSERT(!xfs_iflags_test(ip, XFS_IRECOVERY)); - /* If this is a read-only mount, don't do this (would generate I/O) */ - if (mp->m_flags & XFS_MOUNT_RDONLY) - return; - if (VFS_I(ip)->i_nlink != 0) { /* * force is true because we are evicting an inode from the -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html