diff options
Diffstat (limited to 'fs/xfs/libxfs/xfs_rtbitmap.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_rtbitmap.c | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_rtbitmap.c b/fs/xfs/libxfs/xfs_rtbitmap.c index 9b59ffa1fc19..951c044e24e4 100644 --- a/fs/xfs/libxfs/xfs_rtbitmap.c +++ b/fs/xfs/libxfs/xfs_rtbitmap.c | |||
@@ -42,6 +42,31 @@ | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | /* | 44 | /* |
45 | * Real time buffers need verifiers to avoid runtime warnings during IO. | ||
46 | * We don't have anything to verify, however, so these are just dummy | ||
47 | * operations. | ||
48 | */ | ||
49 | static void | ||
50 | xfs_rtbuf_verify_read( | ||
51 | struct xfs_buf *bp) | ||
52 | { | ||
53 | return; | ||
54 | } | ||
55 | |||
56 | static void | ||
57 | xfs_rtbuf_verify_write( | ||
58 | struct xfs_buf *bp) | ||
59 | { | ||
60 | return; | ||
61 | } | ||
62 | |||
63 | const struct xfs_buf_ops xfs_rtbuf_ops = { | ||
64 | .name = "rtbuf", | ||
65 | .verify_read = xfs_rtbuf_verify_read, | ||
66 | .verify_write = xfs_rtbuf_verify_write, | ||
67 | }; | ||
68 | |||
69 | /* | ||
45 | * Get a buffer for the bitmap or summary file block specified. | 70 | * Get a buffer for the bitmap or summary file block specified. |
46 | * The buffer is returned read and locked. | 71 | * The buffer is returned read and locked. |
47 | */ | 72 | */ |
@@ -68,9 +93,12 @@ xfs_rtbuf_get( | |||
68 | ASSERT(map.br_startblock != NULLFSBLOCK); | 93 | ASSERT(map.br_startblock != NULLFSBLOCK); |
69 | error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, | 94 | error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp, |
70 | XFS_FSB_TO_DADDR(mp, map.br_startblock), | 95 | XFS_FSB_TO_DADDR(mp, map.br_startblock), |
71 | mp->m_bsize, 0, &bp, NULL); | 96 | mp->m_bsize, 0, &bp, &xfs_rtbuf_ops); |
72 | if (error) | 97 | if (error) |
73 | return error; | 98 | return error; |
99 | |||
100 | xfs_trans_buf_set_type(tp, bp, issum ? XFS_BLFT_RTSUMMARY_BUF | ||
101 | : XFS_BLFT_RTBITMAP_BUF); | ||
74 | *bpp = bp; | 102 | *bpp = bp; |
75 | return 0; | 103 | return 0; |
76 | } | 104 | } |
@@ -983,7 +1011,7 @@ xfs_rtfree_extent( | |||
983 | mp->m_sb.sb_rextents) { | 1011 | mp->m_sb.sb_rextents) { |
984 | if (!(mp->m_rbmip->i_d.di_flags & XFS_DIFLAG_NEWRTBM)) | 1012 | if (!(mp->m_rbmip->i_d.di_flags & XFS_DIFLAG_NEWRTBM)) |
985 | mp->m_rbmip->i_d.di_flags |= XFS_DIFLAG_NEWRTBM; | 1013 | mp->m_rbmip->i_d.di_flags |= XFS_DIFLAG_NEWRTBM; |
986 | *(__uint64_t *)&mp->m_rbmip->i_d.di_atime = 0; | 1014 | *(__uint64_t *)&VFS_I(mp->m_rbmip)->i_atime = 0; |
987 | xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE); | 1015 | xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE); |
988 | } | 1016 | } |
989 | return 0; | 1017 | return 0; |