Actions
Bug #6874
closedrollback and receive need to reset ZPL state to what's on disk
Start date:
2016-04-09
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
Description
When we do a clone swap (caused by "zfs rollback" or "zfs receive"), the ZPL doesn't completely reload the state from the DMU; some values remain cached in the zfsvfs_t.
steps to reproduce:
```
#!/bin/bash -x
zfs destroy -R test/fs
zfs destroy -R test/recvd
zfs create test/fs
zfs snapshot test/fs@a
zfs set userquota@$USER=1m test/fs
zfs snapshot test/fs@b
zfs send -i @a test/fs@b | zfs recv test/recvd
zfs userspace test/recvd
- should show 1m quota
dd if=/dev/urandom of=/test/recvd/file bs=1k count=1024
sync
dd if=/dev/urandom of=/test/recvd/file2 bs=1k count=1024 - should fail with ENOSPC
sync
zfs unmount test/recvd
zfs mount test/recvd
zfs userspace test/recvd - if bug above, now shows 1m quota
dd if=/dev/urandom of=/test/recvd/file3 bs=1k count=1024 - if bug above, now fails with ENOSPC
```
Related issues
Updated by Andriy Gapon about 6 years ago
- Related to Bug #5867: zfs_resume_fs() should refresh cached z_root value added
Updated by Electric Monk about 6 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 1fdcbd00c9cbac286b5f92e08877e8cb3c448420
commit 1fdcbd00c9cbac286b5f92e08877e8cb3c448420 Author: Matthew Ahrens <mahrens@delphix.com> Date: 2016-05-11T23:30:33.000Z 6874 rollback and receive need to reset ZPL state to what's on disk Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Paul Dagnelie <pcd@delphix.com> Approved by: Garrett D'Amore <garrett@damore.org>
Updated by Roman Strashkin about 4 years ago
- Related to Bug #9324: zfs-recv can be broken by some ZFS-ioctls added
Actions