diff options
author | Dave Chinner <dchinner@redhat.com> | 2014-11-07 00:30:30 +0300 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-11-07 00:30:30 +0300 |
commit | bf4a5af20d25ecc8876978ad34b8db83b4235f3c (patch) | |
tree | 0eb16d3c6176c769c2f8802422fa94bdf72fb209 /Documentation/bus-devices | |
parent | afa947cb52a8e73fe71915a0b0af6fcf98dfbe1a (diff) | |
download | linux-bf4a5af20d25ecc8876978ad34b8db83b4235f3c.tar.xz |
xfs: bulkstat chunk formatting cursor is broken
The xfs_bulkstat_agichunk formatting cursor takes buffer values from
the main loop and passes them via the structure to the chunk
formatter, and the writes the changed values back into the main loop
local variables. Unfortunately, this complex dance is full of corner
cases that aren't handled correctly.
The biggest problem is that it is double handling the information in
both the main loop and the chunk formatting function, leading to
inconsistent updates and endless loops where progress is not made.
To fix this, push the struct xfs_bulkstat_agichunk outwards to be
the primary holder of user buffer information. this removes the
double handling in the main loop.
Also, pass the last inode processed by the chunk formatter as a
separate parameter as it purely an output variable and is not
related to the user buffer consumption cursor.
Finally, the chunk formatting code is not shared by anyone, so make
it local to xfs_itable.c.
cc: <stable@vger.kernel.org> # 3.17
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'Documentation/bus-devices')
0 files changed, 0 insertions, 0 deletions