freebsd-skq/sys/fs
Andriy Gapon b0c0fb5940 udf_readatoffset: read through directory vnode, do not read > MAXBSIZE
Currently bread()-ing through device vnode with
(1) VMIO enabled,
(2) bo_bsize != DEV_BSIZE
(3) more than 1 block
results in data being incorrectly cached.
So instead a more common approach of using a vnode belonging to fs is now
employed.
Also, prevent attempt to bread more than MAXBSIZE bytes because of
adjustments made to account for offset that doesn't start on block
boundary.
Add expanded comments to explain the calculations.
Also drop unused inline function while here.

PR: kern/120967
PR: kern/129084

Reviewed by: scottl, kib
Approved by: jhb (mentor)
2009-02-26 18:58:41 +00:00
..
cd9660 - Consolidate error handling in the cd9660 and udf mount routines. 2009-02-11 22:22:26 +00:00
coda Use shared vnode locks when invoking VOP_READDIR(). 2009-02-13 18:18:14 +00:00
deadfs Add a simple VOP_VPTOCNP implementation for deadfs which returns EBADF. 2008-12-12 00:59:36 +00:00
devfs Remove unused local variables. 2009-01-31 17:36:22 +00:00
fdescfs Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
fifofs Tweak the output of VOP_PRINT/vn_printf() some. 2009-02-06 20:06:48 +00:00
hpfs Remove unused local variables. 2009-01-31 17:36:22 +00:00
msdosfs Right now, when trying to unmount a device that's already gone, 2009-02-23 21:09:28 +00:00
ntfs According to phk@, VOP_STRATEGY should never, _ever_, return 2008-12-16 21:13:11 +00:00
nullfs Remove unused local variables. 2009-01-31 17:36:22 +00:00
nwfs After r186194 the *fs_strategy() functions always return 0. 2009-01-31 18:06:34 +00:00
portalfs Retire the MALLOC and FREE macros. They are an abomination unto style(9). 2008-10-23 15:53:51 +00:00
procfs Fix a logic bug that caused the pfs_attr method to be called only for 2009-02-16 15:17:26 +00:00
pseudofs Fix a logic bug that caused the pfs_attr method to be called only for 2009-02-16 15:17:26 +00:00
smbfs After r186194 the *fs_strategy() functions always return 0. 2009-01-31 18:06:34 +00:00
tmpfs Use uiomove_fromphys() instead of the combination of sf_buf and uiomove(). 2009-02-22 19:50:09 +00:00
udf udf_readatoffset: read through directory vnode, do not read > MAXBSIZE 2009-02-26 18:58:41 +00:00
unionfs Simplify mode_t check treatment (suggested by trasz). 2008-11-25 03:49:41 +00:00