Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107555987
D34836.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34836.diff
View Options
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -801,6 +801,7 @@
sblockloc = fs->fs_sblockloc;
bcopy(newfs, fs, (u_int)fs->fs_sbsize);
brelse(bp);
+ ump->um_bsize = fs->fs_bsize;
ump->um_maxsymlinklen = fs->fs_maxsymlinklen;
ffs_oldfscompat_read(fs, VFSTOUFS(mp), sblockloc);
UFS_LOCK(ump);
@@ -1064,6 +1065,7 @@
vfs_rel(nmp);
vfs_getnewfsid(mp);
}
+ ump->um_bsize = fs->fs_bsize;
ump->um_maxsymlinklen = fs->fs_maxsymlinklen;
MNT_ILOCK(mp);
mp->mnt_flag |= MNT_LOCAL;
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -314,7 +314,8 @@
ip = VTOI(vp);
vnode_create_vobject(vp, DIP(ip, i_size), ap->a_td);
- if (vp->v_type == VREG && (vn_irflag_read(vp) & VIRF_PGREAD) == 0) {
+ if (vp->v_type == VREG && (vn_irflag_read(vp) & VIRF_PGREAD) == 0 &&
+ ip->i_ump->um_bsize >= PAGE_SIZE) {
vn_irflag_set_cond(vp, VIRF_PGREAD);
}
diff --git a/sys/ufs/ufs/ufsmount.h b/sys/ufs/ufs/ufsmount.h
--- a/sys/ufs/ufs/ufsmount.h
+++ b/sys/ufs/ufs/ufsmount.h
@@ -96,6 +96,7 @@
u_long um_nindir; /* (c) indirect ptrs per blk */
u_long um_bptrtodb; /* (c) indir disk block ptr */
u_long um_seqinc; /* (c) inc between seq blocks */
+ u_long um_bsize; /* (c) fs block size */
uint64_t um_maxsymlinklen; /* (c) max size of short
symlink */
struct mtx um_lock; /* (c) Protects ufsmount & fs */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 16, 8:55 PM (20 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15829097
Default Alt Text
D34836.diff (1 KB)
Attached To
Mode
D34836: ffs: fix vn_read_from_obj() usage for PAGE_SIZE > block size
Attached
Detach File
Event Timeline
Log In to Comment