summaryrefslogtreecommitdiffstats
path: root/module/zfs/zio.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2014-07-13 14:35:19 -0400
committerBrian Behlendorf <[email protected]>2015-01-16 14:28:05 -0800
commit92119cc259ee2f9ebde14145f549d6313f557759 (patch)
treef401b89e39084c21c15049d26951a1e99d4aebef /module/zfs/zio.c
parentd958324f97f4668a2a6e4a6ce3e5ca09b71b31d9 (diff)
Mark IO pipeline with PF_FSTRANS
In order to avoid deadlocking in the IO pipeline it is critical that pageout be avoided during direct memory reclaim. This ensures that the pipeline threads can always make forward progress and never end up blocking on a DMU transaction. For this very reason Linux now provides the PF_FSTRANS flag which may be set in the process context. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zfs/zio.c')
-rw-r--r--module/zfs/zio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/module/zfs/zio.c b/module/zfs/zio.c
index 9d70b3e59..7c0e6bf7e 100644
--- a/module/zfs/zio.c
+++ b/module/zfs/zio.c
@@ -1361,7 +1361,11 @@ static zio_pipe_stage_t *zio_pipeline[];
void
zio_execute(zio_t *zio)
{
+ fstrans_cookie_t cookie;
+
+ cookie = spl_fstrans_mark();
__zio_execute(zio);
+ spl_fstrans_unmark(cookie);
}
__attribute__((always_inline))