@@ -491,7 +491,7 @@ _("inode %" PRIu64 " - bad extent overflows - start %" PRIu64 ", "
}
/* Ensure this extent does not extend beyond the max offset */
if (irec.br_startoff + irec.br_blockcount - 1 >
- fs_max_file_offset) {
+ XFS_MAX_FILEOFF) {
do_warn(
_("inode %" PRIu64 " - extent exceeds max offset - start %" PRIu64 ", "
"count %" PRIu64 ", physical block %" PRIu64 "\n"),
@@ -83,7 +83,6 @@ int inodes_per_block;
unsigned int glob_agcount;
int chunks_pblock; /* # of 64-ino chunks per allocation */
int max_symlink_blocks;
-int64_t fs_max_file_offset;
/* realtime info */
@@ -124,7 +124,6 @@ extern int inodes_per_block;
extern unsigned int glob_agcount;
extern int chunks_pblock; /* # of 64-ino chunks per allocation */
extern int max_symlink_blocks;
-extern int64_t fs_max_file_offset;
/* realtime info */
@@ -185,7 +185,7 @@ pf_read_bmbt_reclist(
if (((i > 0) && (op + cp > irec.br_startoff)) ||
(irec.br_blockcount == 0) ||
- (irec.br_startoff >= fs_max_file_offset))
+ (irec.br_startoff + irec.br_blockcount - 1 >= XFS_MAX_FILEOFF))
goto out_free;
if (!libxfs_verify_fsbno(mp, irec.br_startblock) ||
@@ -180,10 +180,5 @@ _("WARNING: you have a V1 inode filesystem. It would be converted to a\n"
fs_ino_alignment = mp->m_sb.sb_inoalignmt;
}
- /*
- * calculate maximum file offset for this geometry
- */
- fs_max_file_offset = 0x7fffffffffffffffLL >> mp->m_sb.sb_blocklog;
-
- return(0);
+ return 0;
}