On Tue, Mar 14, 2017 at 06:23:57PM -0500, Eric Sandeen wrote: > When we do log recovery on a readonly mount, unlinked inode > processing does not happen due to the readonly checks in > xfs_inactive(), which are trying to prevent any I/O on a > readonly mount. > > This is misguided - we do I/O on readonly mounts all the time, > for consistency; for example, log recovery. So do the same > RDONLY flag twiddling around xfs_log_mount_finish() as we > do around xfs_log_mount(), for the same reason. > > This all cries out for a big rework but for now this is a > simple fix to an obvious problem. > > Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx> > --- > Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx> > V2: And now for something completely different... > > diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c > index 62176b8..374edc1 100644 > --- a/fs/xfs/xfs_log.c > +++ b/fs/xfs/xfs_log.c > @@ -743,16 +743,23 @@ > struct xfs_mount *mp) > { > int error = 0; > + int readonly = (mp->m_flags & XFS_MOUNT_RDONLY); > > if (mp->m_flags & XFS_MOUNT_NORECOVERY) { > ASSERT(mp->m_flags & XFS_MOUNT_RDONLY); > return 0; > + } else if (readonly) { > + /* Allow unlinked processing to proceed */ > + mp->m_flags &= ~XFS_MOUNT_RDONLY; > } > > error = xlog_recover_finish(mp->m_log); > if (!error) > xfs_log_work_queue(mp); > > + if (readonly) > + mp->m_flags |= XFS_MOUNT_RDONLY; > + > return error; > } > > > -- > 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 -- 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