summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_extfree_item.c
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2017-09-17 21:06:46 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-09-20 06:19:59 (GMT)
commit01d38e380746e5880d744c634f0c459ea6646dd9 (patch)
tree0b4c33bcedd6a661b7812b4cd6b3227893b7f989 /fs/xfs/xfs_extfree_item.c
parentec0d46ef8b7e35b4f7c82bcf12afbe96b711350f (diff)
downloadlinux-01d38e380746e5880d744c634f0c459ea6646dd9.tar.xz
xfs: write unmount record for ro mounts
commit 757a69ef6cf2bf839bd4088e5609ddddd663b0c4 upstream. There are dueling comments in the xfs code about intent for log writes when unmounting a readonly filesystem. In xfs_mountfs, we see the intent: /* * Now the log is fully replayed, we can transition to full read-only * mode for read-only mounts. This will sync all the metadata and clean * the log so that the recovery we just performed does not have to be * replayed again on the next mount. */ and it calls xfs_quiesce_attr(), but by the time we get to xfs_log_unmount_write(), it returns early for a RDONLY mount: * Don't write out unmount record on read-only mounts. Because of this, sequential ro mounts of a filesystem with a dirty log will replay the log each time, which seems odd. Fix this by writing an unmount record even for RO mounts, as long as norecovery wasn't specified (don't write a clean log record if a dirty log may still be there!) and the log device is writable. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/xfs/xfs_extfree_item.c')
0 files changed, 0 insertions, 0 deletions