diff options
author | Brian Foster <bfoster@redhat.com> | 2016-08-17 01:30:28 +0300 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-08-17 01:30:28 +0300 |
commit | 4dd3fd7197303739094183b139bae3142a3d55e6 (patch) | |
tree | 2b871419a3fe42b19cd3247da8402867f90f4077 /fs/cifs/smb2file.c | |
parent | 694d0d0bb2030d2e36df73e2d23d5770511dbc8d (diff) | |
download | linux-4dd3fd7197303739094183b139bae3142a3d55e6.tar.xz |
xfs: don't assert fail on non-async buffers on ioacct decrement
The buffer I/O accounting mechanism tracks async buffers under I/O. As
an optimization, the buffer I/O count is incremented only once on the
first async I/O for a given hold cycle of a buffer and decremented once
the buffer is released to the LRU (or freed).
xfs_buf_ioacct_dec() has an ASSERT() check for an XBF_ASYNC buffer, but
we have one or two corner cases where a buffer can be submitted for I/O
multiple times via different methods in a single hold cycle. If an async
I/O occurs first, the I/O count is incremented. If a sync I/O occurs
before the hold count drops, XBF_ASYNC is cleared by the time the I/O
count is decremented.
Remove the async assert check from xfs_buf_ioacct_dec() as this is a
perfectly valid scenario. For the purposes of I/O accounting, we really
only care about the buffer async state at I/O submission time.
Discovered-and-analyzed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/cifs/smb2file.c')
0 files changed, 0 insertions, 0 deletions