summaryrefslogtreecommitdiffstats
path: root/sys/fs/smbfs
Commit message (Collapse)AuthorAgeFilesLines
* VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used inattilio2008-01-132-2/+2
| | | | | | | | | | | 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>
* vn_lock() is currently only used with the 'curthread' passed as argument.attilio2008-01-103-4/+4
| | | | | | | | | | | | | | | | 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>
* Get rid of qaddr_t.alfred2007-10-161-2/+2
| | | | Requested by: bde
* Do proper "locking" for missing vmmeters part.attilio2007-06-041-4/+4
| | | | | | | | Now, we assume no more sched_lock protection for some of them and use the distribuited loads method for vmmeter (distribuited through CPUs). Reviewed by: alc, bde Approved by: jeff (mentor)
* Change the VOP_OPEN(), vn_open() vnode operation and d_fdopen() cdev operationkib2007-06-011-2/+2
| | | | | | | | argument from being file descriptor index into the pointer to struct file: part 2. Convert calls missed in the first big commit. Noted by: rwatson Pointy hat to: kib
* Revert VMCNT_* operations introduction.attilio2007-05-311-4/+4
| | | | | | | | Probabilly, a general approach is not the better solution here, so we should solve the sched_lock protection problems separately. Requested by: alc Approved by: jeff (mentor)
* Revert UF_OPENING workaround for CURRENT.kib2007-05-311-1/+1
| | | | | | | | | Change the VOP_OPEN(), vn_open() vnode operation and d_fdopen() cdev operation argument from being file descriptor index into the pointer to struct file. Proposed and reviewed by: jhb Reviewed by: daichi (unionfs) Approved by: re (kensmith)
* Where I previously removed calls to kdb_enter(), now remove include ofrwatson2007-05-291-1/+0
| | | | | | kdb.h. Pointed out by: bde
* Rather than entering the debugger via kdb_enter() when detecting memoryrwatson2007-05-271-12/+6
| | | | corruption under SMBUFS_NAME_DEBUG, panic() with the same error message.
* - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulatingjeff2007-05-181-4/+4
| | | | | | | | vmcnts. This can be used to abstract away pcpu details but also changes to use atomics for all counters now. This means sched lock is no longer responsible for protecting counts in the switch routines. Contributed by: Attilio Rao <attilio@FreeBSD.org>
* Make insmntque() externally visibile and allow it to fail (e.g. duringtegge2007-03-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | 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
* Use pause() rather than tsleep() on stack variables and function pointers.jhb2007-02-271-1/+1
|
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-061-5/+7
| | | | | | | | | | | | | 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>
* Create a bidirectional mapping of the DOS 'read only' attributebp2006-11-053-2/+20
| | | | | | | | to the 'w' flag. PR: kern/77958 Submitted by: ghozzy gmail com MFC after: 1 month
* Ditch crummy fattime <--> timespec conversion functionsphk2006-10-241-149/+8
|
* Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag.tegge2006-09-261-0/+2
| | | | | This eliminates a race where MNT_UPDATE flag could be lost when nmount() raced against sync(), sync_fsync() or quotactl().
* Introduce a field to struct vm_page for storing flags that arealc2006-08-091-1/+1
| | | | | | | | | | | | | | | | synchronized by the lock on the object containing the page. Transition PG_WANTED and PG_SWAPINPROG to use the new field, eliminating the need for holding the page queues lock when setting or clearing these flags. Rename PG_WANTED and PG_SWAPINPROG to VPO_WANTED and VPO_SWAPINPROG, respectively. Eliminate the assertion that the page queues lock is held in vm_page_io_finish(). Eliminate the acquisition and release of the page queues lock around calls to vm_page_io_finish() in kern_sendfile() and vfs_unbusy_pages().
* Lock the smb share before doing a 'put' on it in smbfs_unmount().jhb2006-07-171-0/+3
| | | | Tested by: "Jiawei Ye" <leafy7382 at gmail>
* Enable inadvertantly disabled "securenet" access controls in ypserv. [1]cperciva2006-05-311-1/+8
| | | | | | | | Correct a bug in the handling of backslash characters in smbfs which can allow an attacker to escape from a chroot(2). [2] Security: FreeBSD-SA-06:15.ypserv [1] Security: FreeBSD-SA-06:16.smbfs [2]
* Call vm_object_page_clean() with the object lock held.ups2006-05-251-1/+4
| | | | | | Submitted by: kensmith@ Reviewed by: mohans@ MFC after: 6 days
* Do not set B_NOCACHE on buffers when releasing them in flushbuflist().ups2006-05-251-0/+4
| | | | | | | | | | | | | | | If B_NOCACHE is set the pages of vm backed buffers will be invalidated. However clean buffers can be backed by dirty VM pages so invalidating them can lead to data loss. Add support for flush dirty page in the data invalidation function of some network file systems. This fixes data losses during vnode recycling (and other code paths using invalbuf(*,V_SAVE,*,*)) for data written using an mmaped file. Collaborative effort by: jhb@,mohans@,peter@,ps@,ups@ Reviewed by: tegge@ MFC after: 7 days
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-161-1/+0
| | | | unnecessary.
* I ran into an nfs client panic a couple of times in a row over thealfred2006-01-171-1/+4
| | | | | | | | | | | | | | | | | | | | 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
* Eradicate caddr_t from the VFS API.des2005-12-141-2/+2
|
* Recent nmount(2) adoption in mount_smbfs(8) did not flag the "long" optionavatar2005-12-051-3/+1
| | | | | | | | | | | | | | since mount_smbfs(8) assumed long name mounting by default unless "-n long" was explicitly specified. Rather than supplying a "long" option in mount_smbfs(8), this commit brings back the original behaviour by associating SMBFS_MOUNT_NO_LONG with the "nolong" option. This should fix the broken long file names on smbfs people observed recently. Reported by: Vladimir Grebenschikov <vova at fbsd dot ru> Reviewed by: phk Tested by: Slawa Olhovchenkov <slw at zxy dot spb dot ru>
* Fix -Wundef from compiling the amd64 LINT.ru2005-12-041-1/+1
|
* Fix interaction with Windows 2000/XP based servers:bp2005-11-221-1/+3
| | | | | | | | | | If the complete reply on the TRANS2_FIND_FIRST2 request fits exactly into one responce packet, then next call to TRANS2_FIND_NEXT2 will return zero entries and server will close current transaction. To avoid subsequent errors we should not perform FIND_CLOSE2 request. PR: kern/78953 Submitted by: Jim Carroll
* - Add errmsg to the list of smbfs mount options.rodrigc2005-11-161-7/+23
| | | | | | - Use vfs_mount_error() to propagate smbfs mount errors back to userspace. Reviewed by: bp (smbfs maintainer)
* Normalize a significant number of kernel malloc type names:rwatson2005-10-313-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.
* In preparation for making the modules actually use opt_*.h filesyar2005-10-141-4/+0
| | | | | | | | | | | | | | | | | provided in the kernel build directory, fix modules that were failing to build this way due to not quite correct kernel option usage. In particular: ng_mppc.c uses two complementary options, both of which are listed in sys/conf/files. Ideally, there should be a separate option for including ng_mppc.c in kernel build, but now only NETGRAPH_MPPC_ENCRYPTION is usable anyway, the other one requires proprietary files. nwfs and smbfs were trying to ensure they were built with proper network components, but the check was rather questionable. Discussed with: ru
* Staticize a symbol used only in this file.anholt2005-05-061-1/+1
| | | | | PR: kern/43613 Submitted by: Matt Emmerton, matt at gsicomp dot on dot ca
* Fix breakage on alpha.takawata2005-05-051-2/+2
| | | | Pointed out by: hrs via IRC
* Make smbfs capable to use 16bit char set in filenames.takawata2005-05-043-11/+31
| | | | PR:78110
* - Change all filesystems and vfs_cache to relock the dvp once the child isjeff2005-04-131-6/+2
| | | | | | locked in the ISDOTDOT case. Se vfs_lookup.c r1.79 for details. Sponsored by: Isilon Systems, Inc.
* Initialize vp before using it. Failing to do this can cause instantdelphij2005-04-101-0/+1
| | | | | | panic when trying to access a file on mounted smbfs. Submitted by: takawata at jp freebsd org
* - Remove wantparent, it is no longer necessary. An assert in vfs_lookup.cjeff2005-03-291-4/+3
| | | | | prevents any callers from doing a modifying op without LOCKPARENT or WANTPARENT.
* - cache_lookup() now locks the new vnode for us to prevent some races.jeff2005-03-291-57/+37
| | | | | | Remove redundant code. Sponsored by: Isilon Systems, Inc.
* - We no longer have to bother with PDIRUNLOCK, lookup() handles it for us.jeff2005-03-281-54/+21
| | | | | | | | | | | - Network filesystems are written with a special idiom that checks the cache first, and may even unlock dvp before discovering that a network round-trip is required to resolve the name. I believe dvp is prevented from being recycled even in the forced unmount case by the shared lock on the mount point. If not, this code should grow checks for VI_DOOMED after it relocks dvp or it will access NULL v_data fields. Sponsored by: Isilon Systems, Inc.
* - Update vfs_root implementations to match the new prototype. None ofjeff2005-03-241-2/+2
| | | | | | | | 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.
* - The VI_DOOMED flag now signals the end of a vnode's relationship withjeff2005-03-133-17/+3
| | | | | | | | the filesystem. Check that rather than VI_XLOCK. - VOP_INACTIVE should no longer drop the vnode lock. - The vnode lock is required around calls to vrecycle() and vgone(). Sponsored by: Isilon Systems, Inc.
* vp->v_id is a private field for the vfs namecache and it is a big mistakephk2005-02-221-25/+24
| | | | | | | that NFS ever started using it and an even bigger that it got copied&pasted to nwfs and smbfs. Replace with use of vhold()/vdrop().
* Make smbfs_debuglevel private.phk2005-02-102-4/+1
|
* don't call vprint with NULL.phk2005-02-101-1/+1
|
* Unbreak a few filesystems for which vnode_create_vobject() wasn't beingpeadar2005-01-291-1/+3
| | | | | | | | | called in "open", causing mmap() to fail. Where possible, pass size of file to vnode_create_vobject() rather than having it find it out the hard way via VOP_LOOKUP Reviewed by: phk
* Make filesystems get rid of their own vnodes vnode_pager object inphk2005-01-281-0/+1
| | | | VOP_RECLAIM().
* Remove unused argument to vrecycle()phk2005-01-281-1/+1
|
* Eliminate unused and constant arguments to smbfs_vinvalbuf()phk2005-01-144-26/+13
|
* Eliminate unused and unnecessary "cred" argument from vinvalbuf()phk2005-01-141-2/+2
|
* Whitespace in vop_vector{} initializations.phk2005-01-131-2/+3
|
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-069-9/+9
|
OpenPOWER on IntegriCloud