diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-09-01 20:32:00 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-09-10 13:57:09 -0400 |
commit | daf7b799a944d28a50caaa512011f5a0eb5a4076 (patch) | |
tree | e4a272ebf3b4b0247acbc4c1a61739cd0490a639 /fs | |
parent | 638f44163d57f87d0905fbed7d54202beff916fc (diff) |
xfs: set remote symlink buffer type for recovery
The logging of a remote symlink block does not set the buffer type
being logged, and hence on recovery the type of buffer is not
recognised and hence CRCs are not calculated after replay. This
results in log recoery throwing:
XFS (vdc): Unknown buffer type 0
errors, and subsequent reads of the symlink failing CRC
verification. Found via fsstress + godown.
Reported by: Michael L. Semon <mlsemon35@gmail.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_symlink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_symlink.c b/fs/xfs/xfs_symlink.c index 2f2a7c005be2..f622a97a7e33 100644 --- a/fs/xfs/xfs_symlink.c +++ b/fs/xfs/xfs_symlink.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include "xfs_trans_space.h" | 41 | #include "xfs_trans_space.h" |
42 | #include "xfs_trace.h" | 42 | #include "xfs_trace.h" |
43 | #include "xfs_symlink.h" | 43 | #include "xfs_symlink.h" |
44 | #include "xfs_buf_item.h" | ||
44 | 45 | ||
45 | /* ----- Kernel only functions below ----- */ | 46 | /* ----- Kernel only functions below ----- */ |
46 | STATIC int | 47 | STATIC int |
@@ -363,6 +364,7 @@ xfs_symlink( | |||
363 | pathlen -= byte_cnt; | 364 | pathlen -= byte_cnt; |
364 | offset += byte_cnt; | 365 | offset += byte_cnt; |
365 | 366 | ||
367 | xfs_trans_buf_set_type(tp, bp, XFS_BLFT_SYMLINK_BUF); | ||
366 | xfs_trans_log_buf(tp, bp, 0, (buf + byte_cnt - 1) - | 368 | xfs_trans_log_buf(tp, bp, 0, (buf + byte_cnt - 1) - |
367 | (char *)bp->b_addr); | 369 | (char *)bp->b_addr); |
368 | } | 370 | } |