aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_rtalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-rw-r--r--fs/xfs/xfs_rtalloc.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index ec5ca65c6211..909e143b87ae 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -863,7 +863,7 @@ xfs_growfs_rt_alloc(
863 XFS_BMAPI_METADATA, &firstblock, 863 XFS_BMAPI_METADATA, &firstblock,
864 resblks, &map, &nmap, &flist); 864 resblks, &map, &nmap, &flist);
865 if (!error && nmap < 1) 865 if (!error && nmap < 1)
866 error = XFS_ERROR(ENOSPC); 866 error = -ENOSPC;
867 if (error) 867 if (error)
868 goto error_cancel; 868 goto error_cancel;
869 /* 869 /*
@@ -903,7 +903,7 @@ xfs_growfs_rt_alloc(
903 bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, 903 bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, d,
904 mp->m_bsize, 0); 904 mp->m_bsize, 0);
905 if (bp == NULL) { 905 if (bp == NULL) {
906 error = XFS_ERROR(EIO); 906 error = -EIO;
907error_cancel: 907error_cancel:
908 xfs_trans_cancel(tp, cancelflags); 908 xfs_trans_cancel(tp, cancelflags);
909 goto error; 909 goto error;
@@ -944,9 +944,9 @@ xfs_growfs_rt(
944 xfs_buf_t *bp; /* temporary buffer */ 944 xfs_buf_t *bp; /* temporary buffer */
945 int error; /* error return value */ 945 int error; /* error return value */
946 xfs_mount_t *nmp; /* new (fake) mount structure */ 946 xfs_mount_t *nmp; /* new (fake) mount structure */
947 xfs_drfsbno_t nrblocks; /* new number of realtime blocks */ 947 xfs_rfsblock_t nrblocks; /* new number of realtime blocks */
948 xfs_extlen_t nrbmblocks; /* new number of rt bitmap blocks */ 948 xfs_extlen_t nrbmblocks; /* new number of rt bitmap blocks */
949 xfs_drtbno_t nrextents; /* new number of realtime extents */ 949 xfs_rtblock_t nrextents; /* new number of realtime extents */
950 uint8_t nrextslog; /* new log2 of sb_rextents */ 950 uint8_t nrextslog; /* new log2 of sb_rextents */
951 xfs_extlen_t nrsumblocks; /* new number of summary blocks */ 951 xfs_extlen_t nrsumblocks; /* new number of summary blocks */
952 uint nrsumlevels; /* new rt summary levels */ 952 uint nrsumlevels; /* new rt summary levels */
@@ -962,11 +962,11 @@ xfs_growfs_rt(
962 * Initial error checking. 962 * Initial error checking.
963 */ 963 */
964 if (!capable(CAP_SYS_ADMIN)) 964 if (!capable(CAP_SYS_ADMIN))
965 return XFS_ERROR(EPERM); 965 return -EPERM;
966 if (mp->m_rtdev_targp == NULL || mp->m_rbmip == NULL || 966 if (mp->m_rtdev_targp == NULL || mp->m_rbmip == NULL ||
967 (nrblocks = in->newblocks) <= sbp->sb_rblocks || 967 (nrblocks = in->newblocks) <= sbp->sb_rblocks ||
968 (sbp->sb_rblocks && (in->extsize != sbp->sb_rextsize))) 968 (sbp->sb_rblocks && (in->extsize != sbp->sb_rextsize)))
969 return XFS_ERROR(EINVAL); 969 return -EINVAL;
970 if ((error = xfs_sb_validate_fsb_count(sbp, nrblocks))) 970 if ((error = xfs_sb_validate_fsb_count(sbp, nrblocks)))
971 return error; 971 return error;
972 /* 972 /*
@@ -976,7 +976,7 @@ xfs_growfs_rt(
976 XFS_FSB_TO_BB(mp, nrblocks - 1), 976 XFS_FSB_TO_BB(mp, nrblocks - 1),
977 XFS_FSB_TO_BB(mp, 1), 0, NULL); 977 XFS_FSB_TO_BB(mp, 1), 0, NULL);
978 if (!bp) 978 if (!bp)
979 return EIO; 979 return -EIO;
980 if (bp->b_error) { 980 if (bp->b_error) {
981 error = bp->b_error; 981 error = bp->b_error;
982 xfs_buf_relse(bp); 982 xfs_buf_relse(bp);
@@ -1001,7 +1001,7 @@ xfs_growfs_rt(
1001 * since we'll log basically the whole summary file at once. 1001 * since we'll log basically the whole summary file at once.
1002 */ 1002 */
1003 if (nrsumblocks > (mp->m_sb.sb_logblocks >> 1)) 1003 if (nrsumblocks > (mp->m_sb.sb_logblocks >> 1))
1004 return XFS_ERROR(EINVAL); 1004 return -EINVAL;
1005 /* 1005 /*
1006 * Get the old block counts for bitmap and summary inodes. 1006 * Get the old block counts for bitmap and summary inodes.
1007 * These can't change since other growfs callers are locked out. 1007 * These can't change since other growfs callers are locked out.
@@ -1208,7 +1208,7 @@ xfs_rtallocate_extent(
1208 len, &sumbp, &sb, prod, &r); 1208 len, &sumbp, &sb, prod, &r);
1209 break; 1209 break;
1210 default: 1210 default:
1211 error = EIO; 1211 error = -EIO;
1212 ASSERT(0); 1212 ASSERT(0);
1213 } 1213 }
1214 if (error) 1214 if (error)
@@ -1247,7 +1247,7 @@ xfs_rtmount_init(
1247 if (mp->m_rtdev_targp == NULL) { 1247 if (mp->m_rtdev_targp == NULL) {
1248 xfs_warn(mp, 1248 xfs_warn(mp,
1249 "Filesystem has a realtime volume, use rtdev=device option"); 1249 "Filesystem has a realtime volume, use rtdev=device option");
1250 return XFS_ERROR(ENODEV); 1250 return -ENODEV;
1251 } 1251 }
1252 mp->m_rsumlevels = sbp->sb_rextslog + 1; 1252 mp->m_rsumlevels = sbp->sb_rextslog + 1;
1253 mp->m_rsumsize = 1253 mp->m_rsumsize =
@@ -1263,7 +1263,7 @@ xfs_rtmount_init(
1263 xfs_warn(mp, "realtime mount -- %llu != %llu", 1263 xfs_warn(mp, "realtime mount -- %llu != %llu",
1264 (unsigned long long) XFS_BB_TO_FSB(mp, d), 1264 (unsigned long long) XFS_BB_TO_FSB(mp, d),
1265 (unsigned long long) mp->m_sb.sb_rblocks); 1265 (unsigned long long) mp->m_sb.sb_rblocks);
1266 return XFS_ERROR(EFBIG); 1266 return -EFBIG;
1267 } 1267 }
1268 bp = xfs_buf_read_uncached(mp->m_rtdev_targp, 1268 bp = xfs_buf_read_uncached(mp->m_rtdev_targp,
1269 d - XFS_FSB_TO_BB(mp, 1), 1269 d - XFS_FSB_TO_BB(mp, 1),
@@ -1272,7 +1272,7 @@ xfs_rtmount_init(
1272 xfs_warn(mp, "realtime device size check failed"); 1272 xfs_warn(mp, "realtime device size check failed");
1273 if (bp) 1273 if (bp)
1274 xfs_buf_relse(bp); 1274 xfs_buf_relse(bp);
1275 return EIO; 1275 return -EIO;
1276 } 1276 }
1277 xfs_buf_relse(bp); 1277 xfs_buf_relse(bp);
1278 return 0; 1278 return 0;