David Howells [Tue, 15 Oct 2002 12:47:34 +0000 (05:47 -0700)]
[PATCH] AFS filesystem 2/2
Here's a patch to add an Andrew File System (AFS) driver to the kernel.
Currently it only provides read-only, uncached, non-automounted and
unsecured support.
David Hinds [Tue, 15 Oct 2002 12:43:55 +0000 (05:43 -0700)]
[PATCH] Small PCMCIA patch
Someone adding tests for failed kmalloc's (which is fine in itself)
did so in a way that would leave some PCMCIA data structures in
inconsistent states... and also introduced a fatal bug affecting
PCMCIA memory cards even when there are no kmalloc failures.
Dipankar Sarma [Tue, 15 Oct 2002 12:40:46 +0000 (05:40 -0700)]
[PATCH] Read-Copy Update infrastructure
This is the RCU core patch from akpm's tree. It has been in his
tree since about 2.5.37-mm1 along with dcache_rcu and so far it has
worked fine. For 2.5, I am hoping that we might get the following
RCU patches included -
1. rt_rcu - ipv4 routecache lookup. Davem agreed to include this patch
if and when you include RCU core in your tree.
2. dcache_rcu (by Maneesh Soni) - dcache lookup avoiding dcache_lock as
much as possible. This has been akpm's tree - stable and gives us
good yield. I have been submitting this to Viro and I will publish
some more benchmark numbers later to help decide on this.
This RCU core implements RCU APIs, call_rcu() and synchronize_kernel(),
by monitoring a per-CPU quiescent state (idle/user etc.) counter.
call_rcu() queues a callback to be invoked after all the CPUs have
gone through a quiescent state. Queuing is per-CPU and each per-CPU
batch gets a batch number. As batches get their turn, a global
cpu mask is used to keep track of CPUs pending quiescent state.
Checking for quiescent cycle is done by saving the per-CPU
counter at the beginning of the batch and then monitoring it for change
through the local timer interrupt handler.
Martin J. Bligh [Tue, 15 Oct 2002 12:38:07 +0000 (05:38 -0700)]
[PATCH] Summit: APIC ID mapping
Adds a raw_phys_apicid array that maps from the mps cpu number
to the apicid - this is needed because the apicids for Summit can be
larger than 32, and thus won't fit into the bitmap. Also adds little wrappers
to map neatly between the two.
Martin J. Bligh [Tue, 15 Oct 2002 12:38:02 +0000 (05:38 -0700)]
[PATCH] Summit: MPS table detection
Adds detection for summit machines from the MPS tables.
Prints a handy-dandy debug message telling you what kind of twisted
machine the kernel thinks you have.
Martin J. Bligh [Tue, 15 Oct 2002 12:37:57 +0000 (05:37 -0700)]
[PATCH] Summit: APIC limits
This one sets up the apic broadcast id (the maximum allowable apic address)
properly for whichever platform. It also abstracts out check_apicid_used,
because that check doesn't work on Summit. Oh, and I bumped up
MAX_IO_APICS, but only for NUMA x86 platforms.
Martin J. Bligh [Tue, 15 Oct 2002 12:37:52 +0000 (05:37 -0700)]
[PATCH] Summit: infrastructure
This puts the DFR (desination format register) value into a #define, and
calculates the LDR (logical desitination register) correctly dependant
on platform. Similarly for TARGET_CPUS.
Martin J. Bligh [Tue, 15 Oct 2002 12:37:47 +0000 (05:37 -0700)]
[PATCH] Summit: config options and hooks
This just adds the config option for summit, and it's Config.help entry,
puts the hooks for the new mach_apic.h subarch file into the right
places, and creates empty shells of the header files.
Trond Myklebust [Tue, 15 Oct 2002 12:30:53 +0000 (05:30 -0700)]
[PATCH] A basic NFSv4 client for 2.5.x
Now that all the hooks are in place, this large patch imports all
of the new code for the NFSv4 client.
nfs4proc.c - procedure vectors
nfs4xdr.c - XDR
nfs4state.c - state bookkeeping (very minimal for now)
nfs4renewd.c - a daemon (implemented as an rpc_task) to keep
state from expiring on the server
Note: The RPCSEC_GSS authentication code is not yet included here.
For the moment we make do with AUTH_UNIX aka. AUTH_SYS.
Neither is the code to do upcalls to userland in order to do
uid/gid <-> name mappings. Instead, stubs have been added to
translate everything to 'nobody:nobody' == '-2:-2'
Trond Myklebust [Tue, 15 Oct 2002 12:30:42 +0000 (05:30 -0700)]
[PATCH] A basic NFSv4 client for 2.5.x
Further cleanups
Separate the static and dynamic filesystem data retrieval calls as per the
NFSv3 spec. This also simplifies things for NFSv4, since many of the
attributes in the fsinfo+fstat combined call are not mandatory to
implement.
Trond Myklebust [Tue, 15 Oct 2002 12:30:37 +0000 (05:30 -0700)]
[PATCH] A basic NFSv4 client for 2.5.x
Clean up nfs_fill_super().
Separate the parsing of the nfs_mount_data struct and the
initialization + sanity checking of the resulting super_block.
The latter is now performed in the new function nfs_sb_init().
Yes it's a GCC optimiser bug. I'm surprised I didn't see it: I tried
a whole heap of different compilers on that code, and had problems
only on the earlier similar code in raid0_run().
I didn't try redhat's compilers (I run debian) but didn't expect the
behaviour to be that different.
Anyway, please apply this patch (which also fixes the chunk overlap
problems).
Tim Wright [Tue, 15 Oct 2002 12:11:13 +0000 (05:11 -0700)]
[PATCH] Forward port of 2.4 fsync_buffers_list() fix.
there was a bug in fysnc_buffers_list() in 2.4 (fixed in 2.4.19) that
could cause the function to return without having written the current
contents of all the buffers.
Obviously, this could be bad for anybody relying on ordering using
O_SYNC or fsync(). If an I/O was already in flight for a particular bh
at the time of the call to fsync_buffers_list(), ll_rw_block() will not
initiate a new I/O even though the contents may have changed. It is
therefore necessary to wait before the call. Here's a patch against
2.5.42 that applies the same fix.
Doug Ledford [Tue, 15 Oct 2002 11:55:33 +0000 (04:55 -0700)]
[PATCH] SCSI update
drivers/scsi/esp.c:
Fix the build.
scsi.h:
Add struct list_head items for future (but soon) use
hosts.h:
Remove select_queue_depths from host struct, add struct list
stuff for proper list linking of host structs
hosts.c:
Don't touch select_queue_depths any longer
Kai Mäkisara [Tue, 15 Oct 2002 11:38:24 +0000 (04:38 -0700)]
[PATCH] SCSI tape door lock and reset fixes
- switch to using scsi_ioctl() for drive door locking and unlocking
instead of private code
- use a driver internal flag to save the reset status until tape is
positioned into known location
- set driver state properly for all partitions after reset
- change put_device() to driver_unregister() in st_detach()
- C99 initializer changes (from Art Haas)
Ingo Molnar [Tue, 15 Oct 2002 11:35:16 +0000 (04:35 -0700)]
[PATCH] futex-2.5.42-A2
This is my current futex patchset against BK-curr. It mostly includes
must-have crash/correctness fixes from Martin Wirth, tested and reworked
somewhat by myself:
- crash fix: futex_close did not detach from the vcache. Detach cleanups.
(Martin Wirth)
- memory leak fix: forgotten put_page() in a rare path in __pin_page().
(Martin Wirth)
- crash fix: do not do any quickcheck in unqueue_me(). (Martin, me)
- correctness fix: the fastpath in __pin_page() now handles reserved
pages the same way get_user_pages() does. (Martin Wirth)
- queueing improvement: __attach_vcache() now uses list_add_tail() to
avoid the reversal of the futex queue if a COW happens. (Martin Wirth)
- simplified alignment check in sys_futex. (Martin Wirth)
- comment fix: make it clear how the vcache hash quickcheck works. (me)
John Levon [Tue, 15 Oct 2002 11:30:56 +0000 (04:30 -0700)]
[PATCH] oprofile - core
Add the oprofile core. The core design is very similar to that we
discussed in private mail. The nasty details should be documented in
the patch below.
John Levon [Tue, 15 Oct 2002 11:30:38 +0000 (04:30 -0700)]
[PATCH] oprofile - timer hook
This implements a simple hook into the profiling timer for x86 so that
non-perfctr machines can still use oprofile. This has proven useful for
laptops and the like.
It also reduces header dependencies a bit by centralising readprofile
code
John Levon [Tue, 15 Oct 2002 11:30:32 +0000 (04:30 -0700)]
[PATCH] oprofile - dcookies
This implements the persistent path-to-dcookies mapping, and adds a
system call for the user-space profiler to look up the profile data, so
it can tag profiles to specific binaries.
John Levon [Tue, 15 Oct 2002 11:30:26 +0000 (04:30 -0700)]
[PATCH] oprofile - hooks
This implements the simple hooks we need to catch unmappings, and to
make sure no stale task_struct*'s are ever used by the main oprofile
core mechanism. If disabled, it compiles to nothing.
Alexander Viro [Tue, 15 Oct 2002 11:25:44 +0000 (04:25 -0700)]
[PATCH] bunch of ->open() killed.
Quite a few drivers don't need ->open() anymore - all it did was checking
that minor is good (== gendisk exists). That is handled by generic code
now...
Alexander Viro [Tue, 15 Oct 2002 11:25:37 +0000 (04:25 -0700)]
[PATCH] bdev->bd_disk introduced
There we go - now we can put a reference to gendisk into block_device. Which
we do in do_open(). Most of the callers of get_gendisk() are simply using
bdev->bd_disk now (and most of the put_disk() calls introduced on previous
step disappear). We also put that pointer into struct request - ->rq_disk.
That allows to get rid of disk_index() kludges in md.c (we simply count
relevant IO in the struct gendisk fields) and kill the export of get_gendisk().
Notice that by now we can move _all_ IO counters into gendisk. That
will kill a bunch of per-major arrays and more importantly, allow to merge
sard in clean way. FWIW, we probably could show them as disk/partitions
attributes in driverfs...
Alexander Viro [Tue, 15 Oct 2002 11:25:32 +0000 (04:25 -0700)]
[PATCH] refcounts for gendisks
Finally. We use disk->dev.refcount as a gendisk refcount. New helper -
get_disk(): atomic_inc on refcount. get_gendisk() does it on return,
callers of get_gendisk() do put_disk() when they are done.
Alexander Viro [Tue, 15 Oct 2002 11:25:24 +0000 (04:25 -0700)]
[PATCH] preparation to use of driverfs refcounts, part 2 - disk
* disk->disk_dev is initialized in alloc_disk(), device_add()'d in
add_disk(), device_del()'d in unregister_disk() and device_put() in
put_disk().
* devices of partitions are made its children.
* attributes of disk one: dev (dev_t of the thing), range (number of
minors) and size (in sectors).
* attributes of partition ones: dev (ditto), start (in sectors) and
size (in sectors).
* disk devices are put on a new bus - "block"
* if caller of add_disk() had set disk->driverfs_dev, we set symlinks:
"device" from disk to underlying device and "block" from underlying
device to disk.
* ->release() of disk_dev frees disk and disk->part.
At that point we have sane driverfs subtree for each gendisk and
refcount of its root (disk->disk_dev) can act as gendisk refcount.
Alexander Viro [Tue, 15 Oct 2002 11:25:18 +0000 (04:25 -0700)]
[PATCH] preparation to use of driverfs refcounts, part 1 - partitions
* update_partition() split into add_partition() and delete_partition().
* all updating of ->part[] is switched to these two (including initial
filling/final cleaning).
* per-partition devices are allocated on-demand and never reused.
We allocate struct device in add_partition() and put reference to it into
hd_struct. ->release() for that struct device frees it. delete_partition()
removes reference from hd_struct and does put_device() on it. Basically,
we get rid of problems with reused struct device by never reusing them...
At that point devices for partitions are nice and sane.
Alexander Viro [Tue, 15 Oct 2002 11:23:37 +0000 (04:23 -0700)]
[PATCH] device_register() splitup
new driverfs helpers - device_initialize/device_add and device_del.
The latter is device_unregister() sans the final put_device(). The former
is splitup of device_register() into initialization and insertion into tree.
We only want to get the inode if it actually is present in core. The
new ilookup function allows us to do this easily instead of having to
tear down the wrongly allocated inode again if it wasn't in memory.
Stephen Lord [Tue, 15 Oct 2002 01:26:56 +0000 (03:26 +0200)]
XFS: Fix a couple of nasty log problems
When a transaction crosses multiple iclogs, the async transaction code
needs to force the log up until the last iclog. We need to record this
lsn in the transaction so we can do a log flush on it.
Secondly, there was a sleep/wakeup pair between flushing the log and
log write completions which was a) incorrect, and b) no longer needed.
This could result in early wakeups of threads waiting for log flushes.
Stephen Lord [Tue, 15 Oct 2002 01:16:03 +0000 (03:16 +0200)]
XFS: Switch to native endian internal representation for extents
Switch xfs from using a big endian internal representation for
the in memory copy of extents to a host byte order representation.
The internal extents are read in once, then modified seperately
from the on disk ones. Since we search and manipulate the extents
multiple times, it is cheaper to convert them to host byte order
once and then keep them in that format. Worth about 5 to 10%
reduction in cpu time for some loads. Complicated by the fact
that the in memory extents are written out to the log sometimes,
and when expanding extents are used to write out the initial
block of extents.
Nathan Scott [Tue, 15 Oct 2002 00:56:47 +0000 (02:56 +0200)]
XFS: Sysctl updates
Symlinks are created by default with mode 777 now, old behavior is
still accessible through sysctl through. Irixsgid mount option
eprecated and it too is still accessible through sysctl.