Remove [apparently] bogus casts to u_long for the vnode_pager_setsize()

second argument.  np_size is a 64 bit int, so is the second arg.  This
might have caused needless 2G/4G file size problems.

I believe it was Bruce who queried this.
This commit is contained in:
peter 1998-11-09 07:00:14 +00:00
parent 7273a66285
commit 4dde2ece8b
8 changed files with 24 additions and 24 deletions

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
* $Id: nfs_bio.c,v 1.61 1998/09/29 21:46:54 mckusick Exp $
* $Id: nfs_bio.c,v 1.62 1998/09/29 22:01:10 mckusick Exp $
*/
@ -756,7 +756,7 @@ nfs_write(ap)
if (uio->uio_offset + n > np->n_size) {
np->n_size = uio->uio_offset + n;
np->n_flag |= NMODIFIED;
vnode_pager_setsize(vp, (u_long)np->n_size);
vnode_pager_setsize(vp, np->n_size);
}
bufsize = biosize;
if ((lbn + 1) * biosize > np->n_size) {

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
* $Id: nfs_subs.c,v 1.65 1998/09/07 05:42:15 bde Exp $
* $Id: nfs_subs.c,v 1.66 1998/10/31 15:31:25 peter Exp $
*/
/*
@ -1377,7 +1377,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
np->n_size = vap->va_size;
} else
np->n_size = vap->va_size;
vnode_pager_setsize(vp, (u_long)np->n_size);
vnode_pager_setsize(vp, np->n_size);
} else
np->n_size = vap->va_size;
}
@ -1463,7 +1463,7 @@ nfs_getattrcache(vp, vaper)
np->n_size = vap->va_size;
} else
np->n_size = vap->va_size;
vnode_pager_setsize(vp, (u_long)np->n_size);
vnode_pager_setsize(vp, np->n_size);
} else
np->n_size = vap->va_size;
}

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
* $Id: nfs_subs.c,v 1.65 1998/09/07 05:42:15 bde Exp $
* $Id: nfs_subs.c,v 1.66 1998/10/31 15:31:25 peter Exp $
*/
/*
@ -1377,7 +1377,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
np->n_size = vap->va_size;
} else
np->n_size = vap->va_size;
vnode_pager_setsize(vp, (u_long)np->n_size);
vnode_pager_setsize(vp, np->n_size);
} else
np->n_size = vap->va_size;
}
@ -1463,7 +1463,7 @@ nfs_getattrcache(vp, vaper)
np->n_size = vap->va_size;
} else
np->n_size = vap->va_size;
vnode_pager_setsize(vp, (u_long)np->n_size);
vnode_pager_setsize(vp, np->n_size);
} else
np->n_size = vap->va_size;
}

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95
* $Id: nfs_vnops.c,v 1.109 1998/09/29 23:39:37 mckusick Exp $
* $Id: nfs_vnops.c,v 1.110 1998/10/31 15:31:26 peter Exp $
*/
@ -622,7 +622,7 @@ nfs_setattr(ap)
*/
if (vp->v_mount->mnt_flag & MNT_RDONLY)
return (EROFS);
vnode_pager_setsize(vp, (u_long)vap->va_size);
vnode_pager_setsize(vp, vap->va_size);
if (np->n_flag & NMODIFIED) {
if (vap->va_size == 0)
error = nfs_vinvalbuf(vp, 0,
@ -631,7 +631,7 @@ nfs_setattr(ap)
error = nfs_vinvalbuf(vp, V_SAVE,
ap->a_cred, ap->a_p, 1);
if (error) {
vnode_pager_setsize(vp, (u_long)np->n_size);
vnode_pager_setsize(vp, np->n_size);
return (error);
}
}
@ -647,7 +647,7 @@ nfs_setattr(ap)
error = nfs_setattrrpc(vp, vap, ap->a_cred, ap->a_p);
if (error && vap->va_size != VNOVAL) {
np->n_size = np->n_vattr.va_size = tsize;
vnode_pager_setsize(vp, (u_long)np->n_size);
vnode_pager_setsize(vp, np->n_size);
}
return (error);
}

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95
* $Id: nfs_bio.c,v 1.61 1998/09/29 21:46:54 mckusick Exp $
* $Id: nfs_bio.c,v 1.62 1998/09/29 22:01:10 mckusick Exp $
*/
@ -756,7 +756,7 @@ nfs_write(ap)
if (uio->uio_offset + n > np->n_size) {
np->n_size = uio->uio_offset + n;
np->n_flag |= NMODIFIED;
vnode_pager_setsize(vp, (u_long)np->n_size);
vnode_pager_setsize(vp, np->n_size);
}
bufsize = biosize;
if ((lbn + 1) * biosize > np->n_size) {

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
* $Id: nfs_subs.c,v 1.65 1998/09/07 05:42:15 bde Exp $
* $Id: nfs_subs.c,v 1.66 1998/10/31 15:31:25 peter Exp $
*/
/*
@ -1377,7 +1377,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
np->n_size = vap->va_size;
} else
np->n_size = vap->va_size;
vnode_pager_setsize(vp, (u_long)np->n_size);
vnode_pager_setsize(vp, np->n_size);
} else
np->n_size = vap->va_size;
}
@ -1463,7 +1463,7 @@ nfs_getattrcache(vp, vaper)
np->n_size = vap->va_size;
} else
np->n_size = vap->va_size;
vnode_pager_setsize(vp, (u_long)np->n_size);
vnode_pager_setsize(vp, np->n_size);
} else
np->n_size = vap->va_size;
}

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95
* $Id: nfs_vnops.c,v 1.109 1998/09/29 23:39:37 mckusick Exp $
* $Id: nfs_vnops.c,v 1.110 1998/10/31 15:31:26 peter Exp $
*/
@ -622,7 +622,7 @@ nfs_setattr(ap)
*/
if (vp->v_mount->mnt_flag & MNT_RDONLY)
return (EROFS);
vnode_pager_setsize(vp, (u_long)vap->va_size);
vnode_pager_setsize(vp, vap->va_size);
if (np->n_flag & NMODIFIED) {
if (vap->va_size == 0)
error = nfs_vinvalbuf(vp, 0,
@ -631,7 +631,7 @@ nfs_setattr(ap)
error = nfs_vinvalbuf(vp, V_SAVE,
ap->a_cred, ap->a_p, 1);
if (error) {
vnode_pager_setsize(vp, (u_long)np->n_size);
vnode_pager_setsize(vp, np->n_size);
return (error);
}
}
@ -647,7 +647,7 @@ nfs_setattr(ap)
error = nfs_setattrrpc(vp, vap, ap->a_cred, ap->a_p);
if (error && vap->va_size != VNOVAL) {
np->n_size = np->n_vattr.va_size = tsize;
vnode_pager_setsize(vp, (u_long)np->n_size);
vnode_pager_setsize(vp, np->n_size);
}
return (error);
}

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95
* $Id: nfs_subs.c,v 1.65 1998/09/07 05:42:15 bde Exp $
* $Id: nfs_subs.c,v 1.66 1998/10/31 15:31:25 peter Exp $
*/
/*
@ -1377,7 +1377,7 @@ nfs_loadattrcache(vpp, mdp, dposp, vaper)
np->n_size = vap->va_size;
} else
np->n_size = vap->va_size;
vnode_pager_setsize(vp, (u_long)np->n_size);
vnode_pager_setsize(vp, np->n_size);
} else
np->n_size = vap->va_size;
}
@ -1463,7 +1463,7 @@ nfs_getattrcache(vp, vaper)
np->n_size = vap->va_size;
} else
np->n_size = vap->va_size;
vnode_pager_setsize(vp, (u_long)np->n_size);
vnode_pager_setsize(vp, np->n_size);
} else
np->n_size = vap->va_size;
}