Give cluster_write() an explicit vnode argument.

In the future a struct buf will not automatically point out a vnode for us.
This commit is contained in:
Poul-Henning Kamp 2004-09-27 19:14:10 +00:00
parent bd7667733f
commit 961da2716b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=135858
5 changed files with 5 additions and 10 deletions

View File

@ -272,7 +272,7 @@ WRITE(ap)
} else if (xfersize + blkoffset == fs->s_frag_size) {
if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) {
bp->b_flags |= B_CLUSTEROK;
cluster_write(bp, ip->i_size, seqcount);
cluster_write(vp, bp, ip->i_size, seqcount);
} else {
bawrite(bp);
}

View File

@ -272,7 +272,7 @@ WRITE(ap)
} else if (xfersize + blkoffset == fs->s_frag_size) {
if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) {
bp->b_flags |= B_CLUSTEROK;
cluster_write(bp, ip->i_size, seqcount);
cluster_write(vp, bp, ip->i_size, seqcount);
} else {
bawrite(bp);
}

View File

@ -603,18 +603,13 @@ cluster_wbuild_wb(struct vnode *vp, long size, daddr_t start_lbn, int len)
* 4. end of a cluster - asynchronously write cluster
*/
void
cluster_write(bp, filesize, seqcount)
struct buf *bp;
u_quad_t filesize;
int seqcount;
cluster_write(struct vnode *vp, struct buf *bp, u_quad_t filesize, int seqcount)
{
struct vnode *vp;
daddr_t lbn;
int maxclen, cursize;
int lblocksize;
int async;
vp = bp->b_vp;
if (vp->v_type == VREG) {
async = vp->v_mount->mnt_flag & MNT_ASYNC;
lblocksize = vp->v_mount->mnt_stat.f_iosize;

View File

@ -507,7 +507,7 @@ void cluster_callback(struct buf *);
int cluster_read(struct vnode *, u_quad_t, daddr_t, long,
struct ucred *, long, int, struct buf **);
int cluster_wbuild(struct vnode *, long, daddr_t, int);
void cluster_write(struct buf *, u_quad_t, int);
void cluster_write(struct vnode *, struct buf *, u_quad_t, int);
void vfs_bio_set_validclean(struct buf *, int base, int size);
void vfs_bio_clrbuf(struct buf *);
void vfs_busy_pages(struct buf *, int clear_modify);

View File

@ -699,7 +699,7 @@ ffs_write(ap)
} else if (xfersize + blkoffset == fs->fs_bsize) {
if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) {
bp->b_flags |= B_CLUSTEROK;
cluster_write(bp, ip->i_size, seqcount);
cluster_write(vp, bp, ip->i_size, seqcount);
} else {
bawrite(bp);
}