]> git.proxmox.com Git - mirror_spl.git/commit
Add MUTEX_FSTRANS mutex type
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 25 Feb 2015 18:29:02 +0000 (10:29 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 3 Mar 2015 18:18:24 +0000 (10:18 -0800)
commitd0d5dd714424365a4da0d887cb641cb2f0ae8844
treea408c3f3bafc5f752e83cdacf4564051e34d98f4
parent5f920fbee1fd1838bad2d5a262041a3a171b6834
Add MUTEX_FSTRANS mutex type

There are regions in the ZFS code where it is desirable to be able
to be set PF_FSTRANS while a specific mutex is held.  The ZFS code
could be updated to set/clear this flag in all the correct places,
but this is undesirable for a few reasons.

1) It would require changes to a significant amount of the ZFS
   code.  This would complicate applying patches from upstream.

2) It would be easy to accidentally miss a critical region in
   the initial patch or to have an future change introduce a
   new one.

Both of these concerns can be addressed by adding a new mutex type
which is responsible for managing PF_FSTRANS, support for which was
added to the SPL in commit 9099312 - Merge branch 'kmem-rework'.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tim Chase <tim@chase2k.com>
Issue #435
include/sys/mutex.h
module/splat/splat-atomic.c