summaryrefslogtreecommitdiffstats
path: root/sys/fs/smbfs/smbfs_vfsops.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r274784:trasz2014-12-211-2/+0
| | | | | | | | | | Fix smbfs to not zero out statfs f_flags field. Previously, this made getmntinfo() return empty flags for smbfs filesystems when called with MNT_WAIT. It's not visible with mount(8), since it uses MNT_NOWAIT, but broke autounmount(8) operation. PR: 195161 Sponsored by: The FreeBSD Foundation
* MFC r264494:ae2014-05-021-12/+5
| | | | | | | | | | | | Use SMB_QUERY_FS_SIZE_INFO request to populate statfs structure. When server doesn't support this request, try to use SMB_INFO_ALLOCATION. And use SMB_COM_QUERY_INFORMATION_DISK request as fallback. MFC r264600: Remove redundant unlock. This code was removed from the opensolaris and darwin's netsmb implementations, in DfBSD it also has been disabled.
* Garbage collect an useless check. smp should be never NULL.davide2013-06-281-5/+0
|
* Overhaul locking in netsmb, getting rid of the obsolete lockmgr() primitive.davide2013-05-041-2/+2
| | | | | | This solves a long standing LOR between smb_conn and smb_vc. Tested by: martymac, pho (previous version)
* Completely rewrite the interface to smbdev switching from dev_clonedavide2013-05-041-10/+29
| | | | | | | | | to cdevpriv(9). This commit changes the semantic of mount_smbfs in userland as well, which now passes file descriptor in order to to mount a specific filesystem istance. Reviewed by: attilio, ed Tested by: martymac
* - Remove reset of vpp pointer in some places as long as it's not reallydavide2012-11-221-1/+0
| | | | | | | | useful and has the side effect of obfuscating the code a bit. - Remove spurious references to simple_lock. Reported by: attilio [1] Sponsored by: iXsystems inc.
* Until now, smbfs_fullpath() computed the full path starting from thedavide2012-11-221-1/+1
| | | | | | | | | | | | | vnode and following back the chain of n_parent pointers up to the root, without acquiring the locks of the n_parent vnodes analyzed during the computation. This is immediately wrong because if the vnode lock is not held there's no guarantee on the validity of the vnode pointer or the data. In order to fix, store the whole path in the smbnode structure so that smbfs_fullpath() can use this information. Discussed with: kib Reported and tested by: pho Sponsored by: iXsystems inc.
* - Do not put in the mntqueue half-constructed vnodes.davide2012-10-311-16/+0
| | | | | | | | | | - Change the code so that it relies on vfs_hash rather than on a home-made hashtable. - There's no need to inline fnv_32_buf(). Reviewed by: delphij Tested by: pho Sponsored by: iXsystems inc.
* Fix panic due to page faults while in kernel mode, under conditions ofdavide2012-10-311-19/+34
| | | | | | | | | VM pressure. The reason is that in some codepaths pointers to stack variables were passed from one thread to another. In collaboration with: pho Reported by: pho's stress2 suite Sponsored by: iXsystems inc.
* - Remove the references to the deprecated zalloc kernel interfacedavide2012-10-251-30/+1
| | | | | | | | - Use M_ZERO flag in malloc() rather than bzero() - malloc() with M_NOWAIT can't return NULL so there's no need to check Reviewed by: alc Approved by: alc
* Make sure all intermediate variables holding mount flags (mnt_flag)mckusick2012-01-171-1/+1
| | | | | | | and that all internal kernel calls passing mount flags are declared as uint64_t so that flags in the top 32-bits are not lost. MFC after: 2 weeks
* Use strchr() and strrchr().ed2012-01-021-2/+2
| | | | | | | | It seems strchr() and strrchr() are used more often than index() and rindex(). Therefore, simply migrate all kernel code to use it. For the XFS code, remove an empty line to make the code identical to the code in the Linux kernel.
* M_USE_RESERVE has been deprecated for a decade. Eliminate any uses thatalc2010-10-021-2/+1
| | | | have no run-time effect.
* Switch to our preferred 2-clause BSD license.joel2010-04-071-7/+1
| | | | Approved by: bp
* Spell DIAGNOSTIC correctly.ru2009-10-241-1/+1
|
* Remove the thread argument from the FSD (File-System Dependent) parts ofattilio2009-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.
* Catch up with netsmb locking: explicit thread arguments no longer required.rwatson2008-11-021-2/+2
|
* Retire the MALLOC and FREE macros. They are an abomination unto style(9).des2008-10-231-1/+1
| | | | MFC after: 3 months
* Replace lockmgr lock protecting smbfs node hash table with sx lock.rwatson2008-03-021-3/+4
| | | | MFC after: 1 month
* VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used inattilio2008-01-131-1/+1
| | | | | | | | | | | 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>
* Get rid of qaddr_t.alfred2007-10-161-2/+2
| | | | Requested by: bde
* 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().
* 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>
* 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>
* - 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-311-1/+1
| | | | | | | | | | | | | | | | | | | - 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
* - 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.
* Make smbfs_debuglevel private.phk2005-02-101-1/+1
|
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-061-1/+1
|
* typophk2004-12-111-1/+1
|
* Convert to nmount. Add omount compat.phk2004-12-061-27/+85
| | | | Unpropagate the sm_args function into the runtime part.
* VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few casesphk2004-12-051-8/+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.
* Use system wide no-op vfs_start function.phk2004-11-251-16/+0
|
* Refuse attempts to mount root filesystemphk2004-11-091-3/+2
|
* Put a version element in the VFS filesystem configuration structurephk2004-07-301-4/+3
| | | | | | | | | | | | | | | | | | 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.
* Another LINT compilation fixphk2004-07-131-1/+0
|
* Make VFS_ROOT() and vflush() take a thread argument.alfred2004-07-121-3/+3
| | | | | | 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.
* Remove useless SMP check code.des2003-12-071-12/+0
|
* Don't mess about with spare fields in public structures.phk2003-11-121-1/+0
|
* - Support for multibyte charsets in LIBICONV.fjoe2003-09-261-1/+1
| | | | | | | | - CD9660_ICONV, NTFS_ICONV and MSDOSFS_ICONV kernel options (with corresponding modules). - kiconv(3) for loadable charset conversion tables support. Submitted by: Ryuichiro Imura <imura@ryu16.org>
* size_t != int. Make this compile on 64 bit platforms (eg: amd64).peter2003-07-241-1/+2
| | | | Also, "u_short value; if (value > 0xffff)" can never be true.
* Initialize struct vfsops C99-sparsely.phk2003-06-121-24/+17
| | | | | Submitted by: hmp Reviewed by: phk
* Give the M_WAITOK flag explicitly to the MALLOC call to silence a runtimetjr2003-04-011-1/+2
| | | | warning ("Bad malloc flags: 0").
* Rename vfs_stdsync function to vfs_stdnosync which matches morekan2003-03-111-45/+1
| | | | | | | | | | | | | 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
* Remove fragments of support for the FreeBSD 3.x and 4.x branches.tjr2003-03-061-13/+0
|
* Revert removal of vnode and VFS stubs; bp asserts that they are needed.tjr2003-02-081-3/+45
|
* Garbage-collect stub VFS ops, use the defaults instead.tjr2003-02-071-45/+3
|
* Keep trying to flush the vnode list for the mount while some are stilltjr2002-12-131-2/+13
| | | | | | | | | busy and we are making progress towards making them not busy. This is needed because smbfs vnodes reference their parent directory but may appear after their parent in the mount's vnode list; one pass over the list is not sufficient in this case. This stops attempts to unmount idle smbfs mounts failing with EBUSY.
OpenPOWER on IntegriCloud