diff options
author | Eric Sandeen <sandeen@sandeen.net> | 2010-04-29 23:42:49 -0400 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2010-05-28 15:58:16 -0400 |
commit | 657a4cffde065beca7d919e867f61e7d322708b6 (patch) | |
tree | c3841761a48175aaab67c4e7293ae4d86b44b393 /fs | |
parent | ccf7c23fc129e75ef60e6f59f60a485b7a056598 (diff) |
xfs: replace E2BIG with EFBIG where appropriate
Many places in the xfs code return E2BIG when they really mean
EFBIG; trying to grow past 16T on a 32 bit machine, for example,
says "Argument list too long" rather than "File too large" which is
not particularly helpful.
Some of these don't make perfect sense as EFBIG either, but still
better than E2BIG IMHO.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/xfs_mount.c | 14 | ||||
-rw-r--r-- | fs/xfs/xfs_rtalloc.c | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index d7bf38c8cd1c..2d811e57b332 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -268,10 +268,10 @@ xfs_sb_validate_fsb_count( | |||
268 | 268 | ||
269 | #if XFS_BIG_BLKNOS /* Limited by ULONG_MAX of page cache index */ | 269 | #if XFS_BIG_BLKNOS /* Limited by ULONG_MAX of page cache index */ |
270 | if (nblocks >> (PAGE_CACHE_SHIFT - sbp->sb_blocklog) > ULONG_MAX) | 270 | if (nblocks >> (PAGE_CACHE_SHIFT - sbp->sb_blocklog) > ULONG_MAX) |
271 | return E2BIG; | 271 | return EFBIG; |
272 | #else /* Limited by UINT_MAX of sectors */ | 272 | #else /* Limited by UINT_MAX of sectors */ |
273 | if (nblocks << (sbp->sb_blocklog - BBSHIFT) > UINT_MAX) | 273 | if (nblocks << (sbp->sb_blocklog - BBSHIFT) > UINT_MAX) |
274 | return E2BIG; | 274 | return EFBIG; |
275 | #endif | 275 | #endif |
276 | return 0; | 276 | return 0; |
277 | } | 277 | } |
@@ -393,7 +393,7 @@ xfs_mount_validate_sb( | |||
393 | xfs_sb_validate_fsb_count(sbp, sbp->sb_rblocks)) { | 393 | xfs_sb_validate_fsb_count(sbp, sbp->sb_rblocks)) { |
394 | xfs_fs_mount_cmn_err(flags, | 394 | xfs_fs_mount_cmn_err(flags, |
395 | "file system too large to be mounted on this system."); | 395 | "file system too large to be mounted on this system."); |
396 | return XFS_ERROR(E2BIG); | 396 | return XFS_ERROR(EFBIG); |
397 | } | 397 | } |
398 | 398 | ||
399 | if (unlikely(sbp->sb_inprogress)) { | 399 | if (unlikely(sbp->sb_inprogress)) { |
@@ -1009,7 +1009,7 @@ xfs_check_sizes(xfs_mount_t *mp) | |||
1009 | d = (xfs_daddr_t)XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks); | 1009 | d = (xfs_daddr_t)XFS_FSB_TO_BB(mp, mp->m_sb.sb_dblocks); |
1010 | if (XFS_BB_TO_FSB(mp, d) != mp->m_sb.sb_dblocks) { | 1010 | if (XFS_BB_TO_FSB(mp, d) != mp->m_sb.sb_dblocks) { |
1011 | cmn_err(CE_WARN, "XFS: size check 1 failed"); | 1011 | cmn_err(CE_WARN, "XFS: size check 1 failed"); |
1012 | return XFS_ERROR(E2BIG); | 1012 | return XFS_ERROR(EFBIG); |
1013 | } | 1013 | } |
1014 | error = xfs_read_buf(mp, mp->m_ddev_targp, | 1014 | error = xfs_read_buf(mp, mp->m_ddev_targp, |
1015 | d - XFS_FSS_TO_BB(mp, 1), | 1015 | d - XFS_FSS_TO_BB(mp, 1), |
@@ -1019,7 +1019,7 @@ xfs_check_sizes(xfs_mount_t *mp) | |||
1019 | } else { | 1019 | } else { |
1020 | cmn_err(CE_WARN, "XFS: size check 2 failed"); | 1020 | cmn_err(CE_WARN, "XFS: size check 2 failed"); |
1021 | if (error == ENOSPC) | 1021 | if (error == ENOSPC) |
1022 | error = XFS_ERROR(E2BIG); | 1022 | error = XFS_ERROR(EFBIG); |
1023 | return error; | 1023 | return error; |
1024 | } | 1024 | } |
1025 | 1025 | ||
@@ -1027,7 +1027,7 @@ xfs_check_sizes(xfs_mount_t *mp) | |||
1027 | d = (xfs_daddr_t)XFS_FSB_TO_BB(mp, mp->m_sb.sb_logblocks); | 1027 | d = (xfs_daddr_t)XFS_FSB_TO_BB(mp, mp->m_sb.sb_logblocks); |
1028 | if (XFS_BB_TO_FSB(mp, d) != mp->m_sb.sb_logblocks) { | 1028 | if (XFS_BB_TO_FSB(mp, d) != mp->m_sb.sb_logblocks) { |
1029 | cmn_err(CE_WARN, "XFS: size check 3 failed"); | 1029 | cmn_err(CE_WARN, "XFS: size check 3 failed"); |
1030 | return XFS_ERROR(E2BIG); | 1030 | return XFS_ERROR(EFBIG); |
1031 | } | 1031 | } |
1032 | error = xfs_read_buf(mp, mp->m_logdev_targp, | 1032 | error = xfs_read_buf(mp, mp->m_logdev_targp, |
1033 | d - XFS_FSB_TO_BB(mp, 1), | 1033 | d - XFS_FSB_TO_BB(mp, 1), |
@@ -1037,7 +1037,7 @@ xfs_check_sizes(xfs_mount_t *mp) | |||
1037 | } else { | 1037 | } else { |
1038 | cmn_err(CE_WARN, "XFS: size check 3 failed"); | 1038 | cmn_err(CE_WARN, "XFS: size check 3 failed"); |
1039 | if (error == ENOSPC) | 1039 | if (error == ENOSPC) |
1040 | error = XFS_ERROR(E2BIG); | 1040 | error = XFS_ERROR(EFBIG); |
1041 | return error; | 1041 | return error; |
1042 | } | 1042 | } |
1043 | } | 1043 | } |
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 6be05f756d59..16445518506d 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c | |||
@@ -2247,7 +2247,7 @@ xfs_rtmount_init( | |||
2247 | cmn_err(CE_WARN, "XFS: realtime mount -- %llu != %llu", | 2247 | cmn_err(CE_WARN, "XFS: realtime mount -- %llu != %llu", |
2248 | (unsigned long long) XFS_BB_TO_FSB(mp, d), | 2248 | (unsigned long long) XFS_BB_TO_FSB(mp, d), |
2249 | (unsigned long long) mp->m_sb.sb_rblocks); | 2249 | (unsigned long long) mp->m_sb.sb_rblocks); |
2250 | return XFS_ERROR(E2BIG); | 2250 | return XFS_ERROR(EFBIG); |
2251 | } | 2251 | } |
2252 | error = xfs_read_buf(mp, mp->m_rtdev_targp, | 2252 | error = xfs_read_buf(mp, mp->m_rtdev_targp, |
2253 | d - XFS_FSB_TO_BB(mp, 1), | 2253 | d - XFS_FSB_TO_BB(mp, 1), |
@@ -2256,7 +2256,7 @@ xfs_rtmount_init( | |||
2256 | cmn_err(CE_WARN, | 2256 | cmn_err(CE_WARN, |
2257 | "XFS: realtime mount -- xfs_read_buf failed, returned %d", error); | 2257 | "XFS: realtime mount -- xfs_read_buf failed, returned %d", error); |
2258 | if (error == ENOSPC) | 2258 | if (error == ENOSPC) |
2259 | return XFS_ERROR(E2BIG); | 2259 | return XFS_ERROR(EFBIG); |
2260 | return error; | 2260 | return error; |
2261 | } | 2261 | } |
2262 | xfs_buf_relse(bp); | 2262 | xfs_buf_relse(bp); |