diff options
author | Christoph Hellwig <hch@lst.de> | 2019-06-28 22:27:24 -0400 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-06-28 22:27:24 -0400 |
commit | 2d15d2c0e0f7ecd60bb9fa3b807b7f04314ffe82 (patch) | |
tree | 23b007fd895d05d9c9612059f56f1dbb31d8dabe /fs/xfs | |
parent | abca1f33f869d84ebfb41c4040cfc91a9af11baf (diff) |
xfs: make use of the l_targ field in struct xlog
Use the slightly shorter way to get at the buftarg for the log device
wherever we can in the log and log recovery code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_log.c | 6 | ||||
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index b3d5519ae054..3686993436e8 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -927,7 +927,7 @@ xfs_log_unmount_write(xfs_mount_t *mp) | |||
927 | * Or, if we are doing a forced umount (typically because of IO errors). | 927 | * Or, if we are doing a forced umount (typically because of IO errors). |
928 | */ | 928 | */ |
929 | if (mp->m_flags & XFS_MOUNT_NORECOVERY || | 929 | if (mp->m_flags & XFS_MOUNT_NORECOVERY || |
930 | xfs_readonly_buftarg(log->l_mp->m_logdev_targp)) { | 930 | xfs_readonly_buftarg(log->l_targ)) { |
931 | ASSERT(mp->m_flags & XFS_MOUNT_RDONLY); | 931 | ASSERT(mp->m_flags & XFS_MOUNT_RDONLY); |
932 | return 0; | 932 | return 0; |
933 | } | 933 | } |
@@ -1442,7 +1442,7 @@ xlog_alloc_log( | |||
1442 | * having set it up properly. | 1442 | * having set it up properly. |
1443 | */ | 1443 | */ |
1444 | error = -ENOMEM; | 1444 | error = -ENOMEM; |
1445 | bp = xfs_buf_alloc(mp->m_logdev_targp, XFS_BUF_DADDR_NULL, | 1445 | bp = xfs_buf_alloc(log->l_targ, XFS_BUF_DADDR_NULL, |
1446 | BTOBB(log->l_iclog_size), XBF_NO_IOACCT); | 1446 | BTOBB(log->l_iclog_size), XBF_NO_IOACCT); |
1447 | if (!bp) | 1447 | if (!bp) |
1448 | goto out_free_log; | 1448 | goto out_free_log; |
@@ -1912,7 +1912,7 @@ xlog_sync( | |||
1912 | * synchronously here; for an internal log we can simply use the block | 1912 | * synchronously here; for an internal log we can simply use the block |
1913 | * layer state machine for preflushes. | 1913 | * layer state machine for preflushes. |
1914 | */ | 1914 | */ |
1915 | if (log->l_mp->m_logdev_targp != log->l_mp->m_ddev_targp || split) { | 1915 | if (log->l_targ != log->l_mp->m_ddev_targp || split) { |
1916 | xfs_blkdev_issue_flush(log->l_mp->m_ddev_targp); | 1916 | xfs_blkdev_issue_flush(log->l_mp->m_ddev_targp); |
1917 | need_flush = false; | 1917 | need_flush = false; |
1918 | } | 1918 | } |
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 6f30a2fd6f63..883e930f2426 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -134,7 +134,7 @@ xlog_get_bp( | |||
134 | nbblks += log->l_sectBBsize; | 134 | nbblks += log->l_sectBBsize; |
135 | nbblks = round_up(nbblks, log->l_sectBBsize); | 135 | nbblks = round_up(nbblks, log->l_sectBBsize); |
136 | 136 | ||
137 | bp = xfs_buf_get_uncached(log->l_mp->m_logdev_targp, nbblks, 0); | 137 | bp = xfs_buf_get_uncached(log->l_targ, nbblks, 0); |
138 | if (bp) | 138 | if (bp) |
139 | xfs_buf_unlock(bp); | 139 | xfs_buf_unlock(bp); |
140 | return bp; | 140 | return bp; |
@@ -1505,7 +1505,7 @@ xlog_find_tail( | |||
1505 | * But... if the -device- itself is readonly, just skip this. | 1505 | * But... if the -device- itself is readonly, just skip this. |
1506 | * We can't recover this device anyway, so it won't matter. | 1506 | * We can't recover this device anyway, so it won't matter. |
1507 | */ | 1507 | */ |
1508 | if (!xfs_readonly_buftarg(log->l_mp->m_logdev_targp)) | 1508 | if (!xfs_readonly_buftarg(log->l_targ)) |
1509 | error = xlog_clear_stale_blocks(log, tail_lsn); | 1509 | error = xlog_clear_stale_blocks(log, tail_lsn); |
1510 | 1510 | ||
1511 | done: | 1511 | done: |