Commit Graph

25 Commits

Author SHA1 Message Date
christos 80ecd573c0 PR/1796: John Kohl: statfs misbehaves under chrooted environments.
- Under chroot it displays only the visible filesystems with appropriate paths.
- The statfs f_mntonname gets adjusted to contain the real path from root.
- While was there, fixed a bug in ext2fs, locking problems with vfs_getfsstat(),
  and factored out some of the vfsop statfs() code to copy_statfs_info(). This
  fixes the problem where some filesystems forgot to set fsid.
- Made coda look more like a normal fs.
2003-04-16 21:44:18 +00:00
jdolecek 293074e648 attach/detach also malloc type M_SMBFSHASH ('oops') 2003-04-08 16:26:31 +00:00
jdolecek a9bdad15e9 when loaded via LKM, need to malloc_type_{attach|detach} used malloc
types on load/unload appropriately
XXX this should really be automated somehow
2003-04-02 16:26:53 +00:00
jdolecek 88db5b512b Don't try to reacquire root vnode if vflush() in smbfs_unmount() fails.
This is potentially fragile, since the vnode may have been reclaimed
in vflush(), and used by different filesystem. This wouldn't actually
happen due to n_parent link to parent directory, but better safe
than sorry.

Since sm_root is only and strictly cache to speed up VFS_ROOT(),
it can be acquired/dropped any time. Rearrange code to not
require sm_root set, and change smbfs_root() back to set
sm_root if it's not set yet. smbfs_unmount() now only vrele()s
the root vnode if sm_root is set, and doesn't try reacquire it
if vflush() fails.

problem with vref() after vflush() pointed out by Bill Studenmund
2003-02-26 20:21:40 +00:00
jdolecek e651d04ed9 split the part of smbfs_root() which sets sm_root to separate function
smbfs_setroot()
remove pointless if() and MNT_LOCAL flag handling in smbfs_unmount()
turn the check for non-null sm_root to KASSERT() in smbfs_statfs()
adjust some comments
2003-02-26 18:16:37 +00:00
jdolecek 90bb788eb7 smbfs_sync(): need to explicitly ignore VNON vnodes (e.g. syncer vnode) 2003-02-25 23:57:27 +00:00
jdolecek c0e6d2aa07 make smbfs_sync() look more like sync routines for other fs, particularily:
* lock/unlock mntvnode_slock and vnode interlock appropriately
* use LK_NOWAIT for vget()
* adjust the check for vnode being dirty to check fs-private 'modified' flag,
  and drop waitfor/VOP_ISLOCKED() check
2003-02-25 22:17:20 +00:00
jdolecek f9d42ade36 add __KERNEL_RCSID() 2003-02-25 09:09:31 +00:00
jdolecek b5a66cd65b use pool to allocate memory for smbfs nodes
rename smbfs_uninit() to smbfs_done()
some whitespace fixes + use FREE() (not free()) for MALLOC()ed memory
2003-02-24 18:41:04 +00:00
jdolecek 38b6d81ba3 update for changed locking requirements for smb_share_put() 2003-02-24 09:57:31 +00:00
jdolecek da9a088d46 SMBERROR() purge - replace with KASSERT()s, panic or remove altogether
as appropriate
2003-02-24 09:30:42 +00:00
jdolecek f31ba31b00 change smbfs_args:
* g/c unused members 'mount_point', 'root_path', which only take space
* rename 'dev' to 'dev_fd' to more closely match what it is
* add 'export' member to avoid changing this again if ever smbfs would
  be made exportable

bump SMBFS_VERMIN - ABI/API change; mount_smbfs needs to be recompiled
to work again
2003-02-23 22:31:17 +00:00
jdolecek 999273657a put the printf about version mismatch inside #ifdef SMB_VNODE_DEBUG
do not touch sm_args.mount_point[]
2003-02-23 22:20:05 +00:00
jdolecek ccf56de797 KASSERT() smp->sm_root is nonnull in unmount
g/c unneeded variable in smbfs_root()
2003-02-23 21:27:33 +00:00
jdolecek 24a773c6ef g/c smbfs_pbuf_freecnt, it's not used (it was not even declared on NetBSD) 2003-02-23 19:30:13 +00:00
jdolecek 21a1fae4a8 g/c smbfs_debuglevel, it's not used anywhere
pointed out by Krister Walfridsson
2003-02-23 18:47:10 +00:00
jdolecek e75d9c776e vrele() the reference to root vnode before calling vflush() in smbfs_unmount(),
so that the filesystem wouldn't appear as busy when it's not, and vref()
it back if the vflush() fails

LK_DRAIN sm_hashlock before freeing the smbmount struct

g/c one meaningless check in smbfs_root()
2003-02-18 19:40:36 +00:00
jdolecek 0550f349b8 couple cosmetic changes:
* g/c superfluous printfs
* use vcp on one more place
* don't need to check result of allocation with M_WAITOK
* just exlicitly return (0) on the success path, rather than return (error)
2003-02-18 10:27:17 +00:00
jdolecek 245fa74e31 g/c SMBFS_USEZONE and some other redundant code
terminate the check if options SMB was included
remove the #ifndef FB_CURRENT around f_mntonname; FB_CURRENT used to be defined
  in netsmb headers, and this caused f_mntonname to not be initialized
terminate the messy code setting f_mntfromname, and use snprintf() instead
2003-02-16 19:35:16 +00:00
erh 16a0b9753c Wrap the smbfs_pbuf_freecnt var in #ifndef NetBSD since it's entirely unused. 2003-02-01 21:02:03 +00:00
thorpej b193480908 Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
2003-02-01 06:23:35 +00:00
christos 6f3945a88d MNT_GETARGS support 2002-09-21 18:10:34 +00:00
soren 178d83d503 Die, qaddr_t, die! - mnt_data in struct mount is already effectively
a void *, so stop pretending otherwise.
2002-07-30 07:40:07 +00:00
deberg 4738ff87d6 netbsd changes 2002-01-09 17:43:28 +00:00
deberg f5cc2966a0 import freebsd smbfs code 2002-01-09 17:25:32 +00:00