Commit Graph

93 Commits

Author SHA1 Message Date
christos 510b8e4284 Avoid stupid printfs during mountroot attempt. 2003-04-03 15:37:55 +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 0e263cfbbf g/c M_SMBFSMNT, it is not used anymore 2003-04-02 11:18:08 +00:00
jdolecek 6056ed86d2 smbfs_writevnode(): print offset as %lld in debug message, and
also print error returned from smb_write()
minor whitespace change in #ifdef notyet code
2003-03-24 13:52:59 +00:00
jdolecek 8ed4fb0379 smbfs_getattr(): make 'oldsize' 64bit, it's used to hold file size
this is necessary for I/O to offset > 4G to actually be written
at proper place, rather than trimming offset to 32bit value
2003-03-24 13:50:10 +00:00
jdolecek 702d1ac1b2 adjust some debug messages 2003-03-24 13:30:44 +00:00
jdolecek 1864eaa69a directories don't have any size in smbfs/CIFS, so don't compare
size in smbfs_kqpoll() neither in filt_smbfsread()
this fixes kqueue on smbfs directory to not flag directory as 'changed'
all the time
2003-03-24 06:39:51 +00:00
jdolecek 7d43984704 g/c some unneeded forward struct declarations 2003-03-23 17:54:26 +00:00
jdolecek b05cd2b635 translate ERRDOS/ERRnofiles to ENOENT in smb_maperror(), and simplify
handling in smbfs_smb_search() appropriately - avoids using
sr_errclass&sr_serror too
2003-03-23 16:55:54 +00:00
dsl bd99e3429d Use 'void *' instead of 'caddr_t' in prototypes of VOP_IOCTL, VOP_FCNTL
and VOP_ADVLOCK, delete casts from callers (and some to copyin/out).
2003-03-21 23:11:19 +00:00
jdolecek 104bc312b7 add kqueue support 2003-03-17 11:39:16 +00:00
jdolecek b26a2a3bdd no need to export union_vfsops here 2003-03-17 10:31:14 +00:00
jdolecek b712ffbfbd add comment for one NULL union_vfsops member 2003-03-17 10:28:41 +00:00
jdolecek 46eb0d5bf0 make it possible for UNION fs to be loaded via LKM - instead of
having some #ifdef UNION code in vfs_vnops.c, introduce variable
'vn_union_readdir_hook' which is set to address of appropriate
vn_readdir() hook by union filesystem when it's loaded & mounted
2003-03-17 09:11:29 +00:00
jdolecek a0deb3e9c4 move union filesystem code from sys/miscfs/union to sys/fs/union 2003-03-16 08:26:46 +00:00
kristerw 708df50a74 'lint' is a very bad name for a variable. 2003-03-15 02:22:13 +00:00
jdolecek fedc587dac #if 0/notnow stuff which isn't currently used
pointed out by Krister Walfridsson
2003-03-03 21:17:05 +00:00
jdolecek b7335072c2 add kqueue (EVFILT_READ, EVFILT_WRITE, EVFILT_VNODE) support
this is basically copy of what nfs_kq.c does - a thread periodically
polls server checking if any of the wateched files changed

eventually this should be changed to take advantage of SMB Directory
Change Notify
2003-03-02 22:06:50 +00:00
jdolecek fe1daad52a add SMBFS_ATTRTIMO for the attribute cache timeout, instead of magic
number

bump the timeout to 5s; eventually we'd want to do some heuristics similar
to NFS, i.e. make the attribute cache timeout longer for files nor recently
changed
2003-02-27 09:14:25 +00:00
jdolecek 0161f51190 g/c prototype for smbfs_ioctl() 2003-02-27 08:54:26 +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 68f0f8227e sprinkle VN_KNOTE()s 2003-02-25 10:33:19 +00:00
jdolecek d423ea284d make 'dosdirtemplate' static const 2003-02-25 10:29:12 +00:00
jdolecek 049525126a remove the XXX comment about holes again - it appears to work fine 2003-02-25 10:14:29 +00:00
jdolecek f9d42ade36 add __KERNEL_RCSID() 2003-02-25 09:09:31 +00:00
jdolecek 4f6180461f switch to hash32_strn() from <sys/hash.h> as the hash function -
former smbfs_hash() may have accessed memory past buffer (ouch!), and accessed
memory in alignment-unsafe way
as an added bonus, hash32_strn() appears to have better distribution
2003-02-24 21:52:53 +00:00
jdolecek b0c6be8be5 add XXX comment regarding holes - they are not handled properly
in write, this needs to be fixed eventually (unless it would work
by luck)
2003-02-24 21:29:48 +00:00
jdolecek 968351dd0d g/c smbfs_hashprint() 2003-02-24 21:27:55 +00:00
jdolecek 0c3d39c642 enable mmap and seek vnode ops - this makes mmap(2), lseek(2),
p{read,write}{,v}(2) work
2003-02-24 19:09:02 +00:00
jdolecek 26d1332b7c since smbfs_fctx.f_fname is always used as 'char', may as well define it
that way rather than u_char
2003-02-24 18:45:35 +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 6d0edf1d1b smbfs_lookup():
* make sure islastcn and lockparent is set before used when the entry is cached
* add VWRITE check for nameiop == RENAME, add necessary unlock/relock for
  ISDOTDOT case
adjust smbfs_print() to have slightly nicer output
enable vnode locking
2003-02-24 16:19:05 +00:00
jdolecek ba728ab921 smbfs_node_alloc():
* use LK_RETRY for the vget()
* turn the check for dead parent vnode to #ifdef DIAGNOSTIC panic
* reformat the hash walk code a little, and only assign vp if entries match
* add some comments
2003-02-24 15:55:08 +00:00
jdolecek a7a5a493b5 SMBERROR() purge - turn into #ifdef DIAGNOSTIC panics 2003-02-24 10:01:02 +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 d8ab9af5e5 need <sys/mount.h> now 2003-02-24 09:18:56 +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
christos 8bf6b72335 style; no space after cast, and add cast to the assignment case too. 2003-02-23 22:03:11 +00:00
jdolecek e211d06862 add genfsops necessary for genfs_*{get|put}pages() to actually work
use 'compat' getpages and gop_write - smbfs doesn't have bmap vnode op (yet)
2003-02-23 21:55:20 +00:00
jdolecek ee219745fe remove bogus (u_long) cast for uvm_vnp_setsize() arg in smbfs_setattr() 2003-02-23 21:54:05 +00:00
jdolecek a7bf0f25db g/c some dead code
make smbfs_name_{alloc|free} inline
turn some checks for smbfs code errors to KASSERT()s
KNF some
also initialize n_size in smbfs_node_alloc()
g/c write-only variable in smbfs_nget()
2003-02-23 21:33:06 +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 9a7b95383e fix KASSERT() in smbfs_findnextLM1() to actually compile 2003-02-23 21:26:26 +00:00
jdolecek 5c7688a6f3 g/c compatibility defines PROC_LOCK()/PROC_UNLOCK() 2003-02-23 19:35:14 +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