9d7a20af | 08-Jul-2016 |
Arne Jansen <jansen@webgods.de> |
This commit fixes https://www.illumos.org/issues/6779.
Chronology of the events:
1. we have an empty directory 2. the filesystem is nearly out of quota 3. a snapshot prevents any space from being f
This commit fixes https://www.illumos.org/issues/6779.
Chronology of the events:
1. we have an empty directory 2. the filesystem is nearly out of quota 3. a snapshot prevents any space from being freed 4. a remote clients calls opendir via nfs4 5. the same client removes the directory 6. the client proceeds with readdir --> boom.
During 4, the client obtains a FH for the directory. During 5, the directory entry gets removed, the inode is added to the unlinked set and z_unlinked is set. Then the inode contents is deleted (dmu_free_long_range). Deletion of the inode itself fails because the fs ran out of space exactly at this moment. The inode is left in the unlinked set, the znode is freed. During 6, the readdir of the client instantiates a new znode for the (empty) inode, this time with z_unlinked unset. During zap read, the contents of the empty file is interpreted as a fatzap, which leads to the crash.
This patch addresses the problem twofold: 1. when instantiating a znode, set z_unlinked when z_links == 0 2. mark the deletion of the inode as netfree (in zfs_rmnode).
refs #3026
(cherry picked from commit 67738a4fd5331c5c62b9fead7a7739afa2476cf9)
show more ...
|
4b7f25f9 | 30-Jun-2016 |
Arne Jansen <jansen@webgods.de> |
ZFS: vdev_avoid_read
Avoid reading from a disk if possible. This can be used during resilver to avoid reading from a bad data disk, but leave it in the pool for redundancy. Configure via mdb: ::spa
ZFS: vdev_avoid_read
Avoid reading from a disk if possible. This can be used during resilver to avoid reading from a bad data disk, but leave it in the pool for redundancy. Configure via mdb: ::spa -v to find the vdev <vdev>::print -a vdev_avoid_read to get the address <addr>/v 1 to set the feature
refs #3106
(cherry picked from commit c3a1418d1a4c19d574cfbf275daf91a0d44b7340)
show more ...
|