]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: introduce XFS_BMAPI_STACK_SWITCH
authorDave Chinner <dchinner@redhat.com>
Fri, 5 Oct 2012 01:06:58 +0000 (11:06 +1000)
committerBen Myers <bpm@sgi.com>
Thu, 18 Oct 2012 22:41:56 +0000 (17:41 -0500)
commitbf537e2fd7f79143d6040a1a6468535ee5c8e063
treeef2ed6c1f0f10727c929838992d89d54bb821993
parent9b341181b736fdf042438998196f0e1a60a2140e
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>
fs/xfs/xfs_alloc.c
fs/xfs/xfs_alloc.h
fs/xfs/xfs_bmap.c
fs/xfs/xfs_bmap.h
fs/xfs/xfs_iomap.c