Skip to content

Commit

Permalink
Merge nfs containerization work from Trond's tree
Browse files Browse the repository at this point in the history
The nfs containerization work is a prerequisite for Jeff Layton's reboot
recovery rework.
J. Bruce Fields committed Mar 26, 2012
2 parents ab4684d + 5a7c9ee commit 1df0064
Showing 229 changed files with 6,039 additions and 3,788 deletions.
12 changes: 10 additions & 2 deletions Documentation/DocBook/device-drivers.tmpl
Original file line number Diff line number Diff line change
@@ -102,9 +102,12 @@ X!Iinclude/linux/kobject.h
!Iinclude/linux/device.h
</sect1>
<sect1><title>Device Drivers Base</title>
!Idrivers/base/init.c
!Edrivers/base/driver.c
!Edrivers/base/core.c
!Edrivers/base/syscore.c
!Edrivers/base/class.c
!Idrivers/base/node.c
!Edrivers/base/firmware_class.c
!Edrivers/base/transport_class.c
<!-- Cannot be included, because
@@ -113,13 +116,18 @@ X!Iinclude/linux/kobject.h
exceed allowed 44 characters maximum
X!Edrivers/base/attribute_container.c
-->
!Edrivers/base/sys.c
!Edrivers/base/dd.c
<!--
X!Edrivers/base/interface.c
-->
!Iinclude/linux/platform_device.h
!Edrivers/base/platform.c
!Edrivers/base/bus.c
</sect1>
<sect1><title>Device Drivers DMA Management</title>
!Edrivers/base/dma-buf.c
!Edrivers/base/dma-coherent.c
!Edrivers/base/dma-mapping.c
</sect1>
<sect1><title>Device Drivers Power Management</title>
!Edrivers/base/power/main.c
@@ -219,7 +227,7 @@ X!Isound/sound_firmware.c
<chapter id="uart16x50">
<title>16x50 UART Driver</title>
!Edrivers/tty/serial/serial_core.c
!Edrivers/tty/serial/8250.c
!Edrivers/tty/serial/8250/8250.c
</chapter>

<chapter id="fbdev">
20 changes: 14 additions & 6 deletions Documentation/filesystems/nfs/idmapper.txt
Original file line number Diff line number Diff line change
@@ -4,13 +4,21 @@ ID Mapper
=========
Id mapper is used by NFS to translate user and group ids into names, and to
translate user and group names into ids. Part of this translation involves
performing an upcall to userspace to request the information. Id mapper will
user request-key to perform this upcall and cache the result. The program
/usr/sbin/nfs.idmap should be called by request-key, and will perform the
translation and initialize a key with the resulting information.
performing an upcall to userspace to request the information. There are two
ways NFS could obtain this information: placing a call to /sbin/request-key
or by placing a call to the rpc.idmap daemon.

NFS will attempt to call /sbin/request-key first. If this succeeds, the
result will be cached using the generic request-key cache. This call should
only fail if /etc/request-key.conf is not configured for the id_resolver key
type, see the "Configuring" section below if you wish to use the request-key
method.

If the call to /sbin/request-key fails (if /etc/request-key.conf is not
configured with the id_resolver key type), then the idmapper will ask the
legacy rpc.idmap daemon for the id mapping. This result will be stored
in a custom NFS idmap cache.

NFS_USE_NEW_IDMAPPER must be selected when configuring the kernel to use this
feature.

===========
Configuring
54 changes: 54 additions & 0 deletions Documentation/filesystems/nfs/pnfs.txt
Original file line number Diff line number Diff line change
@@ -53,3 +53,57 @@ lseg maintains an extra reference corresponding to the NFS_LSEG_VALID
bit which holds it in the pnfs_layout_hdr's list. When the final lseg
is removed from the pnfs_layout_hdr's list, the NFS_LAYOUT_DESTROYED
bit is set, preventing any new lsegs from being added.

layout drivers
--------------

PNFS utilizes what is called layout drivers. The STD defines 3 basic
layout types: "files" "objects" and "blocks". For each of these types
there is a layout-driver with a common function-vectors table which
are called by the nfs-client pnfs-core to implement the different layout
types.

Files-layout-driver code is in: fs/nfs/nfs4filelayout.c && nfs4filelayoutdev.c
Objects-layout-deriver code is in: fs/nfs/objlayout/.. directory
Blocks-layout-deriver code is in: fs/nfs/blocklayout/.. directory

objects-layout setup
--------------------

As part of the full STD implementation the objlayoutdriver.ko needs, at times,
to automatically login to yet undiscovered iscsi/osd devices. For this the
driver makes up-calles to a user-mode script called *osd_login*

The path_name of the script to use is by default:
/sbin/osd_login.
This name can be overridden by the Kernel module parameter:
objlayoutdriver.osd_login_prog

If Kernel does not find the osd_login_prog path it will zero it out
and will not attempt farther logins. An admin can then write new value
to the objlayoutdriver.osd_login_prog Kernel parameter to re-enable it.

The /sbin/osd_login is part of the nfs-utils package, and should usually
be installed on distributions that support this Kernel version.

The API to the login script is as follows:
Usage: $0 -u <URI> -o <OSDNAME> -s <SYSTEMID>
Options:
-u target uri e.g. iscsi://<ip>:<port>
(allways exists)
(More protocols can be defined in the future.
The client does not interpret this string it is
passed unchanged as recieved from the Server)
-o osdname of the requested target OSD
(Might be empty)
(A string which denotes the OSD name, there is a
limit of 64 chars on this string)
-s systemid of the requested target OSD
(Might be empty)
(This string, if not empty is always an hex
representation of the 20 bytes osd_system_id)

blocks-layout setup
-------------------

TODO: Document the setup needs of the blocks layout driver
23 changes: 23 additions & 0 deletions Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
@@ -1657,6 +1657,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
of returning the full 64-bit number.
The default is to return 64-bit inode numbers.

nfs.max_session_slots=
[NFSv4.1] Sets the maximum number of session slots
the client will attempt to negotiate with the server.
This limits the number of simultaneous RPC requests
that the client can send to the NFSv4.1 server.
Note that there is little point in setting this
value higher than the max_tcp_slot_table_limit.

nfs.nfs4_disable_idmapping=
[NFSv4] When set to the default of '1', this option
ensures that both the RPC level authentication
@@ -1670,6 +1678,21 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
back to using the idmapper.
To turn off this behaviour, set the value to '0'.

nfs.send_implementation_id =
[NFSv4.1] Send client implementation identification
information in exchange_id requests.
If zero, no implementation identification information
will be sent.
The default is to send the implementation identification
information.


objlayoutdriver.osd_login_prog=
[NFS] [OBJLAYOUT] sets the pathname to the program which
is used to automatically discover and login into new
osd-targets. Please see:
Documentation/filesystems/pnfs.txt for more explanations

nmi_debug= [KNL,AVR32,SH] Specify one or more actions to take
when a NMI is triggered.
Format: [state][,regs][,debounce][,die]
29 changes: 14 additions & 15 deletions MAINTAINERS
Original file line number Diff line number Diff line change
@@ -159,7 +159,7 @@ S: Maintained
F: drivers/net/ethernet/realtek/r8169.c

8250/16?50 (AND CLONE UARTS) SERIAL DRIVER
M: Greg Kroah-Hartman <gregkh@suse.de>
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
L: [email protected]
W: http://serial.sourceforge.net
S: Maintained
@@ -1783,9 +1783,9 @@ X: net/wireless/wext*

CHAR and MISC DRIVERS
M: Arnd Bergmann <[email protected]>
M: Greg Kroah-Hartman <[email protected]>
M: Greg Kroah-Hartman <[email protected]>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
S: Maintained
S: Supported
F: drivers/char/*
F: drivers/misc/*

@@ -2320,7 +2320,7 @@ F: lib/lru_cache.c
F: Documentation/blockdev/drbd/

DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
M: Greg Kroah-Hartman <gregkh@suse.de>
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6.git
S: Supported
F: Documentation/kobject.txt
@@ -6276,15 +6276,15 @@ S: Maintained
F: arch/alpha/kernel/srm_env.c

STABLE BRANCH
M: Greg Kroah-Hartman <[email protected]>
M: Greg Kroah-Hartman <[email protected]>
L: [email protected]
S: Maintained
S: Supported

STAGING SUBSYSTEM
M: Greg Kroah-Hartman <gregkh@suse.de>
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
L: [email protected]
S: Maintained
S: Supported
F: drivers/staging/

STAGING - AGERE HERMES II and II.5 WIRELESS DRIVERS
@@ -6669,8 +6669,8 @@ S: Maintained
K: ^Subject:.*(?i)trivial

TTY LAYER
M: Greg Kroah-Hartman <gregkh@suse.de>
S: Maintained
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6.git
F: drivers/tty/
F: drivers/tty/serial/serial_core.c
@@ -6958,7 +6958,7 @@ S: Maintained
F: drivers/usb/serial/digi_acceleport.c

USB SERIAL DRIVER
M: Greg Kroah-Hartman <gregkh@suse.de>
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
L: [email protected]
S: Supported
F: Documentation/usb/usb-serial.txt
@@ -6973,9 +6973,8 @@ S: Maintained
F: drivers/usb/serial/empeg.c

USB SERIAL KEYSPAN DRIVER
M: Greg Kroah-Hartman <[email protected]>
M: Greg Kroah-Hartman <[email protected]>
L: [email protected]
W: http://www.kroah.com/linux/
S: Maintained
F: drivers/usb/serial/*keyspan*

@@ -7003,7 +7002,7 @@ F: Documentation/video4linux/sn9c102.txt
F: drivers/media/video/sn9c102/

USB SUBSYSTEM
M: Greg Kroah-Hartman <gregkh@suse.de>
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
L: [email protected]
W: http://www.linux-usb.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6.git
@@ -7090,7 +7089,7 @@ F: fs/hppfs/

USERSPACE I/O (UIO)
M: "Hans J. Koch" <[email protected]>
M: Greg Kroah-Hartman <gregkh@suse.de>
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
S: Maintained
F: Documentation/DocBook/uio-howto.tmpl
F: drivers/uio/
21 changes: 1 addition & 20 deletions arch/microblaze/kernel/setup.c
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@
#include <linux/cache.h>
#include <linux/of_platform.h>
#include <linux/dma-mapping.h>
#include <linux/cpu.h>
#include <asm/cacheflush.h>
#include <asm/entry.h>
#include <asm/cpuinfo.h>
@@ -227,23 +226,5 @@ static int __init setup_bus_notifier(void)

return 0;
}
arch_initcall(setup_bus_notifier);

static DEFINE_PER_CPU(struct cpu, cpu_devices);

static int __init topology_init(void)
{
int i, ret;

for_each_present_cpu(i) {
struct cpu *c = &per_cpu(cpu_devices, i);

ret = register_cpu(c, i);
if (ret)
printk(KERN_WARNING "topology_init: register_cpu %d "
"failed (%d)\n", i, ret);
}

return 0;
}
subsys_initcall(topology_init);
arch_initcall(setup_bus_notifier);
1 change: 1 addition & 0 deletions arch/sparc/Kconfig
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@ config SPARC
config SPARC32
def_bool !64BIT
select GENERIC_ATOMIC64
select CLZ_TAB

config SPARC64
def_bool 64BIT
16 changes: 1 addition & 15 deletions arch/sparc/lib/divdi3.S
Original file line number Diff line number Diff line change
@@ -17,23 +17,9 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */

.data
.align 8
.globl __clz_tab
__clz_tab:
.byte 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5
.byte 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6
.byte 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
.byte 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7
.byte 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
.byte 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
.byte 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
.byte 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
.size __clz_tab,256
.global .udiv

.text
.align 4
.global .udiv
.globl __divdi3
__divdi3:
save %sp,-104,%sp
6 changes: 3 additions & 3 deletions arch/x86/include/asm/cmpxchg.h
Original file line number Diff line number Diff line change
@@ -145,13 +145,13 @@ extern void __add_wrong_size(void)

#ifdef __HAVE_ARCH_CMPXCHG
#define cmpxchg(ptr, old, new) \
__cmpxchg((ptr), (old), (new), sizeof(*ptr))
__cmpxchg(ptr, old, new, sizeof(*(ptr)))

#define sync_cmpxchg(ptr, old, new) \
__sync_cmpxchg((ptr), (old), (new), sizeof(*ptr))
__sync_cmpxchg(ptr, old, new, sizeof(*(ptr)))

#define cmpxchg_local(ptr, old, new) \
__cmpxchg_local((ptr), (old), (new), sizeof(*ptr))
__cmpxchg_local(ptr, old, new, sizeof(*(ptr)))
#endif

/*
3 changes: 2 additions & 1 deletion arch/x86/kernel/dumpstack.c
Original file line number Diff line number Diff line change
@@ -252,7 +252,8 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
unsigned short ss;
unsigned long sp;
#endif
printk(KERN_EMERG "%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter);
printk(KERN_DEFAULT
"%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter);
#ifdef CONFIG_PREEMPT
printk("PREEMPT ");
#endif
8 changes: 4 additions & 4 deletions arch/x86/kernel/dumpstack_64.c
Original file line number Diff line number Diff line change
@@ -129,7 +129,7 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
if (!stack) {
if (regs)
stack = (unsigned long *)regs->sp;
else if (task && task != current)
else if (task != current)
stack = (unsigned long *)task->thread.sp;
else
stack = &dummy;
@@ -269,11 +269,11 @@ void show_registers(struct pt_regs *regs)
unsigned char c;
u8 *ip;

printk(KERN_EMERG "Stack:\n");
printk(KERN_DEFAULT "Stack:\n");
show_stack_log_lvl(NULL, regs, (unsigned long *)sp,
0, KERN_EMERG);
0, KERN_DEFAULT);

printk(KERN_EMERG "Code: ");
printk(KERN_DEFAULT "Code: ");

ip = (u8 *)regs->ip - code_prologue;
if (ip < (u8 *)PAGE_OFFSET || probe_kernel_address(ip, c)) {
Loading

0 comments on commit 1df0064

Please sign in to comment.