16 Jul, 2008
2 commits
-
nlmsvc_testlock calls nlmsvc_lookup_host to find a nlm_host struct. The
callers of this functions, however, call nlmsvc_retrieve_args or
nlm4svc_retrieve_args, which also return a nlm_host struct.Change nlmsvc_testlock to take a host arg instead of calling
nlmsvc_lookup_host itself and change the callers to pass a pointer to
the nlm_host they've already found.We take a reference to host in the place where nlmsvc_testlock()
previous did a new lookup, so the reference counting is unchanged from
before.Signed-off-by: Jeff Layton
Signed-off-by: J. Bruce Fields -
No need to check for a NULL argument twice.
Signed-off-by: Jeff Layton
Signed-off-by: J. Bruce Fields
14 Jul, 2008
1 commit
-
Reduce sizeof struct file_lock by 8 on 64 bit builds allowing +1 objects
per slab in the file_lock_cacheSigned-off-by: Richard Kennedy
Signed-off-by: Andrew Morton
Signed-off-by: J. Bruce Fields
08 Jul, 2008
2 commits
-
testing with newpynfs revealed this warning:
Jul 3 07:32:50 buml kernel: writeable file with no mnt_want_write()
Jul 3 07:32:50 buml kernel: ------------[ cut here ]------------
Jul 3 07:32:50 buml kernel: WARNING: at /usr0/export/dev/bhalevy/git/linux-pnfs-bh-nfs41/include/linux/fs.h:855 drop_file_write_access+0x6b/0x7e()
Jul 3 07:32:50 buml kernel: Modules linked in: nfsd auth_rpcgss exportfs nfs lockd nfs_acl sunrpc
Jul 3 07:32:50 buml kernel: Call Trace:
Jul 3 07:32:50 buml kernel: 6eaadc88: [] warn_on_slowpath+0x54/0x8e
Jul 3 07:32:50 buml kernel: 6eaadcc8: [] printk+0xa0/0x793
Jul 3 07:32:50 buml kernel: 6eaadd38: [] __mutex_lock_slowpath+0x1db/0x1ea
Jul 3 07:32:50 buml kernel: 6eaadd68: [] nfs4_preprocess_seqid_op+0x2a6/0x31c [nfsd]
Jul 3 07:32:50 buml kernel: 6eaadda8: [] drop_file_write_access+0x6b/0x7e
Jul 3 07:32:50 buml kernel: 6eaaddc8: [] nfsd4_open_downgrade+0x114/0x1de [nfsd]
Jul 3 07:32:50 buml kernel: 6eaade08: [] nfsd4_proc_compound+0x1ba/0x2dc [nfsd]
Jul 3 07:32:50 buml kernel: 6eaade48: [] nfsd_dispatch+0xe5/0x1c2 [nfsd]
Jul 3 07:32:50 buml kernel: 6eaade88: [] svc_process+0x3fd/0x714 [sunrpc]
Jul 3 07:32:50 buml kernel: 6eaadea8: [] kernel_sigprocmask+0xf3/0x100
Jul 3 07:32:50 buml kernel: 6eaadee8: [] nfsd+0x182/0x29b [nfsd]
Jul 3 07:32:50 buml kernel: 6eaadf48: [] run_kernel_thread+0x41/0x4a
Jul 3 07:32:50 buml kernel: 6eaadf58: [] nfsd+0x0/0x29b [nfsd]
Jul 3 07:32:50 buml kernel: 6eaadf98: [] run_kernel_thread+0x28/0x4a
Jul 3 07:32:50 buml kernel: 6eaadfc8: [] new_thread_handler+0x72/0x9c
Jul 3 07:32:50 buml kernel:
Jul 3 07:32:50 buml kernel: ---[ end trace 2426dd7cb2fba3bf ]---Bruce Fields suggested this (Thanks!):
maybe we need to be doing a mnt_want_write on open_upgrade and mnt_put_write on downgrade?This patch adds a call to mnt_want_write and file_take_write (which is
doing the actual work).The counter-calls mnt_drop_write a file_release_write are now being properly
called by drop_file_write_access in the exact path printed by the warning
above.Signed-off-by: Benny Halevy
Signed-off-by: J. Bruce Fields -
It's not immediately obvious from the code why we're doing this.
Signed-off-by: J. Bruce Fields
Cc: Benny Halevy
05 Jul, 2008
1 commit
-
In preparation for minorversion 1
All encoders now return an nfserr status (typically their
nfserr argument). Unsupported ops go through nfsd4_encode_operation
too, so use nfsd4_encode_noop to encode nothing for their reply body.Signed-off-by: Benny Halevy
Signed-off-by: J. Bruce Fields
04 Jul, 2008
1 commit
03 Jul, 2008
16 commits
-
Signed-off-by: Benny Halevy
Signed-off-by: J. Bruce Fields -
Change the WR context pool to be shared across mount points. This
reduces the RDMA transport memory footprint significantly since
idle mounts don't consume WR context memory.Signed-off-by: Tom Tucker
-
Create a kmem cache to hold WR contexts. Next we will convert
the WR context get and put services to use this kmem cache.Signed-off-by: Tom Tucker
-
Make certain all transports pending free are flushed from the wq
before unloading the module.Signed-off-by: Tom Tucker
-
When adapters have differing IRD limits, the RDMA transport will fail to
connect properly. The RDMA transport should use the client's advertised
inbound read limit when computing its outbound read limit. For iWARP
transports, there is currently no standard for exchanging IRD/ORD
during connection establishment so the 'responder_resources' field in the
connect event is the local device's limit. The RDMA transport can be
configured to use a smaller ORD by writing the desired number to the
/proc/sys/sunrpc/svc_rdma/max_outbound_read_requests file.Signed-off-by: Tom Tucker
-
The sc_read_wait queue head is no longer used. Remove it.
Signed-off-by: Tom Tucker
-
At the time __svc_rdma_free is called, we are guaranteed that all references
to this transport are gone. There is, therefore, no need to protect the
resource lists with a spin lock.Signed-off-by: Tom Tucker
-
Add a dma map count in order to verify that all DMA mapping resources
have been freed when the transport is closed.Signed-off-by: Tom Tucker
-
Separate DMA unmap from context destruction and perform DMA unmapping
in the SQ/RQ CQ reap functions. This is necessary to support software
based RDMA implementations that actually copy the data in their
ib_dma_unmap callback functions and architectures that don't have
cache coherent I/O busses.Signed-off-by: Tom Tucker
-
Modify the RDMA_READ processing to use the reply and chunk list mapping data
types. Also add a special purpose 'hdr_count' field in in the context to hold
the header page count instead of overloading the SGE length field and
corrupting the DMA map length.Signed-off-by: Tom Tucker
-
Use the new svc_rdma_req_map data type for mapping the client side memory
to the server side memory. Move the DMA mapping to the context pointed to
by each WR individually so that it is unmapped after the WR completes.Signed-off-by: Tom Tucker
-
Create a new data structure to hold the remote client address space
to local server address space mapping.Signed-off-by: Tom Tucker
-
Have separate vectors of operation decoders for each minorversion.
Obsolete ops in newer minorversions have default implementation returning
nfserr_opnotsupp.Signed-off-by: Benny Halevy
Signed-off-by: J. Bruce Fields -
nfserr_opnotsupp should be returned for unsupported nfs4 ops
rather than nfserr_op_illegal.Signed-off-by: J. Bruce Fields
-
In preparation for minorversion 1
Signed-off-by: Benny Halevy
Signed-off-by: J. Bruce Fields -
Check minorversion once before decoding any operation and reject with
nfserr_minor_vers_mismatch if != 0 (this still happens in nfsd4_proc_compound).
In this case return a zero length resultdata array as required by RFC3530.minorversion 1 processing will have its own vector of decoders.
Signed-off-by: Benny Halevy
Signed-off-by: J. Bruce Fields
02 Jul, 2008
1 commit
-
Multiple mnt_want_write() calls in the switch statement looks really
ugly.Signed-off-by: Miklos Szeredi
Acked-by: Christoph Hellwig
Signed-off-by: J. Bruce Fields
01 Jul, 2008
4 commits
-
knfsd currently uses 2 signal masks when processing requests. A "loose"
mask (SHUTDOWN_SIGS) that it uses when receiving network requests, and
then a more "strict" mask (ALLOWED_SIGS, which is just SIGKILL) that it
allows when doing the actual operation on the local storage.This is apparently unnecessarily complicated. The underlying filesystem
should be able to sanely handle a signal in the middle of an operation.
This patch removes the signal mask handling from knfsd altogether. When
knfsd is started as a kthread, all signals are ignored. It then allows
all of the signals in SHUTDOWN_SIGS. There's no need to set the mask
as well.Signed-off-by: Jeff Layton
Signed-off-by: J. Bruce Fields -
Wrap long lines.
Signed-off-by: J. Bruce Fields
-
Update the NFS/RDMA documentation to clarify how to run mount.nfs.
Signed-off-by: James Lentini
Signed-off-by: J. Bruce Fields -
Thanks to Frank Van Maarseveen for the original problem report: "A
privileged process on an NFS client which drops privileges after using
them to change the current working directory, will experience incorrect
EACCES after an NFS server reboot. This problem can also occur after
memory pressure on the server, particularly when the client side is
quiet for some time."This occurs because the filehandle points to a directory whose parents
are no longer in the dentry cache, and we're attempting to reconnect the
directory to its parents without adequate permissions to perform lookups
in the parent directories.We can therefore fix the problem by acquiring the necessary capabilities
before attempting the reconnection. We do this only in the
no_subtree_check case, since the documented behavior of the
subtree_check export option requires the server to check that the user
has lookup permissions on all parents.The subtree_check case still has a problem, since reconnect_path()
unnecessarily requires both read and lookup permissions on all parent
directories. However, a fix in that case would be more delicate, and
use of subtree_check is already discouraged for other reasons.Signed-off-by: Neil Brown
Cc: Frank van Maarseveen
Signed-off-by: J. Bruce Fields
30 Jun, 2008
12 commits
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: fix locking in force-feedback core
Input: add KEY_MEDIA_REPEAT definition -
…/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
debugobjects: fix lockdep warning -
…l/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched: fix cpu hotplug -
…git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
ptrace GET/SET FPXREGS broken
x86: fix cpu hotplug crash
x86: section/warning fixes
x86: shift bits the right way in native_read_tscp -
The newly added event_lock spinlock in the input core disallows sleeping
and therefore using mutexes in event handlers. Convert force-feedback
core to rely on event_lock instead of mutex to protect slots allocated
for fore-feedback effects. The original mutex is still used to serialize
uploading and erasing of effects.Reported-by: Anssi Hannula
Signed-off-by: Dmitry Torokhov -
This patch adds the Repeat key to the input layer. The usage
in the HUT is 0xBC (listed under "15.7 Transport Controls").Signed-off-by: Dmitry Torokhov
-
When I update kernel 2.6.25 from 2.6.24, gdb does not work.
On 2.6.25, ptrace(PTRACE_GETFPXREGS, ...) returns ENODEV.But 2.6.24 kernel's ptrace() returns EIO.
It is issue of compatibility.I attached test program as pt.c and patch for fix it.
#include
#include
#include
#include
#include
#include
#includestruct user_fxsr_struct {
unsigned short cwd;
unsigned short swd;
unsigned short twd;
unsigned short fop;
long fip;
long fcs;
long foo;
long fos;
long mxcsr;
long reserved;
long st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
long xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */
long padding[56];
};int main(void)
{
pid_t pid;pid = fork();
switch(pid){
case -1:/* error */
break;
case 0:/* child */
child();
break;
default:
parent(pid);
break;
}
return 0;
}int child(void)
{
ptrace(PTRACE_TRACEME);
kill(getpid(), SIGSTOP);
sleep(10);
return 0;
}
int parent(pid_t pid)
{
int ret;
struct user_fxsr_struct fpxregs;ret = ptrace(PTRACE_GETFPXREGS, pid, 0, &fpxregs);
if(ret < 0){
printf("%d: %s.\n", errno, strerror(errno));
}
kill(pid, SIGCONT);
wait(pid);
return 0;
}/* in the kerel, at kernel/i387.c get_fpxregs() */
Signed-off-by: Ingo Molnar
-
Vegard Nossum reported crashes during cpu hotplug tests:
http://marc.info/?l=linux-kernel&m=121413950227884&w=4
In function _cpu_up, the panic happens when calling
__raw_notifier_call_chain at the second time. Kernel doesn't panic when
calling it at the first time. If just say because of nr_cpu_ids, that's
not right.By checking the source code, I found that function do_boot_cpu is the culprit.
Consider below call chain:
_cpu_up=>__cpu_up=>smp_ops.cpu_up=>native_cpu_up=>do_boot_cpu.So do_boot_cpu is called in the end. In do_boot_cpu, if
boot_error==true, cpu_clear(cpu, cpu_possible_map) is executed. So later
on, when _cpu_up calls __raw_notifier_call_chain at the second time to
report CPU_UP_CANCELED, because this cpu is already cleared from
cpu_possible_map, get_cpu_sysdev returns NULL.Many resources are related to cpu_possible_map, so it's better not to
change it.Below patch against 2.6.26-rc7 fixes it by removing the bit clearing in
cpu_possible_map.Signed-off-by: Zhang Yanmin
Tested-by: Vegard Nossum
Acked-by: Rusty Russell
Signed-off-by: Ingo Molnar -
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (42 commits)
V4L/DVB (8108): Fix open/close race in saa7134
V4L/DVB (8100): V4L/vivi: fix possible memory leak in vivi_fillbuff
V4L/DVB (8097): xc5000: check device hardware state to determine if firmware download is needed
V4L/DVB (8096): au8522: prevent false-positive lock status
V4L/DVB (8092): videodev: simplify and fix standard enumeration
V4L/DVB (8075): stv0299: Uncorrected block count and bit error rate fixed
V4L/DVB (8074): av7110: OSD transfers should not be interrupted
V4L/DVB (8073): av7110: Catch another type of ARM crash
V4L/DVB (8071): tda10023: Fix possible kernel oops during initialisation
V4L/DVB (8069): cx18: Fix S-Video and Compsite inputs for the Yuan MPC718 and enable card entry
V4L/DVB (8068): cx18: Add I2C slave reset via GPIO upon initialization
V4L/DVB (8067): cx18: Fix firmware load for case when digital capture happens first
V4L/DVB (8066): cx18: Fix audio mux input definitions for HVR-1600 Line In 2 and FM radio
V4L/DVB (8063): cx18: Fix unintended auto configurations in cx18-av-core
V4L/DVB (8061): cx18: only select tuner / frontend modules if !DVB_FE_CUSTOMISE
V4L/DVB (8048): saa7134: Fix entries for Avermedia A16d and Avermedia E506
V4L/DVB (8044): au8522: tuning optimizations
V4L/DVB (8043): au0828: add support for additional USB device id's
V4L/DVB (8042): DVB-USB UMT-010 channel scan oops
V4L/DVB (8040): soc-camera: remove soc_camera_host_class class
... -
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled.
ACPI: don't walk tables if ACPI was disabled
thermal: Create CONFIG_THERMAL_HWMON=n -
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
kbuild: fix a.out.h export to userspace with O= build. -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
firewire: fw-sbp2: fix parsing of logical unit directories