Commit Graph

16 Commits

Author SHA1 Message Date
avg
2b666c76d2 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
jhb
d33df07e4e Add support for fifos to UDF:
- Add a separate set of vnode operations that inherits from the fifo ops
  and use it for fifo nodes.
- Add a VOP_SETATTR() method that allows setting the size (by silently
  ignoring the requests) of fifos.  This is to allow O_TRUNC opens of
  fifo devices (e.g. I/O redirection in shells using ">").
- Add a VOP_PRINT() handler while I'm here.
2009-02-06 20:09:14 +00:00
pjd
cb2d7c85a8 Move vnode-to-file-handle translation from vfs_vptofh to vop_vptofh method.
This way we may support multiple structures in v_data vnode field within
one file system without using black magic.

Vnode-to-file-handle should be VOP in the first place, but was made VFS
operation to keep interface as compatible as possible with SUN's VFS.
BTW. Now Solaris also implements vnode-to-file-handle as VOP operation.

VFS_VPTOFH() was left for API backward compatibility, but is marked for
removal before 8.0-RELEASE.

Approved by:	mckusick
Discussed with:	many (on IRC)
Tested with:	ufs, msdosfs, cd9660, nullfs and zfs
2007-02-15 22:08:35 +00:00
phk
5443e9818b Remove inode fields previously used for private inode hash tables. 2005-03-16 08:09:52 +00:00
phk
909be0f0c2 Don't hold a reference to the disk vnode for each inode.
Eliminate cdev and vnode pointer to the disk from the inodes,
the mount holds everything we need.
2005-03-15 21:09:52 +00:00
phk
550b89f8bf Use vfs_hash instead of home-rolled.
Correct locking around g_vfs_close()
2005-03-14 12:29:39 +00:00
rwatson
92bbf17de2 Remove basically unused root_vp pointer in udfmount.
MFC after:	1 week
Discussed with:	scottl
2005-02-18 11:47:51 +00:00
phk
6dbcd5fd09 Move UDF to GEOM backing instead of DEVFS.
For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
2004-10-29 10:40:58 +00:00
scottl
933faf5c3e First half of making UDF be endian-clean. This addresses the vfsops side. 2004-06-23 19:36:09 +00:00
phk
dfd1f7fd50 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
scottl
aa058296bc Add hooks for translating directories entries using the iconv methods.
Submitted by: imura@ryu16.org
2003-11-05 06:56:08 +00:00
scottl
a8f90ab7cb Add a missing __inline. Strange that gcc never complained about it.
Implement udf_readlblks() in terms of RDSECTOR.
2003-05-04 07:40:29 +00:00
scottl
35f9e645cf Implement the node cache as a hash table. 2003-05-04 03:40:11 +00:00
scottl
826866dc00 Factor out some ugle code that's shared by udf_readdir and udf_lookup.
Significantly de-obfuscate udf_lookup

Inspired By: tes@sgi.com
2002-08-15 00:43:43 +00:00
asmodai
72a3bfdc81 Sync with UDF p4 tree: Use POSIX integer types instead of BSD types. 2002-04-15 19:49:15 +00:00
scottl
1fd1b83baf Actually add the UDF files! 2002-04-14 16:52:14 +00:00