summaryrefslogtreecommitdiffstats
path: root/sys/fs/udf
Commit message (Collapse)AuthorAgeFilesLines
...
* Move vnode-to-file-handle translation from vfs_vptofh to vop_vptofh method.pjd2007-02-153-23/+23
| | | | | | | | | | | | | | | | 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
* Rewrite the udf_read() routine to use a file vnode instead of the devvp vnode.pav2007-01-151-24/+52
| | | | | | | | | | | | The code is modelled after cd9660, including support for simple read-ahead courtesy of clustered read. Fix udf_strategy to DTRT. This change fixes sendfile(2) not to send out garbage. Reviewed by: scottl MFC after: 1 month
* Tell backing v_object the filesize right on it's creation.pav2007-01-071-1/+6
| | | | MFC after: 1 week
* Call vnode_create_vobject() in VOP_OPEN. Makes mmap work on UDF filesystem.pav2006-12-231-0/+12
| | | | | | PR: kern/92040 Approved by: scottl MFC after: 1 week
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-061-1/+2
| | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
* Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag.tegge2006-09-261-0/+6
| | | | | This eliminates a race where MNT_UPDATE flag could be lost when nmount() raced against sync(), sync_fsync() or quotactl().
* Put the osta.c license on osta.h. The license is the same.imp2006-09-121-0/+15
| | | | Approved by: scottl@
* In udf_find_partmaps(), when we find a type 1 partition map, we have toyar2006-07-252-10/+13
| | | | | | | skip the actual type 1 length (6 bytes). With this change, it is now possible to correctly spot the VAT partition map in certain discs. Submitted by: Pedro Martelletto <pedro@ambientworks.net>
* Fix a memory leak and a nested 'for' loop in the spare table handling.scottl2006-06-261-4/+6
| | | | Submitted by: Pedro Martelletto
* Remove calls to vfs_export() for exporting a filesystem for NFS mountingrodrigc2006-05-261-8/+1
| | | | | from individual filesystems. Call it instead in vfs_mount.c, after we call VFS_MOUNT() for a specific filesystem.
* Make UDF endian-safe.will2006-02-033-3/+3
| | | | | Submitted by: Pedro Martelletto <pedro@ambientworks.net> (via scottl) Tested on: sparc64
* I ran into an nfs client panic a couple of times in a row over thealfred2006-01-171-1/+5
| | | | | | | | | | | | | | | | | | | | last few days. I tracked it down to the fact that nfs_reclaim() is setting vp->v_data to NULL _before_ calling vnode_destroy_object(). After silence from the mailing list I checked further and discovered that ufs_reclaim() is unique among FreeBSD filesystems for calling vnode_destroy_object() early, long before tossing v_data or much of anything else, for that matter. The rest, including NFS, appear to be identical, as if they were just clones of one original routine. The enclosed patch fixes all file systems in essentially the same way, by moving the call to vnode_destroy_object() to early in the routine (before the call to vfs_hash_remove(), if any). I have only tested NFS, but I've now run for over eighteen hours with the patch where I wouldn't get past four or five without it. Submitted by: Frank Mayhar Requested by: Mohan Srinivasan MFC After: 1 week
* Normalize a significant number of kernel malloc type names:rwatson2005-10-312-4/+4
| | | | | | | | | | | | | | | | | | | - Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat. - Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters. - Disambiguate some collisions by adding subsystem prefixes to some memory types. - Generally prefer lower case to upper case. - If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases. Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names.
* Unconditionally mount a UDF filesystem as read-only, instead ofrodrigc2005-10-171-2/+4
| | | | returning an EROFS if we forget to mount it as read-only.
* - Do not hardcode the bsize to a sectorsize of 2048, even thoughrodrigc2005-10-091-5/+21
| | | | | | | | | | | | the UDF specification specifies a logical sectorsize of 2048. Instead, get it from GEOM. - When reading the UDF Anchor Volume Descriptor, use the logical sectorsize of 2048 when calculating the offset to read from, but use the actual sectorsize to determine how much to read. - works with reading a DVD disk and a DVD disk image file via mdconfig - correctly returns EINVAL if we try to mount_udf an audio CD, instead of panicking inside GEOM when INVARIANTS is set
* We don't need 'imp' here.pjd2005-10-071-1/+0
|
* Unbreak hpfs/ntfs/udf/ext2fs/reiserfs mounting.ssouhlal2005-09-031-1/+0
| | | | Another pointyhat to: ssouhlal
* *_mountfs() (if the filesystem mounts from a device) needs devvp to bessouhlal2005-09-021-4/+2
| | | | | | | locked, so lock it. Glanced at by: phk MFC after: 3 days
* Regrab dvp only when ISDOTDOT.tanimura2005-07-091-1/+2
| | | | Approved by: re (scottl)
* Avoid casting from (int *) to (size_t *) in order to fix udf_iconv on amd64.imura2005-06-051-4/+5
| | | | | Reviewed by: scottl MFC after: 2 weeks
* Fix three typos in comments. Two of them obtained from OpenBSD.brueffer2005-05-111-3/+3
| | | | MFC after: 3 days
* Correct typo.brueffer2005-04-141-1/+1
| | | | Obtained from: OpenBSD
* - Change all filesystems and vfs_cache to relock the dvp once the child isjeff2005-04-131-3/+2
| | | | | | locked in the ISDOTDOT case. Se vfs_lookup.c r1.79 for details. Sponsored by: Isilon Systems, Inc.
* - We no longer have to bother with PDIRUNLOCK, lookup() handles it for us.jeff2005-03-281-7/+5
| | | | | | | | - In the ISDOTDOT case we have to unlock the dvp before locking the child, if this fails we must relock dvp before returning an error. This was missing before. Sponsored by: Isilon Systems, Inc.
* - Update vfs_root implementations to match the new prototype. None ofjeff2005-03-241-1/+1
| | | | | | | | these filesystems will support shared locks until they are explicitly modified to do so. Careful review must be done to ensure that this is safe for each individual filesystem. Sponsored by: Isilon Systems, Inc.
* Also remember to set the fsid here.phk2005-03-171-0/+1
|
* Add two arguments to the vfs_hash() KPI so that filesystems which dophk2005-03-161-2/+2
| | | | not have unique hashes (NFS) can also use it.
* Remove inode fields previously used for private inode hash tables.phk2005-03-161-1/+0
|
* Don't hold a reference to the disk vnode for each inode.phk2005-03-153-11/+1
| | | | | Eliminate cdev and vnode pointer to the disk from the inodes, the mount holds everything we need.
* Improve the vfs_hash() API: vput() the unneeded vnode centrally tophk2005-03-151-3/+1
| | | | avoid replicating the vput in all the filesystems.
* Simplify the vfs_hash calling convention.phk2005-03-151-23/+3
|
* Use vfs_hash instead of home-rolled.phk2005-03-143-112/+52
| | | | Correct locking around g_vfs_close()
* Remove basically unused root_vp pointer in udfmount.rwatson2005-02-182-2/+0
| | | | | MFC after: 1 week Discussed with: scottl
* Make a bunch of malloc types static.phk2005-02-101-1/+1
| | | | Found by: src/tools/tools/kernxref
* Make filesystems get rid of their own vnodes vnode_pager object inphk2005-01-281-0/+1
| | | | VOP_RECLAIM().
* Introduce and use g_vfs_close().phk2005-01-251-2/+2
|
* Create a vp->v_object in VFS_FHTOVP() if we want to be exportablephk2005-01-241-0/+1
| | | | | | | | | | | | | with NFS. We are moving responsibility for creating the vnode_pager object into the filesystems which own the vnode, and this is one of the places we have to cover. We call vnode_create_vobject() directly because we own the vnode. If we can get the size easily, pass it as an argument to save the call to VOP_GETATTR() in vnode_create_vobject()
* Fix an incorrect cast.scottl2005-01-181-1/+1
| | | | | Submitted by: Andriy Gapon MFC-after: 3 days.
* NULL-terminate the . and .. directory entries. Apparently some tools ignorescottl2005-01-141-0/+2
| | | | | | d_namlen and assume that d_name is null-terminated. Submitted by: Andriy Gapon
* Replace the min() macro with a test that doesn't truncate the 64-bit valuesscottl2005-01-141-1/+4
| | | | that are used. Thanks to Bruce Evans for pointing this out.
* Whitespace in vop_vector{} initializations.phk2005-01-131-0/+1
|
* Use off_t when passing and calculating file offsets. While a singlescottl2005-01-121-6/+11
| | | | | | | extent in UDF is only 32 bits, multiple extents can exist in a file. Also clean up some minor whitespace problems. Submitted by: John Wehle
* Don't allow reads past the end of a file.scottl2005-01-121-1/+1
| | | | | Submitted by: John Wehle, Andriy Gapon MFC After: 3 days
* Wrap the bufobj operations in macros: BO_STRATEGY() and BO_WRITE()phk2005-01-111-1/+1
|
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-061-2/+4
|
* ufs vfs_mountedon(), rely on vfs_mount.c calling VFS_STATFS()phk2004-12-061-4/+1
|
* VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few casesphk2004-12-051-6/+0
| | | | | | | | doesn't. Most of the implementations have grown weeds for this so they copy some fields from mnt_stat if the passed argument isn't that. Fix this the cleaner way: Always call the implementation on mnt_stat and copy that in toto to the VFS_STATFS argument if different.
* Back when VOP_* was introduced, we did not have new-style structphk2004-12-011-20/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initializations but we did have lofty goals and big ideals. Adjust to more contemporary circumstances and gain type checking. Replace the entire vop_t frobbing thing with properly typed structures. The only casualty is that we can not add a new VOP_ method with a loadable module. History has not given us reason to belive this would ever be feasible in the the first place. Eliminate in toto VOCALL(), vop_t, VNODEOP_SET() etc. Give coda correct prototypes and function definitions for all vop_()s. Generate a bit more data from the vnode_if.src file: a struct vop_vector and protype typedefs for all vop methods. Add a new vop_bypass() and make vop_default be a pointer to another struct vop_vector. Remove a lot of vfs_init since vop_vector is ready to use from the compiler. Cast various vop_mumble() to void * with uppercase name, for instance VOP_PANIC, VOP_NULL etc. Implement VCALL() by making vdesc_offset the offsetof() the relevant function pointer in vop_vector. This is disgusting but since the code is generated by a script comparatively safe. The alternative for nullfs etc. would be much worse. Fix up all vnode method vectors to remove casts so they become typesafe. (The bulk of this is generated by scripts)
* Mechanically change prototypes for vnode operations to use the new typedefs.phk2004-12-011-11/+11
|
* Make VOP_BMAP return a struct bufobj for the underlying storage devicephk2004-11-151-2/+2
| | | | | | | | | instead of a vnode for it. The vnode_pager does not and should not have any interest in what the filesystem uses for backend. (vfs_cluster doesn't use the backing store argument.)
OpenPOWER on IntegriCloud