diff options
author | perrin <none@none> | 2007-08-23 12:02:19 -0700 |
---|---|---|
committer | perrin <none@none> | 2007-08-23 12:02:19 -0700 |
commit | 3a8a1de4a7950ac5cf7ca65f761e324145e7237b (patch) | |
tree | 2b7cd580a8bb99697edce3841bdae995d3a4e0bf /usr/src/uts/common/fs/zfs/zfs_vfsops.c | |
parent | 19d61fc7991644175873937566d932d8cf52912a (diff) | |
download | illumos-gate-3a8a1de4a7950ac5cf7ca65f761e324145e7237b.tar.gz |
6534949 Stale need for range locking comment in zvol.c
6562988 ZIL replay fails when filesystem is mounted read-only
6580645 cannot rollback filesystems with unplayed intent log records
Diffstat (limited to 'usr/src/uts/common/fs/zfs/zfs_vfsops.c')
-rw-r--r-- | usr/src/uts/common/fs/zfs/zfs_vfsops.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr/src/uts/common/fs/zfs/zfs_vfsops.c b/usr/src/uts/common/fs/zfs/zfs_vfsops.c index 45eb32ac6d..1b7661f485 100644 --- a/usr/src/uts/common/fs/zfs/zfs_vfsops.c +++ b/usr/src/uts/common/fs/zfs/zfs_vfsops.c @@ -583,11 +583,20 @@ zfs_domount(vfs_t *vfsp, char *osname, cred_t *cr) xattr_changed_cb(zfsvfs, xattr); zfsvfs->z_issnap = B_TRUE; } else { + uint_t readonly; + error = zfs_register_callbacks(vfsp); if (error) goto out; - if (!(zfsvfs->z_vfs->vfs_flag & VFS_RDONLY)) + /* + * During replay we remove the read only flag to + * allow replays to succeed. + */ + readonly = zfsvfs->z_vfs->vfs_flag & VFS_RDONLY; + if (readonly != 0) + zfsvfs->z_vfs->vfs_flag &= ~VFS_RDONLY; + else zfs_unlinked_drain(zfsvfs); /* @@ -618,6 +627,8 @@ zfs_domount(vfs_t *vfsp, char *osname, cred_t *cr) zil_replay(zfsvfs->z_os, zfsvfs, &zfsvfs->z_assign, zfs_replay_vector); + zfsvfs->z_vfs->vfs_flag |= readonly; /* restore readonly bit */ + if (!zil_disable) zfsvfs->z_log = zil_open(zfsvfs->z_os, zfs_get_data); } |