278141 |
03-Feb-2015 |
dim |
MFC r277952:
Fix a -Wcast-qual warning in udf_vnops.c, by using __DECONST. No functional change. |
256281 |
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
248282 |
14-Mar-2013 |
kib |
Add currently unused flag argument to the cluster_read(), cluster_write() and cluster_wbuild() functions. The flags to be allowed are a subset of the GB_* flags for getblk().
Sponsored by: The FreeBSD Foundation Tested by: pho
|
242833 |
09-Nov-2012 |
attilio |
Complete MPSAFE VFS interface and remove MNTK_MPSAFE flag. Porters should refer to __FreeBSD_version 1000021 for this change as it may have happened at the same timeframe.
|
238697 |
22-Jul-2012 |
kevlo |
Use NULL instead of 0 for pointers
|
232821 |
11-Mar-2012 |
kib |
Remove fifo.h. The only used function declaration from the header is migrated to sys/vnode.h.
Submitted by: gianni
|
231949 |
21-Feb-2012 |
kib |
Fix found places where uio_resid is truncated to int.
Add the sysctl debug.iosize_max_clamp, enabled by default. Setting the sysctl to zero allows to perform the SSIZE_MAX-sized i/o requests from the usermode.
Discussed with: bde, das (previous versions) MFC after: 1 month
|
227293 |
07-Nov-2011 |
ed |
Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.
This means that their use is restricted to a single C file.
|
222167 |
22-May-2011 |
rmacklem |
Add a lock flags argument to the VFS_FHTOVP() file system method, so that callers can indicate the minimum vnode locking requirement. This will allow some file systems to choose to return a LK_SHARED locked vnode when LK_SHARED is specified for the flags argument. This patch only adds the flag. It does not change any file system to use it and all callers specify LK_EXCLUSIVE, so file system semantics are not changed.
Reviewed by: kib
|
210172 |
16-Jul-2010 |
jhb |
Revert the previous commit. The race is not applicable to the lockmgr implementation in 8.0 and later as its flags field does not hold dynamic state such as waiters flags, but is only modified in lockinit() aside from VN_LOCK_*().
Discussed with: attilio
|
210171 |
16-Jul-2010 |
jhb |
When the MNTK_EXTENDED_SHARED mount option was added, some filesystems were changed to defer the setting of VN_LOCK_ASHARE() (which clears LK_NOSHARE in the vnode lock's flags) until after they had determined if the vnode was a FIFO. This occurs after the vnode has been inserted a VFS hash or some similar table, so it is possible for another thread to find this vnode via vget() on an i-node number and block on the vnode lock. If the lockmgr interlock (vnode interlock for vnode locks) is not held when clearing the LK_NOSHARE flag, then the lk_flags field can be clobbered. As a result the thread blocked on the vnode lock may never get woken up. Fix this by holding the vnode interlock while modifying the lock flags in this case.
MFC after: 3 days
|
209425 |
22-Jun-2010 |
avg |
udf_vnops: cosmetic followup to r208671 - better looking code
Suggested by: jhb MFC after: 3 days
|
208671 |
31-May-2010 |
avg |
udf_readlink: fix malloc call with uninitialized size parameter
Found by: clang static analyzer MFC after: 4 days
|
193571 |
06-Jun-2009 |
rwatson |
Use #ifdef APPLE_MAC instead of #ifdef MAC to conditionalize Apple-specific behavior for unicode support in UDF so as not to conflict with the MAC Framework.
Note that Apple's XNU kernel also uses #ifdef MAC for the MAC Framework.
Suggested by: pjd MFC after: 3 days
|
191990 |
11-May-2009 |
attilio |
Remove the thread argument from the FSD (File-System Dependent) parts of the VFS. Now all the VFS_* functions and relating parts don't want the context as long as it always refers to curthread.
In some points, in particular when dealing with VOPs and functions living in the same namespace (eg. vflush) which still need to be converted, pass curthread explicitly in order to retain the old behaviour. Such loose ends will be fixed ASAP.
While here fix a bug: now, UFS_EXTATTR can be compiled alone without the UFS_EXTATTR_AUTOSTART option.
VFS KPI is heavilly changed by this commit so thirdy parts modules needs to be recompiled. Bump __FreeBSD_version in order to signal such situation.
|
189696 |
11-Mar-2009 |
jhb |
Add a new internal mount flag (MNTK_EXTENDED_SHARED) to indicate that a filesystem supports additional operations using shared vnode locks. Currently this is used to enable shared locks for open() and close() of read-only file descriptors. - When an ISOPEN namei() request is performed with LOCKSHARED, use a shared vnode lock for the leaf vnode only if the mount point has the extended shared flag set. - Set LOCKSHARED in vn_open_cred() for requests that specify O_RDONLY but not O_CREAT. - Use a shared vnode lock around VOP_CLOSE() if the file was opened with O_RDONLY and the mountpoint has the extended shared flag set. - Adjust md(4) to upgrade the vnode lock on the vnode it gets back from vn_open() since it now may only have a shared vnode lock. - Don't enable shared vnode locks on FIFO vnodes in ZFS and UFS since FIFO's require exclusive vnode locks for their open() and close() routines. (My recent MPSAFE patches for UDF and cd9660 already included this change.) - Enable extended shared operations on UFS, cd9660, and UDF.
Submitted by: ups Reviewed by: pjd (ZFS bits) MFC after: 1 month
|
189364 |
04-Mar-2009 |
avg |
udf: use truly unique directory cookie
'off' is an offset within current block, so there is a good chance it can be non-unique, so use complete offset.
Submitted by: bde Approved by: jhb
|
189363 |
04-Mar-2009 |
avg |
udf_strategy: remove redundant comment
We fail mapping for any udf_bmap_internal error and there can be different reasons for it, so no need to (over-)emphasize files with data in fentry.
Submitted by: bde Approved by: jhb
|
189302 |
03-Mar-2009 |
avg |
udf_readdir: do not advance offset if entry can not be uio-ed
Previosly readdir missed some directory entries because there was no space for them in current uio but directory stream offset was advanced nevertheless. jhb has discoved the issue and provided a test-case.
Reviewed by: bde Approved by: jhb (mentor)
|
189111 |
27-Feb-2009 |
avg |
udf_readatoffset: return correct size and data pointer for data in fentry
This should help correct reading of directories with data located in fentry.
Submitted by: bde Approved by: jhb (mentor)
|
189082 |
26-Feb-2009 |
avg |
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)
|
189070 |
26-Feb-2009 |
avg |
udf: add read-ahead support modeled after cd9660
Reviewed by: scottl Approved by: jhb (mentor)
|
189069 |
26-Feb-2009 |
avg |
udf_map: return proper error code instead of leaking an internal one
Incidentally this also allows for small files with data embedded into fentry to be mmap-ed.
Approved by: jhb (mentor)
|
189068 |
26-Feb-2009 |
avg |
udf_read: correctly read data from files with data embedded into fentry,
... as opposed to files with data in extents. Some UDF authoring tools produce this type of file for sufficiently small data files.
Approved by: jhb (mentor)
|
189067 |
26-Feb-2009 |
avg |
udf_strategy: tiny optimization of logic, calculations; extra diagnostics
Use bit-shift instead of division/multiplication. Act on error as soon as it is detected. Report attempt to read data embedded in file entry via regular way. While there, fix lblktosize macro and make use of it.
No functionality should change as a result.
Approved by: jhb (mentor)
|
188816 |
19-Feb-2009 |
avg |
style nit in r188815
Pointed out by: jhb, rpaulo Approved by: jhb (mentor)
|
188815 |
19-Feb-2009 |
avg |
fs/udf: fix incorrect error return (-1) when reading a large dir
Not enough space in user-land buffer is not an error, userland will read further until eof is reached. So instead of propagating -1 to caller we convert it to zero/success.
cd9660 code works exactly the same way.
PR: kern/78987 Reviewed by: jhb (mentor) Approved by: jhb (mentor)
|
188502 |
11-Feb-2009 |
jhb |
- Consolidate error handling in the cd9660 and udf mount routines. - Always read the character device pointer while the associated devfs vnode is locked. Also, use dev_ref() to obtain a new reference on the vnode for the mountpoint. This reference is released on unmount. This mirrors the earlier fix to FFS.
Reviewed by: kib
|
188407 |
09-Feb-2009 |
jhb |
Mark udf(4) MPSAFE and add support for shared vnode locks during pathname lookups: - Honor the caller's locking flags in udf_root() and udf_vget(). - Set VV_ROOT for the root vnode in udf_vget() instead of only doing it in udf_root(). - Honor the requested locking flags during pathname lookups in udf_lookup(). - Release the buffer holding the directory data before looking up the vnode for a given file to avoid a LOR between the "udf" vnode locks and "bufwait". - Use vn_vget_ino() to handle ".." lookups. - Special case "." lookups instead of calling udf_vget(). We have to do extra checking for the vnode lock for "." lookups.
|
188406 |
09-Feb-2009 |
jhb |
Use the same style as the rest of the file for the optional data string after each path component rather than a GCC-ism.
|
188251 |
06-Feb-2009 |
jhb |
Add rudimentary support for symbolic links on UDF. Links are stored as a sequence of pathname components. We walk the list building a string in the caller's passed in buffer. Currently this only handles path names in CS8 (character set 8) as that is what mkisofs generates for UDF images.
MFC after: 1 month
|
188245 |
06-Feb-2009 |
jhb |
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.
|
187959 |
31-Jan-2009 |
bz |
Remove unused local variables.
Submitted by: Christoph Mallon christoph.mallon@gmx.de Reviewed by: kib MFC after: 2 weeks
|
184413 |
28-Oct-2008 |
trasz |
Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessary to add more V* constants, and the variables changed by this patch were often being assigned to mode_t variables, which is 16 bit.
Approved by: rwatson (mentor)
|
184214 |
23-Oct-2008 |
des |
Fix a number of style issues in the MALLOC / FREE commit. I've tried to be careful not to fix anything that was already broken; the NFSv4 code is particularly bad in this respect.
|
184205 |
23-Oct-2008 |
des |
Retire the MALLOC and FREE macros. They are an abomination unto style(9).
MFC after: 3 months
|
183754 |
10-Oct-2008 |
attilio |
Remove the struct thread unuseful argument from bufobj interface. In particular following functions KPI results modified: - bufobj_invalbuf() - bufsync()
and BO_SYNC() "virtual method" of the buffer objects set. Main consumers of bufobj functions are affected by this change too and, in particular, functions which changed their KPI are: - vinvalbuf() - g_vfs_close()
Due to the KPI breakage, __FreeBSD_version will be bumped in a later commit.
As a side note, please consider just temporary the 'curthread' argument passing to VOP_SYNC() (in bufsync()) as it will be axed out ASAP
Reviewed by: kib Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
|
183214 |
20-Sep-2008 |
kib |
Initialize va_rdev to NODEV instead of 0 or VNOVAL in VOP_GETATTR(). NODEV is more appropriate when va_rdev doesn't have a meaningful value.
Submitted by: Jaakko Heinonen <jh saunalahti fi> Suggested by: bde Discussed on: freebsd-fs MFC after: 1 month
|
179060 |
16-May-2008 |
markus |
Fix and speedup timestamp calculations which is roughly based on the patch in the mentioned PR:
- bounds check time->month as it is used as an array index - fix usage of time->month as array index (month is 1-12) - fix calculation based on time->day (day is 1-31) - fix the speedup code as it doesn't calculate correct timestamps before the year 2000 and reduce the number of calculation in the year-by-year code - speedup month calculations by replacing the array content with cumulative values - add microseconds calculation - fix an endian problem
PR: kern/97786 Submitted by: Andriy Gapon <avg@topspin.kiev.ua> Reviewed by: scottl (earlier version) Approved by: emax (mentor) MFC after: 1 week
|
175635 |
24-Jan-2008 |
attilio |
Cleanup lockmgr interface and exported KPI: - Remove the "thread" argument from the lockmgr() function as it is always curthread now - Axe lockcount() function as it is no longer used - Axe LOCKMGR_ASSERT() as it is bogus really and no currently used. Hopefully this will be soonly replaced by something suitable for it. - Remove the prototype for dumplockinfo() as the function is no longer present
Addictionally: - Introduce a KASSERT() in lockstatus() in order to let it accept only curthread or NULL as they should only be passed - Do a little bit of style(9) cleanup on lockmgr.h
KPI results heavilly broken by this change, so manpages and FreeBSD_version will be modified accordingly by further commits.
Tested by: matteo
|
175436 |
18-Jan-2008 |
kib |
udf_vget() shall vgone() the vnode when the file_entry cannot be allocated or read from the volume. Otherwise, half-constructed vnode could be found later and cause panic when accessed.
PR: 118322 MFC after: 1 week
|
175294 |
13-Jan-2008 |
attilio |
VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in conjuction with 'thread' argument passing which is always curthread. Remove the unuseful extra-argument and pass explicitly curthread to lower layer functions, when necessary.
KPI results broken by this change, which should affect several ports, so version bumping and manpage update will be further committed.
Tested by: kris, pho, Diego Sardina <siarodx at gmail dot com>
|
175202 |
10-Jan-2008 |
attilio |
vn_lock() is currently only used with the 'curthread' passed as argument. Remove this argument and pass curthread directly to underlying VOP_LOCK1() VFS method. This modify makes the code cleaner and in particular remove an annoying dependence helping next lockmgr() cleanup. KPI results, obviously, changed.
Manpage and FreeBSD_version will be updated through further commits.
As a side note, would be valuable to say that next commits will address a similar cleanup about VFS methods, in particular vop_lock1 and vop_unlock.
Tested by: Diego Sardina <siarodx at gmail dot com>, Andrea Di Pasquale <whyx dot it at gmail dot com>
|
174538 |
11-Dec-2007 |
markus |
Fix calculation of descriptor tag checksums. According to ECMA-167, Part 4, 7.2.3, bytes 0-3 and 5-15 are used to calculate the checksum of a descriptor tag.
PR: kern/90521 Submitted by: Björn König <bkoenig@cs.tu-berlin.de> Reviewed by: scottl Approved by: emax (mentor)
|
172697 |
16-Oct-2007 |
alfred |
Get rid of qaddr_t.
Requested by: bde
|
170577 |
11-Jun-2007 |
remko |
Correct corrupt read when the read starts at a non-aligned offset.
PR: kern/77234 MFC After: 1 week Approved by: imp (mentor) Requested by: many many people Submitted by: Andriy Gapon <avg at icyb dot net dot ua>
|
167875 |
24-Mar-2007 |
maxim |
o cd9660 code repo-copied, update a comment.
|
167497 |
13-Mar-2007 |
tegge |
Make insmntque() externally visibile and allow it to fail (e.g. during late stages of unmount). On failure, the vnode is recycled.
Add insmntque1(), to allow for file system specific cleanup when recycling vnode on failure.
Change getnewvnode() to no longer call insmntque(). Previously, embryonic vnodes were put onto the list of vnode belonging to a file system, which is unsafe for a file system marked MPSAFE.
Change vfs_hash_insert() to no longer lock the vnode. The caller now has that responsibility.
Change most file systems to lock the vnode and call insmntque() or insmntque1() after a new vnode has been sufficiently setup. Handle failed insmntque*() calls by propagating errors to callers, possibly after some file system specific cleanup.
Approved by: re (kensmith) Reviewed by: kib In collaboration with: kib
|
166774 |
15-Feb-2007 |
pjd |
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
|
166030 |
15-Jan-2007 |
pav |
Rewrite the udf_read() routine to use a file vnode instead of the devvp vnode. 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
|
165879 |
07-Jan-2007 |
pav |
Tell backing v_object the filesize right on it's creation.
MFC after: 1 week
|
165500 |
23-Dec-2006 |
pav |
Call vnode_create_vobject() in VOP_OPEN. Makes mmap work on UDF filesystem.
PR: kern/92040 Approved by: scottl MFC after: 1 week
|
164033 |
06-Nov-2006 |
rwatson |
Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 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>
|
162647 |
26-Sep-2006 |
tegge |
Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag. This eliminates a race where MNT_UPDATE flag could be lost when nmount() raced against sync(), sync_fsync() or quotactl().
|
162255 |
12-Sep-2006 |
imp |
Put the osta.c license on osta.h. The license is the same.
Approved by: scottl@
|
160664 |
25-Jul-2006 |
yar |
In udf_find_partmaps(), when we find a type 1 partition map, we have to 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>
|
159939 |
26-Jun-2006 |
scottl |
Fix a memory leak and a nested 'for' loop in the spare table handling.
Submitted by: Pedro Martelletto
|
158927 |
26-May-2006 |
rodrigc |
Remove calls to vfs_export() for exporting a filesystem for NFS mounting from individual filesystems. Call it instead in vfs_mount.c, after we call VFS_MOUNT() for a specific filesystem.
|
155256 |
03-Feb-2006 |
will |
Make UDF endian-safe.
Submitted by: Pedro Martelletto <pedro@ambientworks.net> (via scottl) Tested on: sparc64
|
154487 |
17-Jan-2006 |
alfred |
I ran into an nfs client panic a couple of times in a row over the 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
|
151897 |
31-Oct-2005 |
rwatson |
Normalize a significant number of kernel malloc type names:
- 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.
|
151405 |
17-Oct-2005 |
rodrigc |
Unconditionally mount a UDF filesystem as read-only, instead of returning an EROFS if we forget to mount it as read-only.
|
151157 |
09-Oct-2005 |
rodrigc |
- Do not hardcode the bsize to a sectorsize of 2048, even though 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
|
151054 |
07-Oct-2005 |
pjd |
We don't need 'imp' here.
|
149771 |
03-Sep-2005 |
ssouhlal |
Unbreak hpfs/ntfs/udf/ext2fs/reiserfs mounting.
Another pointyhat to: ssouhlal
|
149720 |
02-Sep-2005 |
ssouhlal |
*_mountfs() (if the filesystem mounts from a device) needs devvp to be locked, so lock it.
Glanced at by: phk MFC after: 3 days
|
147857 |
09-Jul-2005 |
tanimura |
Regrab dvp only when ISDOTDOT.
Approved by: re (scottl)
|
146984 |
05-Jun-2005 |
imura |
Avoid casting from (int *) to (size_t *) in order to fix udf_iconv on amd64.
Reviewed by: scottl MFC after: 2 weeks
|
146121 |
11-May-2005 |
brueffer |
Fix three typos in comments. Two of them obtained from OpenBSD.
MFC after: 3 days
|
145072 |
14-Apr-2005 |
brueffer |
Correct typo.
Obtained from: OpenBSD
|
145006 |
13-Apr-2005 |
jeff |
- Change all filesystems and vfs_cache to relock the dvp once the child is locked in the ISDOTDOT case. Se vfs_lookup.c r1.79 for details.
Sponsored by: Isilon Systems, Inc.
|
144207 |
28-Mar-2005 |
jeff |
- We no longer have to bother with PDIRUNLOCK, lookup() handles it for us. - 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.
|
144058 |
24-Mar-2005 |
jeff |
- Update vfs_root implementations to match the new prototype. None of 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.
|
143756 |
17-Mar-2005 |
phk |
Also remember to set the fsid here.
|
143692 |
16-Mar-2005 |
phk |
Add two arguments to the vfs_hash() KPI so that filesystems which do not have unique hashes (NFS) can also use it.
|
143686 |
16-Mar-2005 |
phk |
Remove inode fields previously used for private inode hash tables.
|
143668 |
15-Mar-2005 |
phk |
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.
|
143663 |
15-Mar-2005 |
phk |
Improve the vfs_hash() API: vput() the unneeded vnode centrally to avoid replicating the vput in all the filesystems.
|
143619 |
15-Mar-2005 |
phk |
Simplify the vfs_hash calling convention.
|
143571 |
14-Mar-2005 |
phk |
Use vfs_hash instead of home-rolled.
Correct locking around g_vfs_close()
|
142043 |
18-Feb-2005 |
rwatson |
Remove basically unused root_vp pointer in udfmount.
MFC after: 1 week Discussed with: scottl
|
141616 |
10-Feb-2005 |
phk |
Make a bunch of malloc types static.
Found by: src/tools/tools/kernxref
|
140939 |
28-Jan-2005 |
phk |
Make filesystems get rid of their own vnodes vnode_pager object in VOP_RECLAIM().
|
140822 |
25-Jan-2005 |
phk |
Introduce and use g_vfs_close().
|
140768 |
24-Jan-2005 |
phk |
Create a vp->v_object in VFS_FHTOVP() if we want to be exportable 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()
|
140416 |
18-Jan-2005 |
scottl |
Fix an incorrect cast.
Submitted by: Andriy Gapon MFC-after: 3 days.
|
140250 |
14-Jan-2005 |
scottl |
NULL-terminate the . and .. directory entries. Apparently some tools ignore d_namlen and assume that d_name is null-terminated.
Submitted by: Andriy Gapon
|
140249 |
14-Jan-2005 |
scottl |
Replace the min() macro with a test that doesn't truncate the 64-bit values that are used. Thanks to Bruce Evans for pointing this out.
|
140196 |
13-Jan-2005 |
phk |
Whitespace in vop_vector{} initializations.
|
140105 |
12-Jan-2005 |
scottl |
Use off_t when passing and calculating file offsets. While a single 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
|
140104 |
12-Jan-2005 |
scottl |
Don't allow reads past the end of a file.
Submitted by: John Wehle, Andriy Gapon MFC After: 3 days
|
140051 |
11-Jan-2005 |
phk |
Wrap the bufobj operations in macros: BO_STRATEGY() and BO_WRITE()
|
139776 |
06-Jan-2005 |
imp |
/* -> /*- for copyright notices, minor format tweaks as necessary
|
138484 |
06-Dec-2004 |
phk |
ufs vfs_mountedon(), rely on vfs_mount.c calling VFS_STATFS()
|
138412 |
05-Dec-2004 |
phk |
VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few cases 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.
|
138290 |
01-Dec-2004 |
phk |
Back when VOP_* was introduced, we did not have new-style struct 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)
|
138270 |
01-Dec-2004 |
phk |
Mechanically change prototypes for vnode operations to use the new typedefs.
|
137726 |
15-Nov-2004 |
phk |
Make VOP_BMAP return a struct bufobj for the underlying storage device 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.)
|
137037 |
29-Oct-2004 |
phk |
Move UDF to GEOM backing instead of DEVFS.
For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
|
136991 |
27-Oct-2004 |
phk |
Eliminate unnecessary KASSERTs.
Don't use bp->b_vp in VOP_STRATEGY: the vnode is passed in as an argument.
|
132902 |
30-Jul-2004 |
phk |
Put a version element in the VFS filesystem configuration structure and refuse initializing filesystems with a wrong version. This will aid maintenance activites on the 5-stable branch.
s/vfs_mount/vfs_omount/
s/vfs_nmount/vfs_mount/
Name our filesystems mount function consistently.
Eliminate the namiedata argument to both vfs_mount and vfs_omount. It was originally there to save stack space. A few places abused it to get hold of some credentials to pass around. Effectively it is unused.
Reorganize the root filesystem selection code.
|
132023 |
12-Jul-2004 |
alfred |
Make VFS_ROOT() and vflush() take a thread argument. This is to allow filesystems to decide based on the passed thread which vnode to return. Several filesystems used curthread, they now use the passed thread.
|
130994 |
23-Jun-2004 |
scottl |
Make the udf_vnops side endian clean.
|
130986 |
23-Jun-2004 |
scottl |
First half of making UDF be endian-clean. This addresses the vfsops side.
|
130585 |
16-Jun-2004 |
phk |
Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly.
|
127603 |
30-Mar-2004 |
scottl |
Catch all cases where bread() returns an error and a valid *bp, and release the *bp.
Obtained from: DragonFlyBSD
|
126532 |
03-Mar-2004 |
scottl |
Change __FUNCTION__ to __func__
Submitted by: Stefan Farfeleder
|
123215 |
07-Dec-2003 |
scottl |
Re-arrange and consolidate some random debugging stuff
|
122102 |
05-Nov-2003 |
scottl |
Add hooks for translating directories entries using the iconv methods.
Submitted by: imura@ryu16.org
|
122101 |
05-Nov-2003 |
scottl |
Add udf_UncompressUnicodeByte() for processing cs0 strings in a way that the iconv mehtods can handle
Submitted by: imura@ryu16.org
|
121205 |
18-Oct-2003 |
phk |
DuH!
bp->b_iooffset (the spot on the disk), not bp->b_offset (the offset in the file)
|
121196 |
18-Oct-2003 |
phk |
Initialize b_offset before calling VOP_STRATEGY/VOP_SPECSTRATEGY.
Remove various comments of KASSERTS and comments about B_PHYS which does not apply anymore.
|
120775 |
05-Oct-2003 |
jeff |
- Don't cache_purge() in *_reclaim routines. vclean() does it for us so this is redundant.
|
118607 |
07-Aug-2003 |
jhb |
Consistently use the BSD u_int and u_short instead of the SYSV uint and ushort. In most of these files, there was a mixture of both styles and this change just makes them self-consistent.
Requested by: bde (kern_ktrace.c)
|
118047 |
26-Jul-2003 |
phk |
Add a "int fd" argument to VOP_OPEN() which in the future will contain the filedescriptor number on opens from userland.
The index is used rather than a "struct file *" since it conveys a bit more information, which may be useful to in particular fdescfs and /dev/fd/*
For now pass -1 all over the place.
|
116412 |
15-Jun-2003 |
phk |
Add the same KASSERT to all VOP_STRATEGY and VOP_SPECSTRATEGY implementations to check that the buffer points to the correct vnode.
|
116271 |
12-Jun-2003 |
phk |
Initialize struct vfsops C99-sparsely.
Submitted by: hmp Reviewed by: phk
|
114653 |
04-May-2003 |
scottl |
Eliminate the separate malloc type for the sparing table.
|
114652 |
04-May-2003 |
scottl |
Add a missing __inline. Strange that gcc never complained about it. Implement udf_readlblks() in terms of RDSECTOR.
|
114651 |
04-May-2003 |
scottl |
Correctly calculate the size of the extent that should be read in udf_readatoffset(). This should fixe problems with reading udf filesystems created with mkisofs.
|
114632 |
04-May-2003 |
scottl |
Implement the node cache as a hash table.
|
112317 |
16-Mar-2003 |
tjr |
Make udf_allocv() return an unlocked vnode instead of a locked one to avoid a "locking against myself" panic when udf_hashins() tries to lock it again. Lock the vnode in udf_hashins() before adding it to the hash bucket.
|
112119 |
11-Mar-2003 |
kan |
Rename vfs_stdsync function to vfs_stdnosync which matches more closely what function is really doing. Update all existing consumers to use the new name.
Introduce a new vfs_stdsync function, which iterates over mount point's vnodes and call FSYNC on each one of them in turn.
Make nwfs and smbfs use this new function instead of rolling their own identical sync implementations.
Reviewed by: jeff
|
111841 |
03-Mar-2003 |
njl |
Finish cleanup of vprint() which was begun with changing v_tag to a string. Remove extraneous uses of vop_null, instead defering to the default op. Rename vnode type "vfs" to the more descriptive "syncer". Fix formatting for various filesystems that use vop_print.
|
111742 |
02-Mar-2003 |
des |
Clean up whitespace, s/register //, refrain from strong urge to ANSIfy.
|
111741 |
02-Mar-2003 |
des |
uiomove-related caddr_t -> void * (just the low-hanging fruit)
|
111119 |
19-Feb-2003 |
imp |
Back out M_* changes, per decision of the TRB.
Approved by: trb
|
109623 |
21-Jan-2003 |
alfred |
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0. Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
|
108686 |
04-Jan-2003 |
phk |
Temporarily introduce a new VOP_SPECSTRATEGY operation while I try to sort out disk-io from file-io in the vm/buffer/filesystem space.
The intent is to sort VOP_STRATEGY calls into those which operate on "real" vnodes and those which operate on VCHR vnodes. For the latter kind, the call will be changed to VOP_SPECSTRATEGY, possibly conditionally for those places where dual-use happens.
Add a default VOP_SPECSTRATEGY method which will call the normal VOP_STRATEGY. First time it is called it will print debugging information. This will only happen if a normal vnode is passed to VOP_SPECSTRATEGY by mistake.
Add a real VOP_SPECSTRATEGY in specfs, which does what VOP_STRATEGY does on a VCHR vnode today.
Add a new VOP_STRATEGY method in specfs to catch instances where the conversion to VOP_SPECSTRATEGY has not yet happened. Handle the request just like we always did, but first time called print debugging information.
Apart up to two instances of console messages per boot, this amounts to a glorified no-op commit.
If you get any of the messages on your console I would very much like a copy of them mailed to phk@freebsd.org
|
108648 |
04-Jan-2003 |
phk |
Since Jeffr made the std* functions the default in rev 1.63 of kern/vfs_defaults.c it is wrong for the individual filesystems to use the std* functions as that prevents override of the default.
Found by: src/tools/tools/vop_table
|
105077 |
14-Oct-2002 |
mckusick |
Regularize the vop_stdlock'ing protocol across all the filesystems that use it. Specifically, vop_stdlock uses the lock pointed to by vp->v_vnlock. By default, getnewvnode sets up vp->v_vnlock to reference vp->v_lock. Filesystems that wish to use the default do not need to allocate a lock at the front of their node structure (as some still did) or do a lockinit. They can simply start using vn_lock/VOP_UNLOCK. Filesystems that wish to manage their own locks, but still use the vop_stdlock functions (such as nullfs) can simply replace vp->v_vnlock with a pointer to the lock that they wish to have used for the vnode. Such filesystems are responsible for setting the vp->v_vnlock back to the default in their vop_reclaim routine (e.g., vp->v_vnlock = &vp->v_lock).
In theory, this set of changes cleans up the existing filesystem lock interface and should have no function change to the existing locking scheme.
Sponsored by: DARPA & NAI Labs.
|
104005 |
26-Sep-2002 |
phk |
Return ENOTTY on unrecognized ioctls.
|
103870 |
23-Sep-2002 |
alfred |
use __packed.
|
103314 |
14-Sep-2002 |
njl |
Remove all use of vnode->v_tag, replacing with appropriate substitutes. v_tag is now const char * and should only be used for debugging.
Additionally: 1. All users of VT_NTS now check vfsconf->vf_type VFCF_NETWORK 2. The user of VT_PROCFS now checks for the new flag VV_PROCDEP, which is propagated by pseudofs to all child vnodes if the fs sets PFS_PROCDEP.
Suggested by: phk Reviewed by: bde, rwatson (earlier version)
|
102314 |
23-Aug-2002 |
scottl |
Remove stddef.h from the header list
Prodded by: peter
|
102170 |
20-Aug-2002 |
scottl |
Remove the possibility of a race condition when reading the . and .. entries.
|
102169 |
20-Aug-2002 |
scottl |
Don't abuse the stack when translating names.
|
101895 |
15-Aug-2002 |
scottl |
Clean up comments that are no longer relevant.
|
101890 |
15-Aug-2002 |
scottl |
Factor out some ugle code that's shared by udf_readdir and udf_lookup. Significantly de-obfuscate udf_lookup
Inspired By: tes@sgi.com
|
101317 |
04-Aug-2002 |
scottl |
Simplify the handling of a fragmented file_id descriptor. Also de-obfuscate the file_char flags.
|
101308 |
04-Aug-2002 |
jeff |
- Replace v_flag with v_iflag and v_vflag - v_vflag is protected by the vnode lock and is used when synchronization with VOP calls is needed. - v_iflag is protected by interlock and is used for dealing with vnode management issues. These flags include X/O LOCK, FREE, DOOMED, etc. - All accesses to v_iflag and v_vflag have either been locked or marked with mp_fixme's. - Many ASSERT_VOP_LOCKED calls have been added where the locking was not clear. - Many functions in vfs_subr.c were restructured to provide for stronger locking.
Idea stolen from: BSD/OS
|
101202 |
02-Aug-2002 |
scottl |
Calculate the correct physical block number for files that are embedded into their file_entry descriptor. This is more for correctness, since these files cannot be bmap'ed/mmap'ed anyways. Enforce this restriction.
Submitted by: tes@sgi.com
|
101201 |
02-Aug-2002 |
scottl |
Check for deleted files in udf_lookup(), not just udf_readdir().
Submitted by: tes@sgi.com
|
100164 |
16-Jul-2002 |
markm |
Unbreak LINT; sort the includes so that functions are explicitly declared. Remove duplicate includes.
|
98265 |
15-Jun-2002 |
mux |
Convert UDF to nmount.
Reviewed by: scottl
|
96750 |
16-May-2002 |
mux |
In VOP_LOOKUP, don't assume that the final pathname component will be in the same filesystem than the one where the current component is.
Approved by: scottl
|
96572 |
14-May-2002 |
phk |
Make daddr_t and u_daddr_t 64bits wide. Retire daddr64_t and use daddr_t instead.
Sponsored by: DARPA & NAI Labs.
|
95951 |
02-May-2002 |
scottl |
Don't reference vop_std* since they are already implicitly referenced through the VOP_DEFAULT vector
Submitted by: phk
|
95913 |
02-May-2002 |
scottl |
In udf_bmap(), return the physical block number, not the logical block number. This fixes things like cp (ouch!) which use mmap.
|
95767 |
30-Apr-2002 |
scottl |
Fix udf_read(). Honor the uio_resid when determining the size of the block to read and copy out. This removes the hack in udf_readatoffset() for only reading one block at a time. WooHoo! Remove a redundant test for fragmented fids in both udf_readdir() and udf_lookup(). Add comment to both as to why the test is written the way it is. Add a few more safety checks for brelse().
Thanks to Timothy Shimmin <tes@boing.melbourne.sgi.com> for pointing out these problems.
|
94795 |
15-Apr-2002 |
asmodai |
Sync with UDF p4 tree: Use POSIX integer types instead of BSD types.
|
94663 |
14-Apr-2002 |
scottl |
Actually add the UDF files!
|