Commit a19d9f88 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Christoph Hellwig

xfs: kill ino64 mount option

The ino64 mount option adds a fixed offset to 32bit inode numbers
to bring them into the 64bit range.  There's no need for this kind
of debug tool given that it's easy to produce real 64bit inode numbers
for testing.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarEric Sandeen <sandeen@sandeen.net>
Reviewed-by: default avatarFelix Blyakher <felixb@sgi.com>
parent a0b0b8a5
...@@ -541,9 +541,6 @@ xfs_vn_getattr( ...@@ -541,9 +541,6 @@ xfs_vn_getattr(
stat->uid = ip->i_d.di_uid; stat->uid = ip->i_d.di_uid;
stat->gid = ip->i_d.di_gid; stat->gid = ip->i_d.di_gid;
stat->ino = ip->i_ino; stat->ino = ip->i_ino;
#if XFS_BIG_INUMS
stat->ino += mp->m_inoadd;
#endif
stat->atime = inode->i_atime; stat->atime = inode->i_atime;
stat->mtime.tv_sec = ip->i_d.di_mtime.t_sec; stat->mtime.tv_sec = ip->i_d.di_mtime.t_sec;
stat->mtime.tv_nsec = ip->i_d.di_mtime.t_nsec; stat->mtime.tv_nsec = ip->i_d.di_mtime.t_nsec;
......
...@@ -78,7 +78,6 @@ mempool_t *xfs_ioend_pool; ...@@ -78,7 +78,6 @@ mempool_t *xfs_ioend_pool;
#define MNTOPT_RTDEV "rtdev" /* realtime I/O device */ #define MNTOPT_RTDEV "rtdev" /* realtime I/O device */
#define MNTOPT_BIOSIZE "biosize" /* log2 of preferred buffered io size */ #define MNTOPT_BIOSIZE "biosize" /* log2 of preferred buffered io size */
#define MNTOPT_WSYNC "wsync" /* safe-mode nfs compatible mount */ #define MNTOPT_WSYNC "wsync" /* safe-mode nfs compatible mount */
#define MNTOPT_INO64 "ino64" /* force inodes into 64-bit range */
#define MNTOPT_NOALIGN "noalign" /* turn off stripe alignment */ #define MNTOPT_NOALIGN "noalign" /* turn off stripe alignment */
#define MNTOPT_SWALLOC "swalloc" /* turn on stripe width allocation */ #define MNTOPT_SWALLOC "swalloc" /* turn on stripe width allocation */
#define MNTOPT_SUNIT "sunit" /* data volume stripe unit */ #define MNTOPT_SUNIT "sunit" /* data volume stripe unit */
...@@ -290,16 +289,6 @@ xfs_parseargs( ...@@ -290,16 +289,6 @@ xfs_parseargs(
mp->m_flags |= XFS_MOUNT_OSYNCISOSYNC; mp->m_flags |= XFS_MOUNT_OSYNCISOSYNC;
} else if (!strcmp(this_char, MNTOPT_NORECOVERY)) { } else if (!strcmp(this_char, MNTOPT_NORECOVERY)) {
mp->m_flags |= XFS_MOUNT_NORECOVERY; mp->m_flags |= XFS_MOUNT_NORECOVERY;
} else if (!strcmp(this_char, MNTOPT_INO64)) {
#if XFS_BIG_INUMS
mp->m_flags |= XFS_MOUNT_INO64;
mp->m_inoadd = XFS_INO64_OFFSET;
#else
cmn_err(CE_WARN,
"XFS: %s option not allowed on this system",
this_char);
return EINVAL;
#endif
} else if (!strcmp(this_char, MNTOPT_NOALIGN)) { } else if (!strcmp(this_char, MNTOPT_NOALIGN)) {
mp->m_flags |= XFS_MOUNT_NOALIGN; mp->m_flags |= XFS_MOUNT_NOALIGN;
} else if (!strcmp(this_char, MNTOPT_SWALLOC)) { } else if (!strcmp(this_char, MNTOPT_SWALLOC)) {
...@@ -528,7 +517,6 @@ xfs_showargs( ...@@ -528,7 +517,6 @@ xfs_showargs(
/* the few simple ones we can get from the mount struct */ /* the few simple ones we can get from the mount struct */
{ XFS_MOUNT_IKEEP, "," MNTOPT_IKEEP }, { XFS_MOUNT_IKEEP, "," MNTOPT_IKEEP },
{ XFS_MOUNT_WSYNC, "," MNTOPT_WSYNC }, { XFS_MOUNT_WSYNC, "," MNTOPT_WSYNC },
{ XFS_MOUNT_INO64, "," MNTOPT_INO64 },
{ XFS_MOUNT_NOALIGN, "," MNTOPT_NOALIGN }, { XFS_MOUNT_NOALIGN, "," MNTOPT_NOALIGN },
{ XFS_MOUNT_SWALLOC, "," MNTOPT_SWALLOC }, { XFS_MOUNT_SWALLOC, "," MNTOPT_SWALLOC },
{ XFS_MOUNT_NOUUID, "," MNTOPT_NOUUID }, { XFS_MOUNT_NOUUID, "," MNTOPT_NOUUID },
...@@ -1199,18 +1187,12 @@ xfs_fs_statfs( ...@@ -1199,18 +1187,12 @@ xfs_fs_statfs(
statp->f_bfree = statp->f_bavail = statp->f_bfree = statp->f_bavail =
sbp->sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp); sbp->sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp);
fakeinos = statp->f_bfree << sbp->sb_inopblog; fakeinos = statp->f_bfree << sbp->sb_inopblog;
#if XFS_BIG_INUMS
fakeinos += mp->m_inoadd;
#endif
statp->f_files = statp->f_files =
MIN(sbp->sb_icount + fakeinos, (__uint64_t)XFS_MAXINUMBER); MIN(sbp->sb_icount + fakeinos, (__uint64_t)XFS_MAXINUMBER);
if (mp->m_maxicount) if (mp->m_maxicount)
#if XFS_BIG_INUMS statp->f_files = min_t(typeof(statp->f_files),
if (!mp->m_inoadd) statp->f_files,
#endif mp->m_maxicount);
statp->f_files = min_t(typeof(statp->f_files),
statp->f_files,
mp->m_maxicount);
statp->f_ffree = statp->f_files - (sbp->sb_icount - sbp->sb_ifree); statp->f_ffree = statp->f_files - (sbp->sb_icount - sbp->sb_ifree);
spin_unlock(&mp->m_sb_lock); spin_unlock(&mp->m_sb_lock);
......
...@@ -448,7 +448,6 @@ xfs_dir2_block_getdents( ...@@ -448,7 +448,6 @@ xfs_dir2_block_getdents(
xfs_mount_t *mp; /* filesystem mount point */ xfs_mount_t *mp; /* filesystem mount point */
char *ptr; /* current data entry */ char *ptr; /* current data entry */
int wantoff; /* starting block offset */ int wantoff; /* starting block offset */
xfs_ino_t ino;
xfs_off_t cook; xfs_off_t cook;
mp = dp->i_mount; mp = dp->i_mount;
...@@ -509,16 +508,12 @@ xfs_dir2_block_getdents( ...@@ -509,16 +508,12 @@ xfs_dir2_block_getdents(
cook = xfs_dir2_db_off_to_dataptr(mp, mp->m_dirdatablk, cook = xfs_dir2_db_off_to_dataptr(mp, mp->m_dirdatablk,
(char *)dep - (char *)block); (char *)dep - (char *)block);
ino = be64_to_cpu(dep->inumber);
#if XFS_BIG_INUMS
ino += mp->m_inoadd;
#endif
/* /*
* If it didn't fit, set the final offset to here & return. * If it didn't fit, set the final offset to here & return.
*/ */
if (filldir(dirent, dep->name, dep->namelen, cook & 0x7fffffff, if (filldir(dirent, dep->name, dep->namelen, cook & 0x7fffffff,
ino, DT_UNKNOWN)) { be64_to_cpu(dep->inumber), DT_UNKNOWN)) {
*offset = cook & 0x7fffffff; *offset = cook & 0x7fffffff;
xfs_da_brelse(NULL, bp); xfs_da_brelse(NULL, bp);
return 0; return 0;
......
...@@ -780,7 +780,6 @@ xfs_dir2_leaf_getdents( ...@@ -780,7 +780,6 @@ xfs_dir2_leaf_getdents(
int ra_index; /* *map index for read-ahead */ int ra_index; /* *map index for read-ahead */
int ra_offset; /* map entry offset for ra */ int ra_offset; /* map entry offset for ra */
int ra_want; /* readahead count wanted */ int ra_want; /* readahead count wanted */
xfs_ino_t ino;
/* /*
* If the offset is at or past the largest allowed value, * If the offset is at or past the largest allowed value,
...@@ -1076,24 +1075,12 @@ xfs_dir2_leaf_getdents( ...@@ -1076,24 +1075,12 @@ xfs_dir2_leaf_getdents(
continue; continue;
} }
/*
* Copy the entry into the putargs, and try formatting it.
*/
dep = (xfs_dir2_data_entry_t *)ptr; dep = (xfs_dir2_data_entry_t *)ptr;
length = xfs_dir2_data_entsize(dep->namelen); length = xfs_dir2_data_entsize(dep->namelen);
ino = be64_to_cpu(dep->inumber);
#if XFS_BIG_INUMS
ino += mp->m_inoadd;
#endif
/*
* Won't fit. Return to caller.
*/
if (filldir(dirent, dep->name, dep->namelen, if (filldir(dirent, dep->name, dep->namelen,
xfs_dir2_byte_to_dataptr(mp, curoff) & 0x7fffffff, xfs_dir2_byte_to_dataptr(mp, curoff) & 0x7fffffff,
ino, DT_UNKNOWN)) be64_to_cpu(dep->inumber), DT_UNKNOWN))
break; break;
/* /*
......
...@@ -748,11 +748,7 @@ xfs_dir2_sf_getdents( ...@@ -748,11 +748,7 @@ xfs_dir2_sf_getdents(
* Put . entry unless we're starting past it. * Put . entry unless we're starting past it.
*/ */
if (*offset <= dot_offset) { if (*offset <= dot_offset) {
ino = dp->i_ino; if (filldir(dirent, ".", 1, dot_offset & 0x7fffffff, dp->i_ino, DT_DIR)) {
#if XFS_BIG_INUMS
ino += mp->m_inoadd;
#endif
if (filldir(dirent, ".", 1, dot_offset & 0x7fffffff, ino, DT_DIR)) {
*offset = dot_offset & 0x7fffffff; *offset = dot_offset & 0x7fffffff;
return 0; return 0;
} }
...@@ -763,9 +759,6 @@ xfs_dir2_sf_getdents( ...@@ -763,9 +759,6 @@ xfs_dir2_sf_getdents(
*/ */
if (*offset <= dotdot_offset) { if (*offset <= dotdot_offset) {
ino = xfs_dir2_sf_get_inumber(sfp, &sfp->hdr.parent); ino = xfs_dir2_sf_get_inumber(sfp, &sfp->hdr.parent);
#if XFS_BIG_INUMS
ino += mp->m_inoadd;
#endif
if (filldir(dirent, "..", 2, dotdot_offset & 0x7fffffff, ino, DT_DIR)) { if (filldir(dirent, "..", 2, dotdot_offset & 0x7fffffff, ino, DT_DIR)) {
*offset = dotdot_offset & 0x7fffffff; *offset = dotdot_offset & 0x7fffffff;
return 0; return 0;
...@@ -786,10 +779,6 @@ xfs_dir2_sf_getdents( ...@@ -786,10 +779,6 @@ xfs_dir2_sf_getdents(
} }
ino = xfs_dir2_sf_get_inumber(sfp, xfs_dir2_sf_inumberp(sfep)); ino = xfs_dir2_sf_get_inumber(sfp, xfs_dir2_sf_inumberp(sfep));
#if XFS_BIG_INUMS
ino += mp->m_inoadd;
#endif
if (filldir(dirent, sfep->name, sfep->namelen, if (filldir(dirent, sfep->name, sfep->namelen,
off & 0x7fffffff, ino, DT_UNKNOWN)) { off & 0x7fffffff, ino, DT_UNKNOWN)) {
*offset = off & 0x7fffffff; *offset = off & 0x7fffffff;
......
...@@ -289,9 +289,6 @@ typedef struct xfs_mount { ...@@ -289,9 +289,6 @@ typedef struct xfs_mount {
__uint64_t m_maxioffset; /* maximum inode offset */ __uint64_t m_maxioffset; /* maximum inode offset */
__uint64_t m_resblks; /* total reserved blocks */ __uint64_t m_resblks; /* total reserved blocks */
__uint64_t m_resblks_avail;/* available reserved blocks */ __uint64_t m_resblks_avail;/* available reserved blocks */
#if XFS_BIG_INUMS
xfs_ino_t m_inoadd; /* add value for ino64_offset */
#endif
int m_dalign; /* stripe unit */ int m_dalign; /* stripe unit */
int m_swidth; /* stripe width */ int m_swidth; /* stripe width */
int m_sinoalign; /* stripe unit inode alignment */ int m_sinoalign; /* stripe unit inode alignment */
...@@ -333,7 +330,6 @@ typedef struct xfs_mount { ...@@ -333,7 +330,6 @@ typedef struct xfs_mount {
#define XFS_MOUNT_WSYNC (1ULL << 0) /* for nfs - all metadata ops #define XFS_MOUNT_WSYNC (1ULL << 0) /* for nfs - all metadata ops
must be synchronous except must be synchronous except
for space allocations */ for space allocations */
#define XFS_MOUNT_INO64 (1ULL << 1)
#define XFS_MOUNT_DMAPI (1ULL << 2) /* dmapi is enabled */ #define XFS_MOUNT_DMAPI (1ULL << 2) /* dmapi is enabled */
#define XFS_MOUNT_WAS_CLEAN (1ULL << 3) #define XFS_MOUNT_WAS_CLEAN (1ULL << 3)
#define XFS_MOUNT_FS_SHUTDOWN (1ULL << 4) /* atomic stop of all filesystem #define XFS_MOUNT_FS_SHUTDOWN (1ULL << 4) /* atomic stop of all filesystem
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment