aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/smbfs
Commit message (Collapse)AuthorAgeFilesLines
* M_USE_RESERVE has been deprecated for a decade. Eliminate any uses thatAlan Cox2010-10-021-2/+1
| | | | | | | have no run-time effect. Notes: svn path=/head/; revision=213363
* Add dedicated routines to toggle lockmgr flags such as LK_NOSHARE andJohn Baldwin2010-08-201-1/+1
| | | | | | | | | | | | | | | LK_CANRECURSE after a lock is created. Use them to implement macros that otherwise manipulated the flags directly. Assert that the associated lockmgr lock is exclusively locked by the current thread when manipulating these flags to ensure the flag updates are safe. This last change required some minor shuffling in a few filesystems to exclusively lock a brand new vnode slightly earlier. Reviewed by: kib MFC after: 3 days Notes: svn path=/head/; revision=211531
* Eliminate unnecessary page queues locking.Alan Cox2010-06-181-2/+0
| | | | Notes: svn path=/head/; revision=209320
* Push down the page queues lock into vm_page_activate().Alan Cox2010-05-071-8/+9
| | | | Notes: svn path=/head/; revision=207746
* Eliminate page queues locking around most calls to vm_page_free().Alan Cox2010-05-061-4/+0
| | | | Notes: svn path=/head/; revision=207728
* Acquire the page lock around all remaining calls to vm_page_free() onAlan Cox2010-05-051-6/+12
| | | | | | | | | | | | | | | | managed pages that didn't already have that lock held. (Freeing an unmanaged page, such as the various pmaps use, doesn't require the page lock.) This allows a change in vm_page_remove()'s locking requirements. It now expects the page lock to be held instead of the page queues lock. Consequently, the page queues lock is no longer required at all by callers to vm_page_rename(). Discussed with: kib Notes: svn path=/head/; revision=207669
* Move checking against RLIMIT_FSIZE into one place, vn_rlimit_fsize().Edward Tomasz Napierala2010-05-051-14/+4
| | | | | | | Reviewed by: kib Notes: svn path=/head/; revision=207662
* Lock the page around vm_page_activate() and vm_page_deactivate() callsKonstantin Belousov2010-05-031-2/+6
| | | | | | | | | | where it was missed. The wrapped fragments now protect wire_count with page lock. Reviewed by: alc Notes: svn path=/head/; revision=207584
* Switch to our preferred 2-clause BSD license.Joel Dahl2010-04-079-60/+6
| | | | | | | Approved by: bp Notes: svn path=/head/; revision=206361
* Remove unused smbfs_smb_qpathinfo().Edward Tomasz Napierala2010-01-081-110/+0
| | | | Notes: svn path=/head/; revision=201798
* Spell DIAGNOSTIC correctly.Ruslan Ermilov2009-10-241-1/+1
| | | | Notes: svn path=/head/; revision=198448
* Make *getpages()s' assertion on the state of each page's dirty bitsAlan Cox2009-05-281-1/+1
| | | | | | | stricter. Notes: svn path=/head/; revision=192986
* Eliminate unnecessary clearing of the page's dirty mask from variousAlan Cox2009-05-151-1/+3
| | | | | | | | | getpages functions. Eliminate a stale comment. Notes: svn path=/head/; revision=192134
* Eliminate gratuitous clearing of the page's dirty mask.Alan Cox2009-05-121-1/+2
| | | | Notes: svn path=/head/; revision=192010
* Remove the thread argument from the FSD (File-System Dependent) parts ofAttilio Rao2009-05-111-9/+17
| | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=191990
* Eliminate stale comments.Alan Cox2009-05-101-4/+0
| | | | | | | Eliminate a case of unnecessary page queues locking. Notes: svn path=/head/; revision=191964
* After r186194 the *fs_strategy() functions always return 0.Bjoern A. Zeeb2009-01-311-2/+1
| | | | | | | | | | | So we are no longer interested in the error returned from the *fs_doio() functions. With that we can remove the error variable as its value is unused now. Submitted by: Christoph Mallon christoph.mallon@gmx.de Notes: svn path=/head/; revision=187960
* According to phk@, VOP_STRATEGY should never, _ever_, returnEdward Tomasz Napierala2008-12-161-1/+1
| | | | | | | | | | | | | | | | anything other than 0. Make it so. This fixes "panic: VOP_STRATEGY failed bp=0xc320dd90 vp=0xc3b9f648", encountered when writing to an orphaned filesystem. Reason for the panic was the following assert: KASSERT(i == 0, ("VOP_STRATEGY failed bp=%p vp=%p", bp, bp->b_vp)); at vfs_bio:bufstrategy(). Reviewed by: scottl, phk Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation Notes: svn path=/head/; revision=186194
* Catch up with netsmb locking: explicit thread arguments no longer required.Robert Watson2008-11-021-2/+2
| | | | Notes: svn path=/head/; revision=184572
* Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessaryEdward Tomasz Napierala2008-10-281-4/+4
| | | | | | | | | | 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) Notes: svn path=/head/; revision=184413
* Retire the MALLOC and FREE macros. They are an abomination unto style(9).Dag-Erling Smørgrav2008-10-232-6/+6
| | | | | | | MFC after: 3 months Notes: svn path=/head/; revision=184205
* Remove the struct thread unuseful argument from bufobj interface.Attilio Rao2008-10-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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> Notes: svn path=/head/; revision=183754
* Initialize va_rdev to NODEV instead of 0 or VNOVAL in VOP_GETATTR().Konstantin Belousov2008-09-201-1/+1
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=183214
* Decontextualize the couplet VOP_GETATTR / VOP_SETATTR as the passed threadAttilio Rao2008-08-283-26/+26
| | | | | | | | | was always curthread and totally unuseful. Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com> Notes: svn path=/head/; revision=182371
* Remove unused 'td' arguments from smbfs_hash_lock() andRobert Watson2008-07-011-9/+9
| | | | | | | | | smbfs_hash_unlock(). MFC after: 3 days Notes: svn path=/head/; revision=180139
* Move the head of byte-level advisory lock list from theKonstantin Belousov2008-04-162-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | filesystem-specific vnode data to the struct vnode. Provide the default implementation for the vop_advlock and vop_advlockasync. Purge the locks on the vnode reclaim by using the lf_purgelocks(). The default implementation is augmented for the nfs and smbfs. In the nfs_advlock, push the Giant inside the nfs_dolock. Before the change, the vop_advlock and vop_advlockasync have taken the unlocked vnode and dereferenced the fs-private inode data, racing with with the vnode reclamation due to forced unmount. Now, the vop_getattr under the shared vnode lock is used to obtain the inode size, and later, in the lf_advlockasync, after locking the vnode interlock, the VI_DOOMED flag is checked to prevent an operation on the doomed vnode. The implementation of the lf_purgelocks() is submitted by dfr. Reported by: kris Tested by: kris, pho Discussed with: jeff, dfr MFC after: 2 weeks Notes: svn path=/head/; revision=178243
* When calling lf_advlock to unlock a record, make sure that ap->a_fl->l_typeDoug Rabson2008-04-141-0/+3
| | | | | | | | | is F_UNLCK otherwise we trigger a LOCKF_DEBUG panic. MFC after: 3 days Notes: svn path=/head/; revision=178195
* Replace lockmgr lock protecting smbfs node hash table with sx lock.Robert Watson2008-03-023-9/+10
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=176744
* Axe the 'thread' argument from VOP_ISLOCKED() and lockstatus() as it isAttilio Rao2008-02-251-1/+1
| | | | | | | | | | | | always curthread. As KPI gets broken by this patch, manpages and __FreeBSD_version will be updated by further commits. Tested by: Andrea Barberio <insomniac at slackware dot it> Notes: svn path=/head/; revision=176559
* Introduce some functions in the vnode locks namespace and in the ffsAttilio Rao2008-02-241-1/+1
| | | | | | | | | | | | | | | | | | namespace in order to handle lockmgr fields in a controlled way instead than spreading all around bogus stubs: - VN_LOCK_AREC() allows lock recursion for a specified vnode - VN_LOCK_ASHARE() allows lock sharing for a specified vnode In FFS land: - BUF_AREC() allows lock recursion for a specified buffer lock - BUF_NOREC() disallows recursion for a specified buffer lock Side note: union_subr.c::unionfs_node_update() is the only other function directly handling lockmgr fields. As this is not simple to fix, it has been left behind as "sole" exception. Notes: svn path=/head/; revision=176519
* Cleanup lockmgr interface and exported KPI:Attilio Rao2008-01-241-3/+4
| | | | | | | | | | | | | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=175635
* VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used inAttilio Rao2008-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> Notes: svn path=/head/; revision=175294
* vn_lock() is currently only used with the 'curthread' passed as argument.Attilio Rao2008-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> Notes: svn path=/head/; revision=175202
* Get rid of qaddr_t.Alfred Perlstein2007-10-161-2/+2
| | | | | | | Requested by: bde Notes: svn path=/head/; revision=172697
* Do proper "locking" for missing vmmeters part.Attilio Rao2007-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) Notes: svn path=/head/; revision=170292
* Change the VOP_OPEN(), vn_open() vnode operation and d_fdopen() cdev operationKonstantin Belousov2007-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 Notes: svn path=/head/; revision=170183
* Revert VMCNT_* operations introduction.Attilio Rao2007-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) Notes: svn path=/head/; revision=170170
* Revert UF_OPENING workaround for CURRENT.Konstantin Belousov2007-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) Notes: svn path=/head/; revision=170152
* Where I previously removed calls to kdb_enter(), now remove include ofRobert Watson2007-05-291-1/+0
| | | | | | | | | kdb.h. Pointed out by: bde Notes: svn path=/head/; revision=170093
* Rather than entering the debugger via kdb_enter() when detecting memoryRobert Watson2007-05-271-12/+6
| | | | | | | corruption under SMBUFS_NAME_DEBUG, panic() with the same error message. Notes: svn path=/head/; revision=170015
* - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulatingJeff Roberson2007-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> Notes: svn path=/head/; revision=169667
* Make insmntque() externally visibile and allow it to fail (e.g. duringTor Egge2007-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 Notes: svn path=/head/; revision=167497
* Use pause() rather than tsleep() on stack variables and function pointers.John Baldwin2007-02-271-1/+1
| | | | Notes: svn path=/head/; revision=167086
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningRobert Watson2006-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> Notes: svn path=/head/; revision=164033
* Create a bidirectional mapping of the DOS 'read only' attributeBoris Popov2006-11-053-2/+20
| | | | | | | | | | | to the 'w' flag. PR: kern/77958 Submitted by: ghozzy gmail com MFC after: 1 month Notes: svn path=/head/; revision=163993
* Ditch crummy fattime <--> timespec conversion functionsPoul-Henning Kamp2006-10-241-149/+8
| | | | Notes: svn path=/head/; revision=163652
* Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag.Tor Egge2006-09-261-0/+2
| | | | | | | | This eliminates a race where MNT_UPDATE flag could be lost when nmount() raced against sync(), sync_fsync() or quotactl(). Notes: svn path=/head/; revision=162647
* Introduce a field to struct vm_page for storing flags that areAlan Cox2006-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(). Notes: svn path=/head/; revision=161125
* Lock the smb share before doing a 'put' on it in smbfs_unmount().John Baldwin2006-07-171-0/+3
| | | | | | | Tested by: "Jiawei Ye" <leafy7382 at gmail> Notes: svn path=/head/; revision=160437
* Enable inadvertantly disabled "securenet" access controls in ypserv. [1]Colin Percival2006-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] Notes: svn path=/head/; revision=159117