Erik was seeing this because he had a couple files in an odd state
(probably due to a crash) with speculatively-allocated blocks remaining
past EOF. When he tried to tar up the read-only snapshot, and read
each file, xfs tried to clean up these past-EOF-blocks when the file
was closed. This generated I/O on a read-only device, which failed,
and shut down the fs.
See below for how this mod works around this problem.
Prevent a couple transactions from happening on ro mounts
Date: Sat Oct 26 19:27:15 PDT 2002
Workarea:
stout.americas.sgi.com:/localhome/src/sandeen/2.4.x-xfs/workarea-alwaysclean
The following file(s) were checked into:
bonnie.engr.sgi.com:/isms/slinx/2.4.x-xfs
Modid: 2.4.x-xfs:slinx:131187a
linux/fs/xfs/xfs_log.c - 1.260
- Temporarily turn off VFS_RDONLY flag for read-only mounts,
during recovery. (Recovery still won't proceed, however,
on a read-only device).
linux/fs/xfs/xfs_vnodeops.c - 1.571
- Before calling xfs_inactive_free_eofblocks, check for VFS_RDONLY.
Don't do it if it's set, as this may be a read-only device,
and the resulting log I/O would shut down the fs.
If this is just a read-only mount & we're recovering the log,
VFS_RDONLY will be turned off and we'll proceed.
|