diff options
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/ext2fs/ext2_vfsops.c | 1 | ||||
-rw-r--r-- | sys/fs/ext2fs/ext2_vnops.c | 3 | ||||
-rw-r--r-- | sys/fs/ext2fs/inode.h | 3 | ||||
-rw-r--r-- | sys/fs/fuse/fuse_io.c | 3 | ||||
-rw-r--r-- | sys/fs/fuse/fuse_node.c | 1 | ||||
-rw-r--r-- | sys/fs/fuse/fuse_node.h | 2 | ||||
-rw-r--r-- | sys/fs/msdosfs/denode.h | 3 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_denode.c | 1 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vnops.c | 4 |
9 files changed, 17 insertions, 4 deletions
diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index a64e28186769..099d6bfec981 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -1229,6 +1229,7 @@ ext2_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp) ip->i_e2fs = fs = ump->um_e2fs; ip->i_ump = ump; ip->i_number = ino; + cluster_init_vn(&ip->i_clusterw); lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL); error = insmntque(vp, mp); diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c index e52db1416890..e00dbc3e0adc 100644 --- a/sys/fs/ext2fs/ext2_vnops.c +++ b/sys/fs/ext2fs/ext2_vnops.c @@ -2313,7 +2313,8 @@ ext2_write(struct vop_write_args *ap) } else if (xfersize + blkoffset == fs->e2fs_fsize) { if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) { bp->b_flags |= B_CLUSTEROK; - cluster_write(vp, bp, ip->i_size, seqcount, 0); + cluster_write(vp, &ip->i_clusterw, bp, + ip->i_size, seqcount, 0); } else { bawrite(bp); } diff --git a/sys/fs/ext2fs/inode.h b/sys/fs/ext2fs/inode.h index 2077b6b276ea..2b9ec687a75c 100644 --- a/sys/fs/ext2fs/inode.h +++ b/sys/fs/ext2fs/inode.h @@ -44,6 +44,7 @@ #include <sys/lock.h> #include <sys/mutex.h> #include <sys/queue.h> +#include <sys/buf.h> #include <fs/ext2fs/ext2_extents.h> @@ -118,6 +119,8 @@ struct inode { }; struct ext4_extent_cache i_ext_cache; /* cache for ext4 extent */ + + struct vn_clusterw i_clusterw; /* Buffer clustering information */ }; /* diff --git a/sys/fs/fuse/fuse_io.c b/sys/fs/fuse/fuse_io.c index 3f23a35a8626..bcf6e5f601bf 100644 --- a/sys/fs/fuse/fuse_io.c +++ b/sys/fs/fuse/fuse_io.c @@ -870,7 +870,8 @@ again: bp->b_flags |= B_CLUSTEROK; SDT_PROBE2(fusefs, , io, write_biobackend_issue, 4, bp); - cluster_write(vp, bp, filesize, seqcount, 0); + cluster_write(vp, &fvdat->clusterw, bp, + filesize, seqcount, 0); } else { SDT_PROBE2(fusefs, , io, write_biobackend_issue, 5, bp); diff --git a/sys/fs/fuse/fuse_node.c b/sys/fs/fuse/fuse_node.c index d19e49358a22..6acd1df29361 100644 --- a/sys/fs/fuse/fuse_node.c +++ b/sys/fs/fuse/fuse_node.c @@ -164,6 +164,7 @@ fuse_vnode_init(struct vnode *vp, struct fuse_vnode_data *fvdat, } vp->v_type = vtyp; vp->v_data = fvdat; + cluster_init_vn(&fvdat->clusterw); counter_u64_add(fuse_node_count, 1); } diff --git a/sys/fs/fuse/fuse_node.h b/sys/fs/fuse/fuse_node.h index c92874334aa1..e5fb13d43bec 100644 --- a/sys/fs/fuse/fuse_node.h +++ b/sys/fs/fuse/fuse_node.h @@ -68,6 +68,7 @@ #include <sys/fnv_hash.h> #include <sys/types.h> #include <sys/mutex.h> +#include <sys/buf.h> #include "fuse_file.h" @@ -118,6 +119,7 @@ struct fuse_vnode_data { struct vattr cached_attrs; uint64_t nlookup; enum vtype vtype; + struct vn_clusterw clusterw; }; /* diff --git a/sys/fs/msdosfs/denode.h b/sys/fs/msdosfs/denode.h index 9a4de4acbe2e..f06c11772621 100644 --- a/sys/fs/msdosfs/denode.h +++ b/sys/fs/msdosfs/denode.h @@ -52,6 +52,8 @@ #ifndef _FS_MSDOSFS_DENODE_H_ #define _FS_MSDOSFS_DENODE_H_ +#include <sys/buf.h> + /* * This is the pc filesystem specific portion of the vnode structure. * @@ -142,6 +144,7 @@ struct fatcache { */ struct denode { struct vnode *de_vnode; /* addr of vnode we are part of */ + struct vn_clusterw de_clusterw; /* buffer clustering information */ u_long de_flag; /* flag bits */ u_long de_dirclust; /* cluster of the directory file containing this entry */ u_long de_diroffset; /* offset of this entry in the directory cluster */ diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index 158b3cdda4da..369533067ce9 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -162,6 +162,7 @@ deget(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, ldep->de_dirclust = dirclust; ldep->de_diroffset = diroffset; ldep->de_inode = inode; + cluster_init_vn(&ldep->de_clusterw); lockmgr(nvp->v_vnlock, LK_EXCLUSIVE, NULL); fc_purge(ldep, 0); /* init the FAT cache for this denode */ error = insmntque(nvp, mntp); diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index 8885ac856588..5cd2c27cb46b 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -796,8 +796,8 @@ msdosfs_write(struct vop_write_args *ap) bawrite(bp); else if (n + croffset == pmp->pm_bpcluster) { if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) - cluster_write(vp, bp, dep->de_FileSize, - seqcount, 0); + cluster_write(vp, &dep->de_clusterw, bp, + dep->de_FileSize, seqcount, 0); else bawrite(bp); } else |