From: Eric Sandeen Date: Wed, 5 Jun 2002 16:24:32 +0000 (+0000) Subject: sync userspace with kernel X-Git-Tag: v2.1.0~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e72c46040b2564933e2be8d1800a64d0c7f327b;p=thirdparty%2Fxfsprogs-dev.git sync userspace with kernel --- diff --git a/include/xfs_mount.h b/include/xfs_mount.h index d13a64ddb..27edd2cf0 100644 --- a/include/xfs_mount.h +++ b/include/xfs_mount.h @@ -357,8 +357,12 @@ typedef struct xfs_mount { /* * Default minimum read and write sizes. */ -#define XFS_READIO_LOG_LARGE 12 /* > 32MB memory */ +#define XFS_READIO_LOG_LARGE 12 #define XFS_WRITEIO_LOG_LARGE 12 +/* + * Default allocation size + */ +#define XFS_WRITE_IO_LOG 16 /* * Max and min values for UIO and mount-option defined I/O sizes; diff --git a/libxfs/xfs_dir2_sf.c b/libxfs/xfs_dir2_sf.c index c6bae1833..2d1ad4c60 100644 --- a/libxfs/xfs_dir2_sf.c +++ b/libxfs/xfs_dir2_sf.c @@ -843,6 +843,7 @@ xfs_dir2_sf_replace( int i; /* entry index */ #if XFS_BIG_FILESYSTEMS || defined(DEBUG) xfs_ino_t ino=0; /* entry old inode number */ + int i8elevated; /* sf_toino8 set i8count=1 */ #endif xfs_dir2_sf_entry_t *sfep; /* shortform directory entry */ xfs_dir2_sf_t *sfp; /* shortform structure */ @@ -889,8 +890,10 @@ xfs_dir2_sf_replace( * Still fits, convert to 8-byte now. */ xfs_dir2_sf_toino8(args); + i8elevated = 1; sfp = (xfs_dir2_sf_t *)dp->i_df.if_u1.if_data; - } + } else + i8elevated = 0; #endif ASSERT(args->namelen != 1 || args->name[0] != '.'); /* @@ -929,6 +932,10 @@ xfs_dir2_sf_replace( */ if (i == sfp->hdr.count) { ASSERT(args->oknoent); +#if XFS_BIG_FILESYSTEMS || defined(DEBUG) + if (i8elevated) + xfs_dir2_sf_toino4(args); +#endif return XFS_ERROR(ENOENT); } } @@ -946,6 +953,19 @@ xfs_dir2_sf_replace( else sfp->hdr.i8count--; } + /* + * See if the old number was small, the new number is large. + */ + if (ino <= XFS_DIR2_MAX_SHORT_INUM && + args->inumber > XFS_DIR2_MAX_SHORT_INUM) { + /* + * add to the i8count unless we just converted to 8-byte + * inodes (which does an implied i8count = 1) + */ + ASSERT(sfp->hdr.i8count != 0); + if (!i8elevated) + sfp->hdr.i8count++; + } #endif xfs_dir2_sf_check(args); xfs_trans_log_inode(args->trans, dp, XFS_ILOG_DDATA);