diff options
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r-- | fs/xfs/xfs_mount.c | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 6088e14f84e3..62188ea392c7 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -646,7 +646,7 @@ xfs_mountfs( | |||
646 | 646 | ||
647 | if (mp->m_sb_bp == NULL) { | 647 | if (mp->m_sb_bp == NULL) { |
648 | if ((error = xfs_readsb(mp))) { | 648 | if ((error = xfs_readsb(mp))) { |
649 | return (error); | 649 | return error; |
650 | } | 650 | } |
651 | } | 651 | } |
652 | xfs_mount_common(mp, sbp); | 652 | xfs_mount_common(mp, sbp); |
@@ -889,7 +889,7 @@ xfs_mountfs( | |||
889 | * For client case we are done now | 889 | * For client case we are done now |
890 | */ | 890 | */ |
891 | if (mfsi_flags & XFS_MFSI_CLIENT) { | 891 | if (mfsi_flags & XFS_MFSI_CLIENT) { |
892 | return(0); | 892 | return 0; |
893 | } | 893 | } |
894 | 894 | ||
895 | /* | 895 | /* |
@@ -1182,7 +1182,7 @@ xfs_unmountfs_writesb(xfs_mount_t *mp) | |||
1182 | xfs_fs_cmn_err(CE_ALERT, mp, "Superblock write error detected while unmounting. Filesystem may not be marked shared readonly"); | 1182 | xfs_fs_cmn_err(CE_ALERT, mp, "Superblock write error detected while unmounting. Filesystem may not be marked shared readonly"); |
1183 | } | 1183 | } |
1184 | xfs_buf_relse(sbp); | 1184 | xfs_buf_relse(sbp); |
1185 | return (error); | 1185 | return error; |
1186 | } | 1186 | } |
1187 | 1187 | ||
1188 | /* | 1188 | /* |
@@ -1257,19 +1257,19 @@ xfs_mod_incore_sb_unlocked(xfs_mount_t *mp, xfs_sb_field_t field, | |||
1257 | lcounter += delta; | 1257 | lcounter += delta; |
1258 | if (lcounter < 0) { | 1258 | if (lcounter < 0) { |
1259 | ASSERT(0); | 1259 | ASSERT(0); |
1260 | return (XFS_ERROR(EINVAL)); | 1260 | return XFS_ERROR(EINVAL); |
1261 | } | 1261 | } |
1262 | mp->m_sb.sb_icount = lcounter; | 1262 | mp->m_sb.sb_icount = lcounter; |
1263 | return (0); | 1263 | return 0; |
1264 | case XFS_SBS_IFREE: | 1264 | case XFS_SBS_IFREE: |
1265 | lcounter = (long long)mp->m_sb.sb_ifree; | 1265 | lcounter = (long long)mp->m_sb.sb_ifree; |
1266 | lcounter += delta; | 1266 | lcounter += delta; |
1267 | if (lcounter < 0) { | 1267 | if (lcounter < 0) { |
1268 | ASSERT(0); | 1268 | ASSERT(0); |
1269 | return (XFS_ERROR(EINVAL)); | 1269 | return XFS_ERROR(EINVAL); |
1270 | } | 1270 | } |
1271 | mp->m_sb.sb_ifree = lcounter; | 1271 | mp->m_sb.sb_ifree = lcounter; |
1272 | return (0); | 1272 | return 0; |
1273 | case XFS_SBS_FDBLOCKS: | 1273 | case XFS_SBS_FDBLOCKS: |
1274 | 1274 | ||
1275 | lcounter = (long long)mp->m_sb.sb_fdblocks; | 1275 | lcounter = (long long)mp->m_sb.sb_fdblocks; |
@@ -1296,101 +1296,101 @@ xfs_mod_incore_sb_unlocked(xfs_mount_t *mp, xfs_sb_field_t field, | |||
1296 | if (rsvd) { | 1296 | if (rsvd) { |
1297 | lcounter = (long long)mp->m_resblks_avail + delta; | 1297 | lcounter = (long long)mp->m_resblks_avail + delta; |
1298 | if (lcounter < 0) { | 1298 | if (lcounter < 0) { |
1299 | return (XFS_ERROR(ENOSPC)); | 1299 | return XFS_ERROR(ENOSPC); |
1300 | } | 1300 | } |
1301 | mp->m_resblks_avail = lcounter; | 1301 | mp->m_resblks_avail = lcounter; |
1302 | return (0); | 1302 | return 0; |
1303 | } else { /* not reserved */ | 1303 | } else { /* not reserved */ |
1304 | return (XFS_ERROR(ENOSPC)); | 1304 | return XFS_ERROR(ENOSPC); |
1305 | } | 1305 | } |
1306 | } | 1306 | } |
1307 | } | 1307 | } |
1308 | 1308 | ||
1309 | mp->m_sb.sb_fdblocks = lcounter; | 1309 | mp->m_sb.sb_fdblocks = lcounter; |
1310 | return (0); | 1310 | return 0; |
1311 | case XFS_SBS_FREXTENTS: | 1311 | case XFS_SBS_FREXTENTS: |
1312 | lcounter = (long long)mp->m_sb.sb_frextents; | 1312 | lcounter = (long long)mp->m_sb.sb_frextents; |
1313 | lcounter += delta; | 1313 | lcounter += delta; |
1314 | if (lcounter < 0) { | 1314 | if (lcounter < 0) { |
1315 | return (XFS_ERROR(ENOSPC)); | 1315 | return XFS_ERROR(ENOSPC); |
1316 | } | 1316 | } |
1317 | mp->m_sb.sb_frextents = lcounter; | 1317 | mp->m_sb.sb_frextents = lcounter; |
1318 | return (0); | 1318 | return 0; |
1319 | case XFS_SBS_DBLOCKS: | 1319 | case XFS_SBS_DBLOCKS: |
1320 | lcounter = (long long)mp->m_sb.sb_dblocks; | 1320 | lcounter = (long long)mp->m_sb.sb_dblocks; |
1321 | lcounter += delta; | 1321 | lcounter += delta; |
1322 | if (lcounter < 0) { | 1322 | if (lcounter < 0) { |
1323 | ASSERT(0); | 1323 | ASSERT(0); |
1324 | return (XFS_ERROR(EINVAL)); | 1324 | return XFS_ERROR(EINVAL); |
1325 | } | 1325 | } |
1326 | mp->m_sb.sb_dblocks = lcounter; | 1326 | mp->m_sb.sb_dblocks = lcounter; |
1327 | return (0); | 1327 | return 0; |
1328 | case XFS_SBS_AGCOUNT: | 1328 | case XFS_SBS_AGCOUNT: |
1329 | scounter = mp->m_sb.sb_agcount; | 1329 | scounter = mp->m_sb.sb_agcount; |
1330 | scounter += delta; | 1330 | scounter += delta; |
1331 | if (scounter < 0) { | 1331 | if (scounter < 0) { |
1332 | ASSERT(0); | 1332 | ASSERT(0); |
1333 | return (XFS_ERROR(EINVAL)); | 1333 | return XFS_ERROR(EINVAL); |
1334 | } | 1334 | } |
1335 | mp->m_sb.sb_agcount = scounter; | 1335 | mp->m_sb.sb_agcount = scounter; |
1336 | return (0); | 1336 | return 0; |
1337 | case XFS_SBS_IMAX_PCT: | 1337 | case XFS_SBS_IMAX_PCT: |
1338 | scounter = mp->m_sb.sb_imax_pct; | 1338 | scounter = mp->m_sb.sb_imax_pct; |
1339 | scounter += delta; | 1339 | scounter += delta; |
1340 | if (scounter < 0) { | 1340 | if (scounter < 0) { |
1341 | ASSERT(0); | 1341 | ASSERT(0); |
1342 | return (XFS_ERROR(EINVAL)); | 1342 | return XFS_ERROR(EINVAL); |
1343 | } | 1343 | } |
1344 | mp->m_sb.sb_imax_pct = scounter; | 1344 | mp->m_sb.sb_imax_pct = scounter; |
1345 | return (0); | 1345 | return 0; |
1346 | case XFS_SBS_REXTSIZE: | 1346 | case XFS_SBS_REXTSIZE: |
1347 | scounter = mp->m_sb.sb_rextsize; | 1347 | scounter = mp->m_sb.sb_rextsize; |
1348 | scounter += delta; | 1348 | scounter += delta; |
1349 | if (scounter < 0) { | 1349 | if (scounter < 0) { |
1350 | ASSERT(0); | 1350 | ASSERT(0); |
1351 | return (XFS_ERROR(EINVAL)); | 1351 | return XFS_ERROR(EINVAL); |
1352 | } | 1352 | } |
1353 | mp->m_sb.sb_rextsize = scounter; | 1353 | mp->m_sb.sb_rextsize = scounter; |
1354 | return (0); | 1354 | return 0; |
1355 | case XFS_SBS_RBMBLOCKS: | 1355 | case XFS_SBS_RBMBLOCKS: |
1356 | scounter = mp->m_sb.sb_rbmblocks; | 1356 | scounter = mp->m_sb.sb_rbmblocks; |
1357 | scounter += delta; | 1357 | scounter += delta; |
1358 | if (scounter < 0) { | 1358 | if (scounter < 0) { |
1359 | ASSERT(0); | 1359 | ASSERT(0); |
1360 | return (XFS_ERROR(EINVAL)); | 1360 | return XFS_ERROR(EINVAL); |
1361 | } | 1361 | } |
1362 | mp->m_sb.sb_rbmblocks = scounter; | 1362 | mp->m_sb.sb_rbmblocks = scounter; |
1363 | return (0); | 1363 | return 0; |
1364 | case XFS_SBS_RBLOCKS: | 1364 | case XFS_SBS_RBLOCKS: |
1365 | lcounter = (long long)mp->m_sb.sb_rblocks; | 1365 | lcounter = (long long)mp->m_sb.sb_rblocks; |
1366 | lcounter += delta; | 1366 | lcounter += delta; |
1367 | if (lcounter < 0) { | 1367 | if (lcounter < 0) { |
1368 | ASSERT(0); | 1368 | ASSERT(0); |
1369 | return (XFS_ERROR(EINVAL)); | 1369 | return XFS_ERROR(EINVAL); |
1370 | } | 1370 | } |
1371 | mp->m_sb.sb_rblocks = lcounter; | 1371 | mp->m_sb.sb_rblocks = lcounter; |
1372 | return (0); | 1372 | return 0; |
1373 | case XFS_SBS_REXTENTS: | 1373 | case XFS_SBS_REXTENTS: |
1374 | lcounter = (long long)mp->m_sb.sb_rextents; | 1374 | lcounter = (long long)mp->m_sb.sb_rextents; |
1375 | lcounter += delta; | 1375 | lcounter += delta; |
1376 | if (lcounter < 0) { | 1376 | if (lcounter < 0) { |
1377 | ASSERT(0); | 1377 | ASSERT(0); |
1378 | return (XFS_ERROR(EINVAL)); | 1378 | return XFS_ERROR(EINVAL); |
1379 | } | 1379 | } |
1380 | mp->m_sb.sb_rextents = lcounter; | 1380 | mp->m_sb.sb_rextents = lcounter; |
1381 | return (0); | 1381 | return 0; |
1382 | case XFS_SBS_REXTSLOG: | 1382 | case XFS_SBS_REXTSLOG: |
1383 | scounter = mp->m_sb.sb_rextslog; | 1383 | scounter = mp->m_sb.sb_rextslog; |
1384 | scounter += delta; | 1384 | scounter += delta; |
1385 | if (scounter < 0) { | 1385 | if (scounter < 0) { |
1386 | ASSERT(0); | 1386 | ASSERT(0); |
1387 | return (XFS_ERROR(EINVAL)); | 1387 | return XFS_ERROR(EINVAL); |
1388 | } | 1388 | } |
1389 | mp->m_sb.sb_rextslog = scounter; | 1389 | mp->m_sb.sb_rextslog = scounter; |
1390 | return (0); | 1390 | return 0; |
1391 | default: | 1391 | default: |
1392 | ASSERT(0); | 1392 | ASSERT(0); |
1393 | return (XFS_ERROR(EINVAL)); | 1393 | return XFS_ERROR(EINVAL); |
1394 | } | 1394 | } |
1395 | } | 1395 | } |
1396 | 1396 | ||
@@ -1409,7 +1409,7 @@ xfs_mod_incore_sb(xfs_mount_t *mp, xfs_sb_field_t field, int delta, int rsvd) | |||
1409 | s = XFS_SB_LOCK(mp); | 1409 | s = XFS_SB_LOCK(mp); |
1410 | status = xfs_mod_incore_sb_unlocked(mp, field, delta, rsvd); | 1410 | status = xfs_mod_incore_sb_unlocked(mp, field, delta, rsvd); |
1411 | XFS_SB_UNLOCK(mp, s); | 1411 | XFS_SB_UNLOCK(mp, s); |
1412 | return (status); | 1412 | return status; |
1413 | } | 1413 | } |
1414 | 1414 | ||
1415 | /* | 1415 | /* |
@@ -1470,7 +1470,7 @@ xfs_mod_incore_sb_batch(xfs_mount_t *mp, xfs_mod_sb_t *msb, uint nmsb, int rsvd) | |||
1470 | } | 1470 | } |
1471 | } | 1471 | } |
1472 | XFS_SB_UNLOCK(mp, s); | 1472 | XFS_SB_UNLOCK(mp, s); |
1473 | return (status); | 1473 | return status; |
1474 | } | 1474 | } |
1475 | 1475 | ||
1476 | /* | 1476 | /* |
@@ -1500,7 +1500,7 @@ xfs_getsb( | |||
1500 | } | 1500 | } |
1501 | XFS_BUF_HOLD(bp); | 1501 | XFS_BUF_HOLD(bp); |
1502 | ASSERT(XFS_BUF_ISDONE(bp)); | 1502 | ASSERT(XFS_BUF_ISDONE(bp)); |
1503 | return (bp); | 1503 | return bp; |
1504 | } | 1504 | } |
1505 | 1505 | ||
1506 | /* | 1506 | /* |