Page MenuHomeFreeBSD

D41663.id126711.diff
No OneTemporary

D41663.id126711.diff

diff --git a/sys/fs/ext2fs/ext2_alloc.c b/fs/ext2fs/ext2_alloc.c
--- a/sys/fs/ext2fs/ext2_alloc.c
+++ b/fs/ext2fs/ext2_alloc.c
@@ -74,9 +74,9 @@
static daddr_t ext2_alloccg(struct inode *, int, daddr_t, int);
static daddr_t ext2_clusteralloc(struct inode *, int, daddr_t, int);
-static u_long ext2_dirpref(struct inode *);
+static uint64_t ext2_dirpref(struct inode *);
static e4fs_daddr_t ext2_hashalloc(struct inode *, int, long, int,
- daddr_t (*)(struct inode *, int, daddr_t,
+ daddr_t (*)(struct inode *, int, daddr_t,
int));
static daddr_t ext2_nodealloccg(struct inode *, int, daddr_t, int);
static daddr_t ext2_mapsearch(struct m_ext2fs *, char *, daddr_t);
@@ -112,7 +112,7 @@
ump = ip->i_ump;
mtx_assert(EXT2_MTX(ump), MA_OWNED);
#ifdef INVARIANTS
- if ((u_int)size > fs->e2fs_bsize || blkoff(fs, size) != 0) {
+ if ((uint64_t)size > fs->e2fs_bsize || blkoff(fs, size) != 0) {
vn_printf(ip->i_devvp, "bsize = %lu, size = %d, fs = %s\n",
(long unsigned int)fs->e2fs_bsize, size, fs->e2fs_fsmnt);
panic("ext2_alloc: bad size");
@@ -269,7 +269,7 @@
brelse(sbp);
return (ENOSPC);
}
- sbap = (u_int *)sbp->b_data;
+ sbap = (uint32_t *)sbp->b_data;
soff = idp->in_off;
}
/*
@@ -286,7 +286,7 @@
ssize = len - (idp->in_off + 1);
if (bread(vp, idp->in_lbn, (int)fs->e2fs_bsize, NOCRED, &ebp))
goto fail;
- ebap = (u_int *)ebp->b_data;
+ ebap = (uint32_t *)ebp->b_data;
}
/*
* Find the preferred location for the cluster.
@@ -594,16 +594,16 @@
* in another cylinder group.
*
*/
-static u_long
+static uint64_t
ext2_dirpref(struct inode *pip)
{
struct m_ext2fs *fs;
int cg, prefcg, cgsize;
uint64_t avgbfree, minbfree;
- u_int avgifree, avgndir, curdirsize;
- u_int minifree, maxndir;
- u_int mincg, minndir;
- u_int dirsize, maxcontigdirs;
+ uint64_t avgifree, avgndir, curdirsize;
+ uint64_t minifree, maxndir;
+ uint64_t mincg, minndir;
+ uint64_t dirsize, maxcontigdirs;
mtx_assert(EXT2_MTX(pip->i_ump), MA_OWNED);
fs = pip->i_e2fs;
@@ -1475,7 +1475,7 @@
pip = VTOI(pvp);
fs = pip->i_e2fs;
ump = pip->i_ump;
- if ((u_int)ino > fs->e2fs_ipg * fs->e2fs_gcount)
+ if ((uint64_t)ino > fs->e2fs_ipg * fs->e2fs_gcount)
panic("ext2_vfree: range: devvp = %p, ino = %ju, fs = %s",
pip->i_devvp, (uintmax_t)ino, fs->e2fs_fsmnt);
diff --git a/sys/fs/ext2fs/ext2_hash.c b/fs/ext2fs/ext2_hash.c
--- a/sys/fs/ext2fs/ext2_hash.c
+++ b/fs/ext2fs/ext2_hash.c
@@ -187,7 +187,7 @@
for (i = 0; i < len; i++) {
if (unsigned_char)
- val = (u_int)*uname++;
+ val = (unsigned int)*uname++;
else
val = (int)*sname++;
@@ -221,7 +221,7 @@
for (i = 0; i < len; i++) {
if (unsigned_char)
- buf_byte = (u_int)ubuf[i];
+ buf_byte = (unsigned int)ubuf[i];
else
buf_byte = (int)sbuf[i];
diff --git a/sys/fs/ext2fs/ext2_htree.c b/fs/ext2fs/ext2_htree.c
--- a/sys/fs/ext2fs/ext2_htree.c
+++ b/fs/ext2fs/ext2_htree.c
@@ -203,7 +203,7 @@
static void
ext2_htree_release(struct ext2fs_htree_lookup_info *info)
{
- u_int i;
+ uint32_t i;
for (i = 0; i < info->h_levels_num; i++) {
struct buf *bp = info->h_levels[i].h_bp;
diff --git a/sys/fs/ext2fs/ext2_inode.c b/fs/ext2fs/ext2_inode.c
--- a/sys/fs/ext2fs/ext2_inode.c
+++ b/fs/ext2fs/ext2_inode.c
@@ -169,7 +169,7 @@
}
bap = (e2fs_daddr_t *)bp->b_data;
copy = malloc(fs->e2fs_bsize, M_TEMP, M_WAITOK);
- bcopy((caddr_t)bap, (caddr_t)copy, (u_int)fs->e2fs_bsize);
+ bcopy((caddr_t)bap, (caddr_t)copy, (uint32_t)fs->e2fs_bsize);
bzero((caddr_t)&bap[last + 1],
(NINDIR(fs) - (last + 1)) * sizeof(e2fs_daddr_t));
if (last == -1)
@@ -298,7 +298,7 @@
return (error);
oip->i_size = length;
size = blksize(fs, oip, lbn);
- bzero((char *)bp->b_data + offset, (u_int)(size - offset));
+ bzero((char *)bp->b_data + offset, (uint32_t)(size - offset));
allocbuf(bp, size);
if (bp->b_bufsize == fs->e2fs_bsize)
bp->b_flags |= B_CLUSTEROK;
@@ -517,7 +517,7 @@
}
oip->i_size = length;
size = blksize(fs, oip, lbn);
- bzero((char *)bp->b_data + offset, (u_int)(size - offset));
+ bzero((char *)bp->b_data + offset, (uint32_t)(size - offset));
allocbuf(bp, size);
if (bp->b_bufsize == fs->e2fs_bsize)
bp->b_flags |= B_CLUSTEROK;
@@ -566,7 +566,7 @@
if (length != 0)
panic("ext2_truncate: partial truncate of symlink");
#endif
- bzero((char *)&ip->i_shortlink, (u_int)ip->i_size);
+ bzero((char *)&ip->i_shortlink, (uint64_t)ip->i_size);
ip->i_size = 0;
ip->i_flag |= IN_CHANGE | IN_UPDATE;
return (ext2_update(vp, 1));
diff --git a/sys/fs/ext2fs/ext2_lookup.c b/fs/ext2fs/ext2_lookup.c
--- a/sys/fs/ext2fs/ext2_lookup.c
+++ b/fs/ext2fs/ext2_lookup.c
@@ -88,7 +88,7 @@
*/
#undef DIRBLKSIZ
-static u_char ext2_ft_to_dt[] = {
+static uint8_t ext2_ft_to_dt[] = {
DT_UNKNOWN, /* EXT2_FT_UNKNOWN */
DT_REG, /* EXT2_FT_REG_FILE */
DT_DIR, /* EXT2_FT_DIR */
@@ -101,7 +101,7 @@
#define FTTODT(ft) \
((ft) < nitems(ext2_ft_to_dt) ? ext2_ft_to_dt[(ft)] : DT_UNKNOWN)
-static u_char dt_to_ext2_ft[] = {
+static uint8_t dt_to_ext2_ft[] = {
EXT2_FT_UNKNOWN, /* DT_UNKNOWN */
EXT2_FT_FIFO, /* DT_FIFO */
EXT2_FT_CHRDEV, /* DT_CHR */
@@ -152,7 +152,7 @@
off_t offset, startoffset;
size_t readcnt, skipcnt;
ssize_t startresid;
- u_int ncookies;
+ uint32_t ncookies;
int DIRBLKSIZ = VTOI(ap->a_vp)->i_e2fs->e2fs_bsize;
int error;
@@ -330,7 +330,7 @@
struct vnode *pdp; /* saved dp during symlink work */
struct vnode *tdp; /* returned by VFS_VGET */
doff_t enduseful; /* pointer past last used dir slot */
- u_long bmask; /* block offset mask */
+ uint64_t bmask; /* block offset mask */
int error;
struct ucred *cred = cnp->cn_cred;
int flags = cnp->cn_flags;
@@ -978,7 +978,7 @@
struct ext2fs_direct_2 *ep, *nep;
struct inode *dp;
struct buf *bp;
- u_int dsize;
+ uint32_t dsize;
int error, loc, newentrysize, spacefree;
char *dirbuf;
@@ -1049,7 +1049,7 @@
ep->e2d_reclen = htole16(dsize);
ep = (struct ext2fs_direct_2 *)((char *)ep + dsize);
}
- bcopy((caddr_t)entry, (caddr_t)ep, (u_int)newentrysize);
+ bcopy((caddr_t)entry, (caddr_t)ep, (uint32_t)newentrysize);
ext2_dirent_csum_set(dp, (struct ext2fs_direct_2 *)bp->b_data);
if (DOINGASYNC(dvp)) {
bdwrite(bp);
diff --git a/sys/fs/ext2fs/ext2_mount.h b/fs/ext2fs/ext2_mount.h
--- a/sys/fs/ext2fs/ext2_mount.h
+++ b/fs/ext2fs/ext2_mount.h
@@ -50,9 +50,9 @@
struct m_ext2fs *um_e2fs; /* EXT2FS */
- u_long um_nindir; /* indirect ptrs per block */
- u_long um_bptrtodb; /* indir ptr to disk block */
- u_long um_seqinc; /* inc between seq blocks */
+ uint64_t um_nindir; /* indirect ptrs per block */
+ uint64_t um_bptrtodb; /* indir ptr to disk block */
+ uint64_t um_seqinc; /* inc between seq blocks */
struct mtx um_lock; /* Protects ext2mount & fs */
diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/fs/ext2fs/ext2_vfsops.c
--- a/sys/fs/ext2fs/ext2_vfsops.c
+++ b/fs/ext2fs/ext2_vfsops.c
@@ -844,7 +844,7 @@
int error;
int ronly;
int i;
- u_long size;
+ uint64_t size;
int32_t *lp;
int32_t e2fs_maxcontig;
@@ -910,7 +910,7 @@
ump->um_e2fs->e2fs = malloc(sizeof(struct ext2fs),
M_EXT2MNT, M_WAITOK);
mtx_init(EXT2_MTX(ump), "EXT2FS", "EXT2FS Lock", MTX_DEF);
- bcopy(es, ump->um_e2fs->e2fs, (u_int)sizeof(struct ext2fs));
+ bcopy(es, ump->um_e2fs->e2fs, sizeof(struct ext2fs));
if ((error = ext2_compute_sb_data(devvp, ump->um_e2fs->e2fs, ump->um_e2fs)))
goto out;
@@ -1381,7 +1381,7 @@
return (error);
memcpy((char *)bp->b_data + SBLOCKOFFSET, (caddr_t)es,
- (u_int)sizeof(struct ext2fs));
+ sizeof(struct ext2fs));
if (waitfor == MNT_WAIT)
error = bwrite(bp);
else
diff --git a/sys/fs/ext2fs/ext2_vnops.c b/fs/ext2fs/ext2_vnops.c
--- a/sys/fs/ext2fs/ext2_vnops.c
+++ b/fs/ext2fs/ext2_vnops.c
@@ -378,7 +378,7 @@
vap->va_flags = ip->i_flags;
vap->va_gen = ip->i_gen;
vap->va_blocksize = vp->v_mount->mnt_stat.f_iosize;
- vap->va_bytes = dbtob((u_quad_t)ip->i_blocks);
+ vap->va_bytes = dbtob((uint64_t)ip->i_blocks);
vap->va_type = IFTOVT(ip->i_mode);
vap->va_filerev = ip->i_modrev;
return (0);
@@ -794,7 +794,7 @@
struct dirtemplate *dirbuf;
int doingdirectory = 0, oldparent = 0, newparent = 0;
int error = 0;
- u_char namlen;
+ uint8_t namlen;
/*
* Check for cross-device rename.
@@ -2085,7 +2085,7 @@
NOCRED, blkoffset + uio->uio_resid, seqcount,
0, &bp);
} else if (seqcount > 1) {
- u_int nextsize = blksize(fs, ip, nextlbn);
+ uint32_t nextsize = blksize(fs, ip, nextlbn);
error = breadn(vp, lbn,
size, &nextlbn, &nextsize, 1, NOCRED, &bp);
diff --git a/sys/fs/ext2fs/inode.h b/fs/ext2fs/inode.h
--- a/sys/fs/ext2fs/inode.h
+++ b/fs/ext2fs/inode.h
@@ -79,7 +79,7 @@
ino_t i_number; /* The identity of the inode. */
struct m_ext2fs *i_e2fs; /* EXT2FS */
- u_quad_t i_modrev; /* Revision level for NFS lease. */
+ uint64_t i_modrev; /* Revision level for NFS lease. */
/*
* Side effects; used during directory lookup.
*/

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 22, 1:51 PM (16 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31973701
Default Alt Text
D41663.id126711.diff (8 KB)

Event Timeline