Commit Graph

196 Commits

Author SHA1 Message Date
pooka f4f60017b9 * remove #ifdef nonsense (which caused the lossage in the first place)
* make it a DRIVER so that it autoloads when /dev/nsmb is opened
2010-12-17 14:27:34 +00:00
pooka 3a3ba15647 Try to unbreak module a little. It would be really nice to not
utterly break things in the name of modularization, especially if
avoiding breakage takes 2min.
2010-12-17 13:24:45 +00:00
pooka 8fb9443f66 unifdef -D__NetBSD__ 2010-12-17 13:05:29 +00:00
ahoka 3531a9ba6c take two on module support
XXX this wont work as a builtin module
2010-12-15 12:58:13 +00:00
christos a39b3d540d Back this out. Fails lockdebug with duplicate lock initialization.
Please test with LOCKDEBUG!
2010-12-11 04:21:17 +00:00
ahoka 6110939092 Module support for NetBSD 2010-12-10 19:44:18 +00:00
christos 94320bc4fd Convert sizes/lengths to unsigned (size_t) or uint32_t
(for binary compatibility).
2010-07-12 02:58:01 +00:00
hannken 245651a23d Remove vlockmgr(). Generic vnode lock operations now use a rwlock located
in the vnode.  All LK_* flags move from sys/lock.h to sys/vnode.h.  Calls
to vlockmgr() in file systems get replaced with VOP_LOCK() or VOP_UNLOCK().

Welcome to 5.99.34.

Discussed on tech-kern.
2010-07-01 13:00:54 +00:00
tron f996d27b06 Fix cut & paste error spotted by Nicolas Joly. 2009-10-18 23:20:31 +00:00
tron 9c260cf349 Fix detection of SMB capabilities according to the CIFS spec:
1.) SMB_CAP_LARGE_FILES advertises support for 64-bit file offsets.
2.) SMB_CAP_LARGE_READX and SMB_CAP_LARGE_WRITEX advertise support for
    large reads and writes (larger than 64KB).
The code previously only used SMB_CAP_LARGE_READX and SMB_CAP_LARGE_WRITEX
which is not correct and doesn't work for the Apple Time Capsule which
only supports SMB_CAP_LARGE_FILES. With these changes SMBFS can copy a
5GB to a Time Capsule and read it back without problems.

Thanks a lot to Allen Briggs for pointing out the broke assumptions
and explaining the CIFS spec to me. This fixes PR kern/42175.
2009-10-18 22:53:36 +00:00
njoly 3ca0c64cb2 Do not call smb_rqpool_fini() on device close. Otherwise, we'll crash
trying to use destroyed pools for SMB request.
2009-09-21 14:13:35 +00:00
pooka df6e37fb47 Convert POOL_INITs to proper cons/destructors. 2009-09-12 12:52:21 +00:00
pooka d42676af17 add comment to previous stating periodic wakeups can be nuked
once smb is mpsafe.
2009-09-04 16:18:34 +00:00
pooka d25f4faa30 defensive programming: wake up iod thread once a second "just in case" 2009-09-04 16:16:52 +00:00
pooka 56df608091 Send data for as long as there is new data available. Otherwise
there was a danger of smb_iod_recvall() blocking, hence releasing
the kernel lock, new data creeping into the queue, and a wakeup
being missed (well, there's still a race, but since it's theoretical
enough for me to never have encountered it, I'll rather solve it
by periodic wakeups).
2009-09-04 16:12:45 +00:00
tls 8c208552ae Grr. One last thing from the upcall-direction patch which I failed to
check in correctly.
2009-09-04 01:41:06 +00:00
pooka 7f37fbb7ea Install smb headers relevant for userspace and make mount_smbfs
use installed headers instead of src/sys.
2009-09-03 12:04:50 +00:00
pooka 3ef732fbf6 fix tybo 2009-09-01 12:23:36 +00:00
njoly 03324155b9 Do initialise the callout when fetching a new request structure from
the pool, not when starting the timer. Likewise, destroy the callout
when giving back the item to the pool.
2009-07-06 11:46:49 +00:00
njoly d90ab2e01d Do not call callout_stop() unless the structure was previoulsy
initialised for a non null timeout.
2009-07-01 10:01:28 +00:00
tsutsui d779b85d3e Remove extra whitespace added by a stupid tool.
XXX: more in src/sys/arch
2009-04-18 14:58:02 +00:00
christos 2b1b4bc6ef Move the internal poll/select related API's to use timespec instead
of timeval (rides the uvm bump).
2009-03-29 19:21:19 +00:00
cegger e2cb85904d bcopy -> memcpy 2009-03-18 17:06:41 +00:00
cegger c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
cegger 35fb64746b bcmp -> memcmp 2009-03-18 15:14:29 +00:00
yamt 812bb0d164 restore the pre socket locking patch signal behaviour.
this fixes a busy-loop in nfs_connect.
2009-01-21 06:59:29 +00:00
cegger dcf705893e use M_ZERO on malloc() and remove subsequent bzero(). 2008-12-19 18:49:37 +00:00
cegger 9b87d582bd kill MALLOC and FREE macros. 2008-12-17 20:51:31 +00:00
plunky fd7356a917 Convert socket options code to use a sockopt structure
instead of laying everything into an mbuf.

approved by core
2008-08-06 15:01:23 +00:00
ad 79873daf65 Make it compile. 2008-06-24 11:20:37 +00:00
gmcgarry 95c7011935 Remove gcc variadic macros with comma elimination. 2008-06-24 10:37:19 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ad 284c2b9aef Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
2008-04-24 18:39:20 +00:00
ad 15e29e981b Merge the socket locking patch:
- Socket layer becomes MP safe.
- Unix protocols become MP safe.
- Allows protocol processing interrupts to safely block on locks.
- Fixes a number of race conditions.

With much feedback from matt@ and plunky@.
2008-04-24 11:38:36 +00:00
ad 40379c8716 Commit the "per-CPU" select patch. This is the result of much work and
testing by rmind@ and myself.

Which approach to use is still being discussed, but I would like to get
this out of my working tree. If we decide to use a different approach
there is no problem with revisiting this.
2008-03-22 18:04:42 +00:00
ad a9ca7a3734 Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.
2008-03-21 21:54:58 +00:00
ad 89d4a45927 selclear() while exiting netsmb's custom copy of select(). PR kern/38123. 2008-03-05 18:09:57 +00:00
rmind c6186face4 Welcome to 4.99.55:
- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
2008-03-01 14:16:49 +00:00
ad 9ef95126d8 Replace crufty use of lockmgr. 2008-01-30 14:08:00 +00:00
ad 4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
ad 80da99483e Don't exit an unheld mutex. 2007-07-10 21:05:03 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
ad 59d979c5f1 Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-12 18:18:22 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
pavel 934634a18c Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.
2007-02-17 22:31:36 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
christos 168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos 4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
christos 9c03e39ea2 add missing initializer 2006-09-03 05:27:28 +00:00
christos f2e0e5984c add missing initializer 2006-09-03 05:25:43 +00:00