Andrew Morton [Sat, 17 Apr 2004 10:28:13 +0000 (03:28 -0700)]
[PATCH] reiserfs: fsync() speedup
From: Chris Mason <mason@suse.com>
Updates the reiserfs-logging improvements to use schedule_timeout instead of
yield when letting the transaction grow a little before forcing a commit for
fsync/O_SYNC/O_DIRECT.
Also, when one process forces a transaction to end and plans on doing the
commit (like fsync), it sets a flag on the transaction so the journal code
knows not to bother kicking the journal work queue.
queue_delayed_work is used so that if we get a bunch of tiny transactions
ended quickly, we aren't constantly kicking the work queue.
These significantly improve reiserfs performance during fsync heavy
workloads.
Andrew Morton [Sat, 17 Apr 2004 10:28:02 +0000 (03:28 -0700)]
[PATCH] Add "commit=0" to reiserfs
From: Bart Samwel <bart@samwel.tk>
Add support for value 0 to the commit option of reiserfs. Means "restore
to the default value". For the maximum commit age, this default value is
normally read from the journal; this patch adds an extra variable to cache
the default value for the maximum commit age.
Andrew Morton [Sat, 17 Apr 2004 10:27:51 +0000 (03:27 -0700)]
[PATCH] ppc64: hugepage cleanup
From: David Gibson <david@gibson.dropbear.id.au>
This is a small cleanup to the PPC64 hugepage code. It removes an
unhelpful function, removing some studlyCaps in the process. It was
originally this way to match the normal page path, but that has all been
rewritten since.
Andrew Morton [Sat, 17 Apr 2004 10:27:40 +0000 (03:27 -0700)]
[PATCH] Fix mq 32-bit compatibility
From: Jakub Jelinek <jakub@redhat.com>
The first change removes just a useless put_user (si_int and si_ptr are
part of the same union, si_ptr is on all arches covering whole union), the
rest is fixes for signal handling of SI_MESGQ.
From: Andros: Implement server-side reboot recovery (server now handles
open and lock reclaims). Not completely to spec: we don't yet store the
state in stable storage that would be required to recover correctly in
certain situations.
Andrew Morton [Sat, 17 Apr 2004 10:26:39 +0000 (03:26 -0700)]
[PATCH] kNFSdv4: Set credentials properly when puutrootfh is used
From: NeilBrown <neilb@cse.unsw.edu.au>
The credentials (uid/gid) of a process are set when a filehandle is
verified. Nfsv4 allows requests without an explicit filehandle (instead,
an implicit 'root' filehandle) so we much make sure the credentials are set
for these requests too.
From: "J. Bruce Fields" <bfields@fieldses.org>
From: Andros: added a call to nfsd_setuser in nfsd4_putrootfh so that nfsd
runs as the rpc->cred user.
Andrew Morton [Sat, 17 Apr 2004 10:26:28 +0000 (03:26 -0700)]
[PATCH] kNFSdv4: Improve how locking copes with replays
From: NeilBrown <neilb@cse.unsw.edu.au>
From: "J. Bruce Fields" <bfields@fieldses.org>
From: Andros: Hold state_lock longer so the stateowner doesn't diseappear
out from under us before we get the chance to encode the replay. Don't
attempt to save replay if we failed to find a stateowner.
Andrew Morton [Sat, 17 Apr 2004 10:25:57 +0000 (03:25 -0700)]
[PATCH] kNFSdv4: Keep state to allow replays for 'close' to work.
From: NeilBrown <neilb@cse.unsw.edu.au>
From: "J. Bruce Fields" <bfields@fieldses.org>
From: Andros: Idea is to keep around a list of openowners recently released
by closes, and make sure they stay around long enough so that replays still
work.
Andrew Morton [Sat, 17 Apr 2004 10:25:10 +0000 (03:25 -0700)]
[PATCH] dm: avoid ioctl buffer overrun
From: Kevin Corry <kevcorry@us.ibm.com>
dm-ioctl.c::retrieve_status(): Prevent overrunning the ioctl buffer by making
sure we don't call the target status routine with a buffer size limit of
zero. [Kevin Corry, Alasdair Kergon]
Andrew Morton [Sat, 17 Apr 2004 10:24:54 +0000 (03:24 -0700)]
[PATCH] dm: fix a comment
From: Kevin Corry <kevcorry@us.ibm.com>
Clarify the comment regarding the "next" field in struct dm_target_spec. The
"next" field has different behavior if you're performing a DM_TABLE_STATUS
command than it does if you're performing a DM_TABLE_LOAD command.
See populate_table() and retrieve_status() in drivers/md/dm-ioctl.c for more
details on how this field is used.
Petr Vandrovec [Sat, 17 Apr 2004 10:08:23 +0000 (03:08 -0700)]
[PATCH] Fix exec in multithreaded application
The recent controlling terminal changes broke exec from multithreaded
application because de_thread was not upgraded to new arrangement. I
know that I should not have LD_PRELOAD library which automatically
creates one thread, but it looked like a cool solution to the problem I
had.
de_thread must initialize the controlling terminal information in the
new thread group.
Don Fry [Fri, 16 Apr 2004 09:01:59 +0000 (05:01 -0400)]
[PATCH] pcnet32 transmit performance fix
When the pcnet32 adapter is installed in a system with long PCI latency
and the read burst bit is not set, performance on transmission is very
low (under 20Mbit on a 100Mbit link). This patch against 2.6.6-rc1 will
make sure that read and write bursts are enabled. Tested on ppc64 and
ia32.
Russell King [Fri, 16 Apr 2004 16:27:18 +0000 (17:27 +0100)]
[ARM] Add --no-undefined to linker command line.
Many binutils versions over the last year appear to silently build
assembler files with undefined constants, and able to successfully
create executables from such files. The assembler appears to add
undefined symbols to the symbol table without any corresponding
relocation information. Obviously this is bad news since the
resulting executable may not be what the programmer intended.
Work around the problem by forcing the linker to fail if there are
any undefined symbols in the final object(s).
Alexander Viro [Fri, 16 Apr 2004 07:27:54 +0000 (00:27 -0700)]
[PATCH] remount: mount flags filtering
- we could pass MS_ACTIVE in mount flags and it would be passed into
->get_sb(), leading to interesting failure modes. This flag is only
for internal use (it's set once fill_super is complete and reset
before the inode eviction on umount); made sure that we never get
tricked into having it set it too early.
Alexander Viro [Fri, 16 Apr 2004 07:27:14 +0000 (00:27 -0700)]
[PATCH] remount: fs/jffs2
- jff2->remount_fs() was buggy - it played with sb->s_flags instead of
doing modifications to *flags (->s_flags will be overwritten using
*flags right after the call of ->remount_fs()). Moreover, it tried
to do the wrong thing - it should just enforce noatime and be done
with that. Fixed, ACKed by maintainer.
Alexander Viro [Fri, 16 Apr 2004 07:26:34 +0000 (00:26 -0700)]
[PATCH] remount: fs/sysv fixes
- several variants of sysv fs are supported only r/o. Driver does
force r/o on mount, but doesn't do anything on remount. As the
result, one can remount them r/w and results are Not Pretty(tm).
Missing checks added, code cleaned up.
- we had double-brelse() in v7fs - if sanity checks on root inode will
succeed, but allocation of root dentry fails, we brelse() the same
buffer_head twice. Fixed.
The low level kernel interface to RTAS (the firmware runtime services)
was plagued with races that could cause from bogus results of RTAS
operations to total machine crashes in some circumstances. This patch
fix the ones I could identify, hoping I didn't miss any. I also added
a WARN_ON (well, it's asm equivalent) to enter_rtas to make sure we
never _ever_ try to call that with interrupts enabled.
Anton Blanchard [Thu, 15 Apr 2004 23:53:12 +0000 (16:53 -0700)]
[PATCH] ppc64: always initialise dn->type and dn->name
This fix comes from ppc32. Always initialise dn->type and dn->name so
that code doesnt have to check for NULL everywhere. There is at least
one bug report where we oopsed because of this.
Anton Blanchard [Thu, 15 Apr 2004 23:52:58 +0000 (16:52 -0700)]
[PATCH] ppc64: catch branch to 0 in real mode
We have been debugging some strange fails where we branch to 0 in real
mode. At the moment this results in the cpu running through the
initialisation code and failing somewhere well into it.
The following patch uses the featuring nop'ing code to remove the branch
at real address 0 so it falls through to a trap instruction and gets
caught early.
Adam Goode [Thu, 15 Apr 2004 23:44:35 +0000 (16:44 -0700)]
[PATCH] NMI watchdog Pentium M support
This adda nmi_watchdog=2 support to the Pentium M processor. The P-M is
a P6 chip, but it shares some chipset logic with the Pentium 4, so it
requires this workaround to function.
Without this patch, NMI gets stuck after 1 count. With it, the NMI
fires and breaks me out of UHCI-related hard lockups.
This patch is basically a modified version of the same patch for
oprofile. See the threaded discussion here:
James Bottomley [Thu, 15 Apr 2004 04:56:52 +0000 (21:56 -0700)]
[PATCH] fix non-PC subarchs which were broken by i386 probe_roms change
The author apparently didn't understand that only the mach-default
include directory is included by fallback for header files only. You
can't stick a .c file in mach-default and expect all subarchs to be able
to use it.
The correct fix is to put std_resources.c in the kernel directory and
give it its own Kconfig symbol for conditional compile so that subarchs
may choose to include it or not.
James Bottomley [Thu, 15 Apr 2004 02:20:00 +0000 (19:20 -0700)]
[PATCH] fix 4k irqstacks on x86 (and add voyager support)
There's a bug in the x86 code in that it sets the boot CPU to zero.
This isn't correct since some subarch's use physically indexed CPUs.
However, subarchs have either set the boot cpu before irq_INIT() (or
just inherited the default zero from INIT_THREAD_INFO()), so it's safe
to believe current_thread_info()->cpu about the boot cpu.
This adds IOMMU support & IOMU virtual merging to the default g5 config.
This will not impair performances of machines that don't need the iommu
(the kernel will only enable it if you have more than 2Gb of RAM, though
you can explicitely enable it using a command line argument).
[PATCH] ppc64: Fix possible duplicate MMU hash entries
The current code has a subtle race where 2 hash PTEs can be inserted
for the same virtual address for a short period of time. There should
not be a stale one as the "old" one ultimately gets flushed, but the
architecture specifies that having two hash PTE is illegal and can
result in undefined behaviour.
This patch fixes it by never clearing the _PAGE_HASHPTE bit when
doing test_and_clear_{young,dirty}. That means that subsequent faults
on those pages will have a bit more overhead to "discover" that the
hash entry was indeed evicted.
It also adds a small optisation to avoid doing the atomic operation
and the hash flush in test_and_clear_dirty when the page isn't dirty
or when setting write protect while it's already set.
Andrew Morton [Thu, 15 Apr 2004 00:03:20 +0000 (17:03 -0700)]
[PATCH] ext3: journalled quotas
From: Jan Kara <jack@ucw.cz>
Journalled quota support for ext3: The patch consists of two parts - ext3
changes and changes in generic quota code. The main idea of the changes is
that a transaction is always started before any operation which changes quota
file and dirtifying of the quota causes its write to disk. These two changes
assure that quota change is journalled into the same transaction as the file
change and hence after journal replay quota is consistent with the filesystem
state. As during journal replay inodes from orphan list are deleted/truncated
we have to do quota_on before the replay of the orphan list - this problem is
solved by additional mount options to ext3 with quota file names and format.
Some changes in generic code were also needed to assure that quota structure
in file is always allocated and so ordinary quota operations (like
adding/deleting a block/inode) need only a few blocks from the transaction.
Andrew Morton [Thu, 15 Apr 2004 00:03:05 +0000 (17:03 -0700)]
[PATCH] mq_open() and close_on_exec
From: Chris Wright <chrisw@osdl.org>
SUSv3 doesn't seem to specify one way or the other. I don't have the POSIX
specs, and the old docs I have suggest that mq_open() creates an object
which is to be closed upon exec.
Andrew Morton [Thu, 15 Apr 2004 00:02:37 +0000 (17:02 -0700)]
[PATCH] Fix mq_notify with SIGEV_NONE notification
From: Jakub Jelinek <jakub@redhat.com>
mq_notify (q, NULL)
and
struct sigevent ev = { .sigev_notify = SIGEV_NONE };
mq_notify (q, &ev)
are not the same thing in POSIX, yet the kernel treats them the same. Only
the former makes the notification available to other processes immediately,
see
I looked at mq in Solaris and they behave the same in this regard as Linux
with this patch. Kernel with this patch passes both Intel POSIX testsuite
(with testsuite fixes from Ulrich) and glibc mq testsuite.
Daniel Ritz [Wed, 14 Apr 2004 07:46:25 +0000 (00:46 -0700)]
[PATCH] yenta: interrupt routing for TI briges
Some TI cardbus bridges found in notebooks and PCI add-on cards are
uninitialized. This means the interrupt mode and the interrupt routing
is wrong in most cases, ending up in non working PCI interrupts.
This makes the TI Yenta driver probe the PCI interrupt and adjust the
interrupt setting if no interrupts are delivered. It's done in a safe
way, that doesn't hurt working setups.
Function 1 on two slot devices is handled differently from function 0
since both share the settings.