Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101978
b: refs/heads/master
c: 26d4686
h: refs/heads/master
v: v3
  • Loading branch information
Zhang Rui authored and Andi Kleen committed Jul 16, 2008
1 parent 0f21a46 commit 0fb0ca6
Show file tree
Hide file tree
Showing 42 changed files with 1,278 additions and 1,972 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d442cc44c0db56e84ef6aa244a88427d2efe06cd
refs/heads/master: 26d46867b7d27f68a446b073dac7817721ae4c8f
56 changes: 32 additions & 24 deletions trunk/drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/acpi.h>
#include <asm/signal.h>

#include <acpi/acpi_drivers.h>
#include <acpi/acinterp.h> /* for acpi_ex_eisa_id_to_string() */
Expand Down Expand Up @@ -92,17 +93,37 @@ acpi_device_modalias_show(struct device *dev, struct device_attribute *attr, cha
}
static DEVICE_ATTR(modalias, 0444, acpi_device_modalias_show, NULL);

static int acpi_eject_operation(acpi_handle handle, int lockable)
static int acpi_bus_hot_remove_device(void *context)
{
struct acpi_device *device;
acpi_handle handle = context;
struct acpi_object_list arg_list;
union acpi_object arg;
acpi_status status = AE_OK;

/*
* TBD: evaluate _PS3?
*/
if (acpi_bus_get_device(handle, &device))
return 0;

if (lockable) {
if (!device)
return 0;

ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Hot-removing device %s...\n", device->dev.bus_id));


if (acpi_bus_trim(device, 1)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Removing device failed\n"));
return -1;
}

/* power off device */
status = acpi_evaluate_object(handle, "_PS3", NULL, NULL);
if (ACPI_FAILURE(status) && status != AE_NOT_FOUND)
ACPI_DEBUG_PRINT((ACPI_DB_WARN,
"Power-off device failed\n"));

if (device->flags.lockable) {
arg_list.count = 1;
arg_list.pointer = &arg;
arg.type = ACPI_TYPE_INTEGER;
Expand All @@ -118,24 +139,19 @@ static int acpi_eject_operation(acpi_handle handle, int lockable)
/*
* TBD: _EJD support.
*/

status = acpi_evaluate_object(handle, "_EJ0", &arg_list, NULL);
if (ACPI_FAILURE(status)) {
return (-ENODEV);
}
if (ACPI_FAILURE(status))
return -ENODEV;

return (0);
return 0;
}

static ssize_t
acpi_eject_store(struct device *d, struct device_attribute *attr,
const char *buf, size_t count)
{
int result;
int ret = count;
int islockable;
acpi_status status;
acpi_handle handle;
acpi_object_type type = 0;
struct acpi_device *acpi_device = to_acpi_device(d);

Expand All @@ -154,17 +170,9 @@ acpi_eject_store(struct device *d, struct device_attribute *attr,
goto err;
}

islockable = acpi_device->flags.lockable;
handle = acpi_device->handle;

result = acpi_bus_trim(acpi_device, 1);

if (!result)
result = acpi_eject_operation(handle, islockable);

if (result) {
ret = -EBUSY;
}
/* remove the device in another thread to fix the deadlock issue */
ret = kernel_thread(acpi_bus_hot_remove_device,
acpi_device->handle, SIGCHLD);
err:
return ret;
}
Expand Down
136 changes: 79 additions & 57 deletions trunk/fs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1544,6 +1544,10 @@ config UFS_FS
The recently released UFS2 variant (used in FreeBSD 5.x) is
READ-ONLY supported.

If you only intend to mount files from some other Unix over the
network using NFS, you don't need the UFS file system support (but
you need NFS file system support obviously).

Note that this option is generally not needed for floppies, since a
good portable way to transport files and directories between unixes
(and even other operating systems) is given by the tar program ("man
Expand Down Expand Up @@ -1583,7 +1587,6 @@ menuconfig NETWORK_FILESYSTEMS
Say Y here to get to see options for network filesystems and
filesystem-related networking code, such as NFS daemon and
RPCSEC security modules.

This option alone does not add any kernel code.

If you say N, all options in this submenu will be skipped and
Expand All @@ -1592,92 +1595,76 @@ menuconfig NETWORK_FILESYSTEMS
if NETWORK_FILESYSTEMS

config NFS_FS
tristate "NFS client support"
tristate "NFS file system support"
depends on INET
select LOCKD
select SUNRPC
select NFS_ACL_SUPPORT if NFS_V3_ACL
help
Choose Y here if you want to access files residing on other
computers using Sun's Network File System protocol. To compile
this file system support as a module, choose M here: the module
will be called nfs.
If you are connected to some other (usually local) Unix computer
(using SLIP, PLIP, PPP or Ethernet) and want to mount files residing
on that computer (the NFS server) using the Network File Sharing
protocol, say Y. "Mounting files" means that the client can access
the files with usual UNIX commands as if they were sitting on the
client's hard disk. For this to work, the server must run the
programs nfsd and mountd (but does not need to have NFS file system
support enabled in its kernel). NFS is explained in the Network
Administrator's Guide, available from
<http://www.tldp.org/docs.html#guide>, on its man page: "man
nfs", and in the NFS-HOWTO.

To mount file systems exported by NFS servers, you also need to
install the user space mount.nfs command which can be found in
the Linux nfs-utils package, available from http://linux-nfs.org/.
Information about using the mount command is available in the
mount(8) man page. More detail about the Linux NFS client
implementation is available via the nfs(5) man page.
A superior but less widely used alternative to NFS is provided by
the Coda file system; see "Coda file system support" below.

Below you can choose which versions of the NFS protocol are
available in the kernel to mount NFS servers. Support for NFS
version 2 (RFC 1094) is always available when NFS_FS is selected.
If you say Y here, you should have said Y to TCP/IP networking also.
This option would enlarge your kernel by about 27 KB.

To configure a system which mounts its root file system via NFS
at boot time, say Y here, select "Kernel level IP
autoconfiguration" in the NETWORK menu, and select "Root file
system on NFS" below. You cannot compile this file system as a
module in this case.
To compile this file system support as a module, choose M here: the
module will be called nfs.

If unsure, say N.
If you are configuring a diskless machine which will mount its root
file system over NFS at boot time, say Y here and to "Kernel
level IP autoconfiguration" above and to "Root file system on NFS"
below. You cannot compile this driver as a module in this case.
There are two packages designed for booting diskless machines over
the net: netboot, available from
<http://ftp1.sourceforge.net/netboot/>, and Etherboot,
available from <http://ftp1.sourceforge.net/etherboot/>.

If you don't know what all this is about, say N.

config NFS_V3
bool "NFS client support for NFS version 3"
bool "Provide NFSv3 client support"
depends on NFS_FS
help
This option enables support for version 3 of the NFS protocol
(RFC 1813) in the kernel's NFS client.
Say Y here if you want your NFS client to be able to speak version
3 of the NFS protocol.

If unsure, say Y.

config NFS_V3_ACL
bool "NFS client support for the NFSv3 ACL protocol extension"
bool "Provide client support for the NFSv3 ACL protocol extension"
depends on NFS_V3
help
Some NFS servers support an auxiliary NFSv3 ACL protocol that
Sun added to Solaris but never became an official part of the
NFS version 3 protocol. This protocol extension allows
applications on NFS clients to manipulate POSIX Access Control
Lists on files residing on NFS servers. NFS servers enforce
ACLs on local files whether this protocol is available or not.

Choose Y here if your NFS server supports the Solaris NFSv3 ACL
protocol extension and you want your NFS client to allow
applications to access and modify ACLs on files on the server.

Most NFS servers don't support the Solaris NFSv3 ACL protocol
extension. You can choose N here or specify the "noacl" mount
option to prevent your NFS client from trying to use the NFSv3
ACL protocol.
Implement the NFSv3 ACL protocol extension for manipulating POSIX
Access Control Lists. The server should also be compiled with
the NFSv3 ACL protocol extension; see the CONFIG_NFSD_V3_ACL option.

If unsure, say N.

config NFS_V4
bool "NFS client support for NFS version 4 (EXPERIMENTAL)"
bool "Provide NFSv4 client support (EXPERIMENTAL)"
depends on NFS_FS && EXPERIMENTAL
select RPCSEC_GSS_KRB5
help
This option enables support for version 4 of the NFS protocol
(RFC 3530) in the kernel's NFS client.
Say Y here if you want your NFS client to be able to speak the newer
version 4 of the NFS protocol.

To mount NFS servers using NFSv4, you also need to install user
space programs which can be found in the Linux nfs-utils package,
available from http://linux-nfs.org/.
Note: Requires auxiliary userspace daemons which may be found on
http://www.citi.umich.edu/projects/nfsv4/

If unsure, say N.

config ROOT_NFS
bool "Root file system on NFS"
depends on NFS_FS=y && IP_PNP
help
If you want your system to mount its root file system via NFS,
choose Y here. This is common practice for managing systems
without local permanent storage. For details, read
<file:Documentation/filesystems/nfsroot.txt>.

Most people say N here.

config NFSD
tristate "NFS server support"
depends on INET
Expand Down Expand Up @@ -1759,6 +1746,20 @@ config NFSD_V4

If unsure, say N.

config ROOT_NFS
bool "Root file system on NFS"
depends on NFS_FS=y && IP_PNP
help
If you want your Linux box to mount its whole root file system (the
one containing the directory /) from some other computer over the
net via NFS (presumably because your box doesn't have a hard disk),
say Y. Read <file:Documentation/filesystems/nfsroot.txt> for
details. It is likely that in this case, you also want to say Y to
"Kernel level IP autoconfiguration" so that your box can discover
its network address at boot time.

Most people say N here.

config LOCKD
tristate

Expand Down Expand Up @@ -1799,6 +1800,27 @@ config SUNRPC_XPRT_RDMA

If unsure, say N.

config SUNRPC_BIND34
bool "Support for rpcbind versions 3 & 4 (EXPERIMENTAL)"
depends on SUNRPC && EXPERIMENTAL
default n
help
RPC requests over IPv6 networks require support for larger
addresses when performing an RPC bind. Sun added support for
IPv6 addressing by creating two new versions of the rpcbind
protocol (RFC 1833).

This option enables support in the kernel RPC client for
querying rpcbind servers via versions 3 and 4 of the rpcbind
protocol. The kernel automatically falls back to version 2
if a remote rpcbind service does not support versions 3 or 4.
By themselves, these new versions do not provide support for
RPC over IPv6, but the new protocol versions are necessary to
support it.

If unsure, say N to get traditional behavior (version 2 rpcbind
requests only).

config RPCSEC_GSS_KRB5
tristate "Secure RPC: Kerberos V mechanism (EXPERIMENTAL)"
depends on SUNRPC && EXPERIMENTAL
Expand Down
8 changes: 1 addition & 7 deletions trunk/fs/lockd/clntproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,7 @@ void nlm_release_call(struct nlm_rqst *call)

static void nlmclnt_rpc_release(void *data)
{
lock_kernel();
nlm_release_call(data);
unlock_kernel();
}

static int nlm_wait_on_grace(wait_queue_head_t *queue)
Expand Down Expand Up @@ -432,7 +430,7 @@ nlmclnt_test(struct nlm_rqst *req, struct file_lock *fl)
* Report the conflicting lock back to the application.
*/
fl->fl_start = req->a_res.lock.fl.fl_start;
fl->fl_end = req->a_res.lock.fl.fl_end;
fl->fl_end = req->a_res.lock.fl.fl_start;
fl->fl_type = req->a_res.lock.fl.fl_type;
fl->fl_pid = 0;
break;
Expand Down Expand Up @@ -712,9 +710,7 @@ static void nlmclnt_unlock_callback(struct rpc_task *task, void *data)
die:
return;
retry_rebind:
lock_kernel();
nlm_rebind_host(req->a_host);
unlock_kernel();
retry_unlock:
rpc_restart_call(task);
}
Expand Down Expand Up @@ -792,9 +788,7 @@ static void nlmclnt_cancel_callback(struct rpc_task *task, void *data)
/* Don't ever retry more than 3 times */
if (req->a_retries++ >= NLMCLNT_MAX_RETRIES)
goto die;
lock_kernel();
nlm_rebind_host(req->a_host);
unlock_kernel();
rpc_restart_call(task);
rpc_delay(task, 30 * HZ);
}
Expand Down
2 changes: 0 additions & 2 deletions trunk/fs/lockd/svc4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,7 @@ static void nlm4svc_callback_exit(struct rpc_task *task, void *data)

static void nlm4svc_callback_release(void *data)
{
lock_kernel();
nlm_release_call(data);
unlock_kernel();
}

static const struct rpc_call_ops nlm4svc_callback_ops = {
Expand Down
7 changes: 1 addition & 6 deletions trunk/fs/lockd/svclock.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,6 @@ static void nlmsvc_grant_callback(struct rpc_task *task, void *data)

dprintk("lockd: GRANT_MSG RPC callback\n");

lock_kernel();
/* if the block is not on a list at this point then it has
* been invalidated. Don't try to requeue it.
*
Expand All @@ -805,7 +804,7 @@ static void nlmsvc_grant_callback(struct rpc_task *task, void *data)
* for nlm_blocked?
*/
if (list_empty(&block->b_list))
goto out;
return;

/* Technically, we should down the file semaphore here. Since we
* move the block towards the head of the queue only, no harm
Expand All @@ -819,17 +818,13 @@ static void nlmsvc_grant_callback(struct rpc_task *task, void *data)
}
nlmsvc_insert_block(block, timeout);
svc_wake_up(block->b_daemon);
out:
unlock_kernel();
}

static void nlmsvc_grant_release(void *data)
{
struct nlm_rqst *call = data;

lock_kernel();
nlmsvc_release_block(call->a_block);
unlock_kernel();
}

static const struct rpc_call_ops nlmsvc_grant_ops = {
Expand Down
2 changes: 0 additions & 2 deletions trunk/fs/lockd/svcproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,7 @@ static void nlmsvc_callback_exit(struct rpc_task *task, void *data)

static void nlmsvc_callback_release(void *data)
{
lock_kernel();
nlm_release_call(data);
unlock_kernel();
}

static const struct rpc_call_ops nlmsvc_callback_ops = {
Expand Down
Loading

0 comments on commit 0fb0ca6

Please sign in to comment.