diff options
author | Dave Chinner <dchinner@redhat.com> | 2012-10-05 11:06:58 +1000 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-10-18 17:41:56 -0500 |
commit | 2455881c0b52f87be539c4c7deab1afff4d8a560 (patch) | |
tree | ef2ed6c1f0f10727c929838992d89d54bb821993 /fs/xfs/xfs_alloc.c | |
parent | a00416844b8f4b0106344bdfd90fe45a854b1d05 (diff) | |
download | linux-2455881c0b52f87be539c4c7deab1afff4d8a560.tar.gz linux-2455881c0b52f87be539c4c7deab1afff4d8a560.tar.bz2 linux-2455881c0b52f87be539c4c7deab1afff4d8a560.zip |
xfs: introduce XFS_BMAPI_STACK_SWITCH
Certain allocation paths through xfs_bmapi_write() are in situations
where we have limited stack available. These are almost always in
the buffered IO writeback path when convertion delayed allocation
extents to real extents.
The current stack switch occurs for userdata allocations, which
means we also do stack switches for preallocation, direct IO and
unwritten extent conversion, even those these call chains have never
been implicated in a stack overrun.
Hence, let's target just the single stack overun offended for stack
switches. To do that, introduce a XFS_BMAPI_STACK_SWITCH flag that
the caller can pass xfs_bmapi_write() to indicate it should switch
stacks if it needs to do allocation.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_alloc.c')
-rw-r--r-- | fs/xfs/xfs_alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index 0287f3b1b503..43f791bcd8b1 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c @@ -2447,7 +2447,7 @@ xfs_alloc_vextent( { DECLARE_COMPLETION_ONSTACK(done); - if (!args->userdata) + if (!args->stack_switch) return __xfs_alloc_vextent(args); |