Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92982
b: refs/heads/master
c: dd0e101
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Apr 25, 2008
1 parent efbd031 commit 2062b14
Show file tree
Hide file tree
Showing 13 changed files with 197 additions and 64 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: 00c6b2d5d7b2414bd46c620d6a8c37fa7a716f29
refs/heads/master: dd0e101d630b0d7ed6c9e1ccf7af7fc91818330e
30 changes: 19 additions & 11 deletions trunk/Documentation/HOWTO
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,11 @@ process is as follows:
release a new -rc kernel every week.
- Process continues until the kernel is considered "ready", the
process should last around 6 weeks.
- A list of known regressions present in each -rc release is
tracked at the following URI:
http://kernelnewbies.org/known_regressions
- Known regressions in each release are periodically posted to the
linux-kernel mailing list. The goal is to reduce the length of
that list to zero before declaring the kernel to be "ready," but, in
the real world, a small number of regressions often remain at
release time.

It is worth mentioning what Andrew Morton wrote on the linux-kernel
mailing list about kernel releases:
Expand All @@ -261,7 +263,7 @@ mailing list about kernel releases:

2.6.x.y -stable kernel tree
---------------------------
Kernels with 4 digit versions are -stable kernels. They contain
Kernels with 4-part versions are -stable kernels. They contain
relatively small and critical fixes for security problems or significant
regressions discovered in a given 2.6.x kernel.

Expand All @@ -273,7 +275,10 @@ If no 2.6.x.y kernel is available, then the highest numbered 2.6.x
kernel is the current stable kernel.

2.6.x.y are maintained by the "stable" team <stable@kernel.org>, and are
released almost every other week.
released as needs dictate. The normal release period is approximately
two weeks, but it can be longer if there are no pressing problems. A
security-related problem, instead, can cause a release to happen almost
instantly.

The file Documentation/stable_kernel_rules.txt in the kernel tree
documents what kinds of changes are acceptable for the -stable tree, and
Expand All @@ -298,7 +303,9 @@ a while Andrew or the subsystem maintainer pushes it on to Linus for
inclusion in mainline.

It is heavily encouraged that all new patches get tested in the -mm tree
before they are sent to Linus for inclusion in the main kernel tree.
before they are sent to Linus for inclusion in the main kernel tree. Code
which does not make an appearance in -mm before the opening of the merge
window will prove hard to merge into the mainline.

These kernels are not appropriate for use on systems that are supposed
to be stable and they are more risky to run than any of the other
Expand Down Expand Up @@ -354,11 +361,12 @@ Here is a list of some of the different kernel trees available:
- SCSI, James Bottomley <James.Bottomley@SteelEye.com>
git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git

- x86, Ingo Molnar <mingo@elte.hu>
git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git

quilt trees:
- USB, PCI, Driver Core, and I2C, Greg Kroah-Hartman <gregkh@suse.de>
- USB, Driver Core, and I2C, Greg Kroah-Hartman <gregkh@suse.de>
kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
- x86-64, partly i386, Andi Kleen <ak@suse.de>
ftp.firstfloor.org:/pub/ak/x86_64/quilt/

Other kernel trees can be found listed at http://git.kernel.org/ and in
the MAINTAINERS file.
Expand Down Expand Up @@ -392,8 +400,8 @@ If you want to be advised of the future bug reports, you can subscribe to the
bugme-new mailing list (only new bug reports are mailed here) or to the
bugme-janitor mailing list (every change in the bugzilla is mailed here)

http://lists.osdl.org/mailman/listinfo/bugme-new
http://lists.osdl.org/mailman/listinfo/bugme-janitors
http://lists.linux-foundation.org/mailman/listinfo/bugme-new
http://lists.linux-foundation.org/mailman/listinfo/bugme-janitors



Expand Down
14 changes: 9 additions & 5 deletions trunk/Documentation/filesystems/nfs-rdma.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
################################################################################

Author: NetApp and Open Grid Computing
Date: February 25, 2008
Date: April 15, 2008

Table of Contents
~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -197,12 +197,16 @@ NFS/RDMA Setup
- On the server system, configure the /etc/exports file and
start the NFS/RDMA server.

Exports entries with the following format have been tested:
Exports entries with the following formats have been tested:

/vol0 10.97.103.47(rw,async) 192.168.0.47(rw,async,insecure,no_root_squash)
/vol0 192.168.0.47(fsid=0,rw,async,insecure,no_root_squash)
/vol0 192.168.0.0/255.255.255.0(fsid=0,rw,async,insecure,no_root_squash)

Here the first IP address is the client's Ethernet address and the second
IP address is the clients IPoIB address.
The IP address(es) is(are) the client's IPoIB address for an InfiniBand HCA or the
cleint's iWARP address(es) for an RNIC.

NOTE: The "insecure" option must be used because the NFS/RDMA client does not
use a reserved port.

Each time a machine boots:

Expand Down
19 changes: 15 additions & 4 deletions trunk/Documentation/filesystems/seq_file.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ stop() is the place to free it.
}

Finally, the show() function should format the object currently pointed to
by the iterator for output. It should return zero, or an error code if
something goes wrong. The example module's show() function is:
by the iterator for output. The example module's show() function is:

static int ct_seq_show(struct seq_file *s, void *v)
{
Expand All @@ -132,6 +131,12 @@ something goes wrong. The example module's show() function is:
return 0;
}

If all is well, the show() function should return zero. A negative error
code in the usual manner indicates that something went wrong; it will be
passed back to user space. This function can also return SEQ_SKIP, which
causes the current item to be skipped; if the show() function has already
generated output before returning SEQ_SKIP, that output will be dropped.

We will look at seq_printf() in a moment. But first, the definition of the
seq_file iterator is finished by creating a seq_operations structure with
the four functions we have just defined:
Expand Down Expand Up @@ -182,12 +187,18 @@ The first two output a single character and a string, just like one would
expect. seq_escape() is like seq_puts(), except that any character in s
which is in the string esc will be represented in octal form in the output.

There is also a function for printing filenames:
There is also a pair of functions for printing filenames:

int seq_path(struct seq_file *m, struct path *path, char *esc);
int seq_path_root(struct seq_file *m, struct path *path,
struct path *root, char *esc)

Here, path indicates the file of interest, and esc is a set of characters
which should be escaped in the output.
which should be escaped in the output. A call to seq_path() will output
the path relative to the current process's filesystem root. If a different
root is desired, it can be used with seq_path_root(). Note that, if it
turns out that path cannot be reached from root, the value of root will be
changed in seq_file_root() to a root which *does* work.


Making it all work
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/lockd/svclock.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ nlmsvc_update_deferred_block(struct nlm_block *block, struct file_lock *conf,
block->b_flags |= B_TIMED_OUT;
if (conf) {
if (block->b_fl)
locks_copy_lock(block->b_fl, conf);
__locks_copy_lock(block->b_fl, conf);
}
}

Expand Down
69 changes: 61 additions & 8 deletions trunk/fs/lockd/svcsubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include <linux/lockd/lockd.h>
#include <linux/lockd/share.h>
#include <linux/lockd/sm_inter.h>
#include <linux/module.h>
#include <linux/mount.h>

#define NLMDBG_FACILITY NLMDBG_SVCSUBS

Expand Down Expand Up @@ -194,6 +196,12 @@ nlm_traverse_locks(struct nlm_host *host, struct nlm_file *file,
return 0;
}

static int
nlmsvc_always_match(void *dummy1, struct nlm_host *dummy2)
{
return 1;
}

/*
* Inspect a single file
*/
Expand Down Expand Up @@ -230,7 +238,8 @@ nlm_file_inuse(struct nlm_file *file)
* Loop over all files in the file table.
*/
static int
nlm_traverse_files(struct nlm_host *host, nlm_host_match_fn_t match)
nlm_traverse_files(void *data, nlm_host_match_fn_t match,
int (*is_failover_file)(void *data, struct nlm_file *file))
{
struct hlist_node *pos, *next;
struct nlm_file *file;
Expand All @@ -239,12 +248,14 @@ nlm_traverse_files(struct nlm_host *host, nlm_host_match_fn_t match)
mutex_lock(&nlm_file_mutex);
for (i = 0; i < FILE_NRHASH; i++) {
hlist_for_each_entry_safe(file, pos, next, &nlm_files[i], f_list) {
if (is_failover_file && !is_failover_file(data, file))
continue;
file->f_count++;
mutex_unlock(&nlm_file_mutex);

/* Traverse locks, blocks and shares of this file
* and update file->f_locks count */
if (nlm_inspect_file(host, file, match))
if (nlm_inspect_file(data, file, match))
ret = 1;

mutex_lock(&nlm_file_mutex);
Expand Down Expand Up @@ -303,21 +314,27 @@ nlm_release_file(struct nlm_file *file)
* Used by nlmsvc_invalidate_all
*/
static int
nlmsvc_mark_host(struct nlm_host *host, struct nlm_host *dummy)
nlmsvc_mark_host(void *data, struct nlm_host *dummy)
{
struct nlm_host *host = data;

host->h_inuse = 1;
return 0;
}

static int
nlmsvc_same_host(struct nlm_host *host, struct nlm_host *other)
nlmsvc_same_host(void *data, struct nlm_host *other)
{
struct nlm_host *host = data;

return host == other;
}

static int
nlmsvc_is_client(struct nlm_host *host, struct nlm_host *dummy)
nlmsvc_is_client(void *data, struct nlm_host *dummy)
{
struct nlm_host *host = data;

if (host->h_server) {
/* we are destroying locks even though the client
* hasn't asked us too, so don't unmonitor the
Expand All @@ -337,7 +354,7 @@ void
nlmsvc_mark_resources(void)
{
dprintk("lockd: nlmsvc_mark_resources\n");
nlm_traverse_files(NULL, nlmsvc_mark_host);
nlm_traverse_files(NULL, nlmsvc_mark_host, NULL);
}

/*
Expand All @@ -348,7 +365,7 @@ nlmsvc_free_host_resources(struct nlm_host *host)
{
dprintk("lockd: nlmsvc_free_host_resources\n");

if (nlm_traverse_files(host, nlmsvc_same_host)) {
if (nlm_traverse_files(host, nlmsvc_same_host, NULL)) {
printk(KERN_WARNING
"lockd: couldn't remove all locks held by %s\n",
host->h_name);
Expand All @@ -368,5 +385,41 @@ nlmsvc_invalidate_all(void)
* turn, which is about as inefficient as it gets.
* Now we just do it once in nlm_traverse_files.
*/
nlm_traverse_files(NULL, nlmsvc_is_client);
nlm_traverse_files(NULL, nlmsvc_is_client, NULL);
}

static int
nlmsvc_match_sb(void *datap, struct nlm_file *file)
{
struct super_block *sb = datap;

return sb == file->f_file->f_path.mnt->mnt_sb;
}

int
nlmsvc_unlock_all_by_sb(struct super_block *sb)
{
int ret;

ret = nlm_traverse_files(sb, nlmsvc_always_match, nlmsvc_match_sb);
return ret ? -EIO : 0;
}
EXPORT_SYMBOL_GPL(nlmsvc_unlock_all_by_sb);

static int
nlmsvc_match_ip(void *datap, struct nlm_host *host)
{
__be32 *server_addr = datap;

return host->h_saddr.sin_addr.s_addr == *server_addr;
}

int
nlmsvc_unlock_all_by_ip(__be32 server_addr)
{
int ret;
ret = nlm_traverse_files(&server_addr, nlmsvc_match_ip, NULL);
return ret ? -EIO : 0;

}
EXPORT_SYMBOL_GPL(nlmsvc_unlock_all_by_ip);
32 changes: 17 additions & 15 deletions trunk/fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static void locks_copy_private(struct file_lock *new, struct file_lock *fl)
/*
* Initialize a new lock from an existing file_lock structure.
*/
static void __locks_copy_lock(struct file_lock *new, const struct file_lock *fl)
void __locks_copy_lock(struct file_lock *new, const struct file_lock *fl)
{
new->fl_owner = fl->fl_owner;
new->fl_pid = fl->fl_pid;
Expand Down Expand Up @@ -833,7 +833,7 @@ static int __posix_lock_file(struct inode *inode, struct file_lock *request, str
if (!posix_locks_conflict(request, fl))
continue;
if (conflock)
locks_copy_lock(conflock, fl);
__locks_copy_lock(conflock, fl);
error = -EAGAIN;
if (!(request->fl_flags & FL_SLEEP))
goto out;
Expand Down Expand Up @@ -1367,18 +1367,20 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp)

lease = *flp;

error = -EAGAIN;
if ((arg == F_RDLCK) && (atomic_read(&inode->i_writecount) > 0))
goto out;
if ((arg == F_WRLCK)
&& ((atomic_read(&dentry->d_count) > 1)
|| (atomic_read(&inode->i_count) > 1)))
goto out;
if (arg != F_UNLCK) {
error = -ENOMEM;
new_fl = locks_alloc_lock();
if (new_fl == NULL)
goto out;

error = -ENOMEM;
new_fl = locks_alloc_lock();
if (new_fl == NULL)
goto out;
error = -EAGAIN;
if ((arg == F_RDLCK) && (atomic_read(&inode->i_writecount) > 0))
goto out;
if ((arg == F_WRLCK)
&& ((atomic_read(&dentry->d_count) > 1)
|| (atomic_read(&inode->i_count) > 1)))
goto out;
}

/*
* At this point, we know that if there is an exclusive
Expand All @@ -1404,6 +1406,7 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp)
rdlease_count++;
}

error = -EAGAIN;
if ((arg == F_RDLCK && (wrlease_count > 0)) ||
(arg == F_WRLCK && ((rdlease_count + wrlease_count) > 0)))
goto out;
Expand Down Expand Up @@ -1490,8 +1493,7 @@ EXPORT_SYMBOL_GPL(vfs_setlease);
int fcntl_setlease(unsigned int fd, struct file *filp, long arg)
{
struct file_lock fl, *flp = &fl;
struct dentry *dentry = filp->f_path.dentry;
struct inode *inode = dentry->d_inode;
struct inode *inode = filp->f_path.dentry->d_inode;
int error;

locks_init_lock(&fl);
Expand Down
3 changes: 0 additions & 3 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -2712,9 +2712,6 @@ nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
* Note: locks.c uses the BKL to protect the inode's lock list.
*/

/* XXX?: Just to divert the locks_release_private at the start of
* locks_copy_lock: */
locks_init_lock(&conflock);
err = vfs_lock_file(filp, cmd, &file_lock, &conflock);
switch (-err) {
case 0: /* success! */
Expand Down
14 changes: 0 additions & 14 deletions trunk/fs/nfsd/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,20 +376,6 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval, struct iattr *ia
goto xdr_error;
}
}
if (bmval[1] & FATTR4_WORD1_TIME_METADATA) {
/* We require the high 32 bits of 'seconds' to be 0, and we ignore
all 32 bits of 'nseconds'. */
READ_BUF(12);
len += 12;
READ32(dummy32);
if (dummy32)
return nfserr_inval;
READ32(iattr->ia_ctime.tv_sec);
READ32(iattr->ia_ctime.tv_nsec);
if (iattr->ia_ctime.tv_nsec >= (u32)1000000000)
return nfserr_inval;
iattr->ia_valid |= ATTR_CTIME;
}
if (bmval[1] & FATTR4_WORD1_TIME_MODIFY_SET) {
READ_BUF(4);
len += 4;
Expand Down
Loading

0 comments on commit 2062b14

Please sign in to comment.