diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-05-27 02:38:20 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-05-30 18:19:07 -0400 |
commit | 1de09d1ae48152e56399aba0bfd984fb0ddae6b0 (patch) | |
tree | 5adf84f8a317632847416af4e68c3204c551cb63 /fs/sysfs | |
parent | 7d2ffe80aa000a149246b3745968634192eb5358 (diff) |
xfs: fix incorrect remote symlink block count
When CRCs are enabled, the number of blocks needed to hold a remote
symlink on a 1k block size filesystem may be 2 instead of 1. The
transaction reservation for the allocated blocks was not taking this
into account and only allocating one block. Hence when trying to
read or invalidate such symlinks, we are mapping a hole where there
should be a block and things go bad at that point.
Fix the reservation to use the correct block count, clean up the
block count calculation similar to the remote attribute calculation,
and add a debug guard to detect when we don't write the entire
symlink to disk.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
(cherry picked from commit 321a95839e65db3759a07a3655184b0283af90fe)
Diffstat (limited to 'fs/sysfs')
0 files changed, 0 insertions, 0 deletions