freebsd kernel with SKQ
Go to file
Alexander Motin dbee84cc27 8930 zfs_zinactive: do not remove the node if the filesystem is readonly
illumos/illumos-gate@93c618e0f4

https://www.illumos.org/issues/8930:
We normally remove an unlinked node when its last user goes away and the
node becomes inactive. However, we should not do that if the filesystem
is mounted read-only including the case where it has its readonly
property set. The node will remain on the unlinked queue, so it will
not be leaked.

One particular scenario is when we receive an incremental stream into a
mounted read-only filesystem and that stream contains an unlinked file
(still on the unlinked queue). If that file is opened before the
receive and some time later after the receive it becomes inactive we
would remove it and, thus, modify the read-only filesystem. As a
result, the filesystem would diverge from its source and further
incremental receives would not be possible (without forcing a rollback).

Another related scenario, that may or may not be possible depending on an
OS / VFS policy, is when an open file is unlinked, then the filesystem is
remounted read-only, and then the file is closed.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Andriy Gapon <avg@FreeBSD.org>
2018-01-21 23:42:45 +00:00
cmd 8677 Open-Context Channel Programs 2018-01-21 19:26:38 +00:00
common 8713 Buffer overflow in dsl_dataset_name() 2017-11-09 18:06:18 +00:00
head 5066 remove support for non-ANSI compilation 2014-08-20 06:29:42 +00:00
lib 8677 Open-Context Channel Programs 2018-01-21 19:26:38 +00:00
man 8677 Open-Context Channel Programs 2018-01-21 19:26:38 +00:00
tools/ctf 5589 improper use of NULL in tools/ctf 2015-03-09 20:43:14 +00:00
uts 8930 zfs_zinactive: do not remove the node if the filesystem is readonly 2018-01-21 23:42:45 +00:00
OPENSOLARIS.LICENSE Update vendor/opensolaris to last OpenSolaris state (13149:b23a4dab3d50) 2012-07-18 07:48:04 +00:00