Skip to contentSkip to conversation

Please pull NFS updates...

GIT Trond Myklebust 2 participants 2 messages Jun 25, 2006

Subsystems (15)
lore
Share & tools
lore
#0 lore raw

Hi Linus,

Please pull from the repository at

git pull git://git.linux-nfs.org/pub/linux/nfs-2.6.git

This will update the following files through the appended changesets.

Cheers,
Trond

(Apologies for the lateness of the merge request: I'm still on vacation and will only be getting back to work tomorrow)

----

 Documentation/filesystems/automount-support.txt |    2 
 drivers/usb/core/inode.c                        |    2 
 fs/9p/vfs_super.c                               |    7 
 fs/afs/mntpt.c                                  |    2 
 fs/afs/super.c                                  |    2 
 fs/afs/super.h                                  |    2 
 fs/binfmt_misc.c                                |    3 
 fs/cifs/cifsfs.c                                |    6 
 fs/configfs/mount.c                             |    2 
 fs/debugfs/inode.c                              |    2 
 fs/fuse/inode.c                                 |    5 
 fs/libfs.c                                      |    4 
 fs/lockd/clntlock.c                             |   39 -
 fs/lockd/clntproc.c                             |   14 
 fs/lockd/host.c                                 |    9 
 fs/namespace.c                                  |  128 ++
 fs/nfs/Makefile                                 |    8 
 fs/nfs/callback.c                               |    2 
 fs/nfs/callback_xdr.c                           |    2 
 fs/nfs/dir.c                                    |   18 
 fs/nfs/direct.c                                 |    6 
 fs/nfs/file.c                                   |   30 
 fs/nfs/idmap.c                                  |    1 
 fs/nfs/inode.c                                  | 1315 +-------------------
 fs/nfs/internal.h                               |  186 +++
 fs/nfs/namespace.c                              |  229 +++
 fs/nfs/nfs2xdr.c                                |    8 
 fs/nfs/nfs3acl.c                                |   11 
 fs/nfs/nfs3proc.c                               |    5 
 fs/nfs/nfs3xdr.c                                |    6 
 fs/nfs/nfs4_fs.h                                |    4 
 fs/nfs/nfs4namespace.c                          |  201 +++
 fs/nfs/nfs4proc.c                               |  111 ++
 fs/nfs/nfs4xdr.c                                |  218 +++
 fs/nfs/pagelist.c                               |   51 -
 fs/nfs/proc.c                                   |    5 
 fs/nfs/read.c                                   |  122 +-
 fs/nfs/super.c                                  | 1537 +++++++++++++++++++++++
 fs/nfs/symlink.c                                |   13 
 fs/nfs/sysctl.c                                 |   10 
 fs/nfs/write.c                                  |   49 -
 fs/super.c                                      |    2 
 include/linux/fs.h                              |    4 
 include/linux/lockd/lockd.h                     |    4 
 include/linux/mount.h                           |    8 
 include/linux/nfs4.h                            |    1 
 include/linux/nfs_fs.h                          |   62 +
 include/linux/nfs_fs_sb.h                       |    1 
 include/linux/nfs_page.h                        |    5 
 include/linux/nfs_xdr.h                         |   61 +
 include/linux/sunrpc/xdr.h                      |    1 
 mm/shmem.c                                      |    2 
 net/sunrpc/auth_null.c                          |    2 
 net/sunrpc/auth_unix.c                          |    1 
 net/sunrpc/rpc_pipe.c                           |    2 
 net/sunrpc/xdr.c                                |   28 
 net/sunrpc/xprt.c                               |    4 
 net/sunrpc/xprtsock.c                           |   11 
 security/inode.c                                |    2 
 59 files changed, 3065 insertions(+), 1513 deletions(-)

commit 9bf2aa129a107a0e9e2a5318d35aca731ae7e666

Author: Alexey Dobriyan <[email protected]>
Date:   Sun Jun 25 02:41:28 2006 -0700

nfs: remove nfs_put_link()

commit 6ab86aa13045e7f6742af0b3c3c45f952f9fbb8d

Author: Andrew Morton <[email protected]>
Date:   Sun Jun 25 02:41:27 2006 -0700

nfs-build-fix-99

fs/built-in.o:(__param+0x20): undefined reference to nfs_idmap_cache_timeout' fs/built-in.o:(__param+0x48): undefined reference to nfs_callback_set_tcpport'

Cc Alexey Dobriyan <[email protected]>
Cc Andreas Gruenbacher <[email protected]>
Cc Andy Adamson <[email protected]>
Cc Chuck Lever <[email protected]>
Cc David Howells <[email protected]>
Cc J. Bruce Fields <[email protected]>
Cc Manoj Naik <[email protected]>
Cc Marc Eshel <[email protected]>
Cc Trond Myklebust <[email protected]>

commit d75d54147db9db5194040bd1c5022df6ba36ee48

Author: Andrew Morton <[email protected]>
Date:   Sun Jun 25 02:41:26 2006 -0700

git-nfs-build-fixes

Fix various problems with nfs4 disabled. And various other things.

In file included from fs/nfs/inode.c:50:
fs/nfs/internal.h:24: error: static declaration of 'nfs_do_refmount' follows non-static declaration include/linux/nfs_fs.h:320: error: previous declaration of 'nfs_do_refmount' was here fs/nfs/internal.h:65: warning: 'struct nfs4_fs_locations' declared inside parameter list fs/nfs/internal.h:65: warning: its scope is only this definition or declaration, which is probably not what you want fs/nfs/internal.h: In function 'nfs4_path':
fs/nfs/internal.h:97: error: 'struct nfs_server' has no member named 'mnt_path'
fs/nfs/inode.c: In function 'init_once':
fs/nfs/inode.c:1116: error: 'struct nfs_inode' has no member named 'open_states' fs/nfs/inode.c:1116: error: 'struct nfs_inode' has no member named 'delegation' fs/nfs/inode.c:1116: error: 'struct nfs_inode' has no member named 'delegation_state' fs/nfs/inode.c:1116: error: 'struct nfs_inode' has no member named 'rwsem'
distcc[26452] ERROR: compile fs/nfs/inode.c on g5/64 failed
make[1]: *** [fs/nfs/inode.o] Error 1
make: *** [fs/nfs/inode.o] Error 2
make: *** Waiting for unfinished jobs....
In file included from fs/nfs/nfs3xdr.c:26:
fs/nfs/internal.h:24: error: static declaration of 'nfs_do_refmount' follows non-static declaration include/linux/nfs_fs.h:320: error: previous declaration of 'nfs_do_refmount' was here fs/nfs/internal.h:65: warning: 'struct nfs4_fs_locations' declared inside parameter list fs/nfs/internal.h:65: warning: its scope is only this definition or declaration, which is probably not what you want fs/nfs/internal.h: In function 'nfs4_path':
fs/nfs/internal.h:97: error: 'struct nfs_server' has no member named 'mnt_path'
distcc[26486] ERROR: compile fs/nfs/nfs3xdr.c on g5/64 failed
make[1]: *** [fs/nfs/nfs3xdr.o] Error 1
make: *** [fs/nfs/nfs3xdr.o] Error 2
In file included from fs/nfs/nfs3proc.c:24:
fs/nfs/internal.h:24: error: static declaration of 'nfs_do_refmount' follows non-static declaration include/linux/nfs_fs.h:320: error: previous declaration of 'nfs_do_refmount' was here fs/nfs/internal.h:65: warning: 'struct nfs4_fs_locations' declared inside parameter list fs/nfs/internal.h:65: warning: its scope is only this definition or declaration, which is probably not what you want fs/nfs/internal.h: In function 'nfs4_path':
fs/nfs/internal.h:97: error: 'struct nfs_server' has no member named 'mnt_path'
distcc[26469] ERROR: compile fs/nfs/nfs3proc.c on bix/32 failed
make[1]: *** [fs/nfs/nfs3proc.o] Error 1
make: *** [fs/nfs/nfs3proc.o] Error 2
**FAILED**

Cc Alexey Dobriyan <[email protected]>
Cc Andreas Gruenbacher <[email protected]>
Cc Andy Adamson <[email protected]>
Cc Chuck Lever <[email protected]>
Cc David Howells <[email protected]>
Cc J. Bruce Fields <[email protected]>
Cc Manoj Naik <[email protected]>
Cc Marc Eshel <[email protected]>
Cc Trond Myklebust <[email protected]>

commit ccf01ef7aa9c6c293a1c64c27331a2ce227916ec

Author: Trond Myklebust <[email protected]>
Date:   Sun Jun 25 06:27:31 2006 -0400

Merge branch 'odirect'

commit 82b145c5a572f7fa7211dffe2097234dc91bcecc

Author: Chuck Lever <[email protected]>
Date:   Tue Jun 20 12:57:03 2006 -0400

NFS: alloc nfs_read/write_data as direct I/O is scheduled

Re-arrange the logic in the NFS direct I/O path so that nfs_read/write_data structs are allocated just before they are scheduled, rather than allocating them all at once before we start scheduling requests.

commit 06cf6f2ed0b19629700794727d86ed57b9c0583e

Author: Chuck Lever <[email protected]>
Date:   Tue Jun 20 12:56:49 2006 -0400

NFS: Eliminate nfs_get_user_pages()

Neil Brown observed that the kmalloc() in nfs_get_user_pages() is more likely to fail if the I/O is large enough to require the allocation of more than a single page to keep track of all the pinned pages in the user's buffer.

Instead of tracking one large page array per dreq/iocb, track pages per nfs_read/write_data, just like the cached I/O path does. An array for pages is already allocated for us by nfs_readdata_alloc() (and the write and commit equivalents).

This is also required for adding support for vectored I/O to the NFS direct I/O path.

The original reason to pin the user buffer and allocate all the NFS data structures before trying to schedule I/O was to ensure all needed resources are allocated on the client before starting to send requests. This reduces the chance that resource exhaustion on the client will cause a short read or write.

On the other hand, for an application making very large application I/O requests, this means that it will be nearly impossible for the application to make forward progress on a resource-limited client.

Thus, moving the buffer pinning functionality into the I/O scheduling loops should be good for scalability. The next patch will do the same for NFS data structure allocation.

commit 9c93ab7dff5eb22027ab15010557bb73f9b44c99

Author: Chuck Lever <[email protected]>
Date:   Tue Jun 20 12:56:31 2006 -0400

NFS: refactor nfs_direct_free_user_pages

Clean-up and fix a minor bug: the logic was dirtying page cache pages on both read and write operations.

commit 51a7bc6caec94bab256b272bffd24d00ea81c698

Author: Chuck Lever <[email protected]>
Date:   Tue Jun 20 12:56:16 2006 -0400

NFS: remove user_addr, user_count, and pos from nfs_direct_req

Make the user_addr, user_count, and pos parameters explicit to the scheduler routines, and remove the fields from nfs_direct_req. The iovec API will be passing in a series of these, not just one set.

commit fedb595c66e1fbd5acafe0d43b7e95c13c936d61

Author: Chuck Lever <[email protected]>
Date:   Tue Jun 20 12:55:45 2006 -0400

NFS: "open code" the NFS direct write rescheduler

An NFSv3/v4 client must reschedule on-the-wire writes if the writes are UNSTABLE, and the server reboots before the client can complete a subsequent COMMIT request.

To support direct asynchronous scatter-gather writes, the write rescheduler in fs/nfs/direct.c must not depend on the I/O parameters in the controlling nfs_direct_req structure. iovecs can be somewhat arbitrarily complex, so there could be an unbounded amount of information to save for a rarely encountered requirement.

Refactor the direct write rescheduler so it uses information from each nfs_write_data structure to reschedule writes, instead of caching that information in the controlling nfs_direct_req structure.

commit b1c5921c5b715c207d7fe77cd7aaafbb322f09f5

Author: Chuck Lever <[email protected]>
Date:   Tue Jun 20 12:55:19 2006 -0400

NFS: Separate functions for counting outstanding NFS direct I/Os

Factor out the logic that increments and decrements the outstanding I/O count. This will be a commonly used bit of code in upcoming patches. Also make this an atomic_t again, since it will be very often manipulated outside dreq->spin lock.

commit 28df955a2ad484d602314b30183ea8496a9aa34a

Author: Trond Myklebust <[email protected]>
Date:   Fri Jun 9 09:40:27 2006 -0400

NLM: Fix reclaim races

Currently it is possible for a task to remove its locks at the same time as the NLM recovery thread is trying to recover them. This quickly leads to an Oops.
Protect the locks using an rw semaphore while they are being recovered.

commit 5046791417dcac1ba126b77b8062af15a2f0b8e1

Author: Trond Myklebust <[email protected]>
Date:   Fri Jun 9 09:40:24 2006 -0400

NLM: sem to mutex conversion

commit 3134cbec5e172c3a86e2c3ef4af34b6cfd380bfa

Author: Marc Eshel <[email protected]>
Date:   Fri Jun 9 09:40:20 2006 -0400

locks.c: add the fl_owner to nlm_compare_locks

Add the fl_owner to NLM compare locks. Since two different client can present the same pid to the server it is not enough to distinguish locks from different clients. The fl_owner field is a pointer to the struct nlm_host which is unique for each client.

commit 81039f1f204a0fd2952112a240284e114f1a25e6

Author: Trond Myklebust <[email protected]>
Date:   Fri Jun 9 09:34:34 2006 -0400

NFS: Display the chosen RPCSEC_GSS security flavour in /proc/mounts

commit f7b422b17ee5ee4920e8ae24a6ad04bf3481ce72

Author: David Howells <[email protected]>
Date:   Fri Jun 9 09:34:33 2006 -0400

NFS: Split fs/nfs/inode.c

As fs/nfs/inode.c is rather large, heterogenous and unwieldy, the attached patch splits it up into a number of files:

(*) fs/nfs/inode.c

Strictly inode specific functions.

(*) fs/nfs/super.c

Superblock management functions for NFS and NFS4, normal access, clones and referrals. The NFS4 superblock functions _could_ move out into a separate conditionally compiled file, but it's probably not worth it as there're so many common bits.

(*) fs/nfs/namespace.c

Some namespace-specific functions have been moved here.

(*) fs/nfs/nfs4namespace.c

NFS4-specific namespace functions (this could be merged into the previous file). This file is conditionally compiled.

(*) fs/nfs/internal.h

Inter-file declarations, plus a few simple utility functions moved from fs/nfs/inode.c.

Additionally, all the in-.c-file externs have been moved here, and those files they were moved from now includes this file.

For the most part, the functions have not been changed, only some multiplexor functions have changed significantly.

I've also:

(*) Added some extra banner comments above some functions.

(*) Rearranged the function order within the files to be more logical and
better grouped (IMO), though someone may prefer a different order.

(*) Reduced the number of #ifdefs in .c files.

(*) Added missing __init and __exit directives.

commit 4e5ccf60c5aa79d325c123f47d288a068166f389

Author: Trond Myklebust <[email protected]>
Date:   Fri Jun 9 09:34:32 2006 -0400

NFS: Fix typo in nfs_do_clone_mount()

Doh!

commit 860de07139980afe9856cc31eb5efbf321bbcea4

Author: Trond Myklebust <[email protected]>
Date:   Fri Jun 9 09:34:31 2006 -0400

NFS: Fix compile errors introduced by referrals patches

commit 87e4ba1a62af8e05ee3e8f8aaca622714386ffb0

Author: Trond Myklebust <[email protected]>
Date:   Fri Jun 9 09:34:30 2006 -0400

NFSv4: Ensure that referral mounts bind to a reserved port

commit 33a43f2802d8d7be3a9b541785c4ca9ad79e4310

Author: Andy Adamson <[email protected]>
Date:   Fri Jun 9 09:34:30 2006 -0400

NFSv4: A root pathname is sent as a zero component4

commit 6b97fd3da1eab2cc490cfe884c7d4956522eaf8b

Author: Manoj Naik <[email protected]>
Date:   Fri Jun 9 09:34:29 2006 -0400

NFSv4: Follow a referral

Respond to a moved error on NFS lookup by setting up the referral.
Note: We don't actually follow the referral during lookup/getattr, but later when we detect fsid mismatch in inode revalidation (similar to the processing done for cloning submounts). Referrals will have fake attributes until they are actually followed or traversed.

commit 9cdb3883c38f883436a84c2353a4cf964ff890a2

Author: Manoj Naik <[email protected]>
Date:   Fri Jun 9 09:34:28 2006 -0400

NFSv4: Ensure client submounts when following a referral

Set up mountpoint when hitting a referral on moved error by getting fs_locations.

commit 61f5164cab1f6fdf06871ea9d60fe2f912184078

Author: Manoj Naik <[email protected]>
Date:   Fri Jun 9 09:34:27 2006 -0400

NFS: Expand clone mounts to include other servers

commit c818ba43f9ca2e8214412ab5f126b1f436c35098

Author: Manoj Naik <[email protected]>
Date:   Fri Jun 9 09:34:26 2006 -0400

NFSv4: Create NFSv4 transport and client

Move existing code into a separate function so that it can be also used by referral code.

commit 830b8e33fe1900b87c8eb7ec5c646117a9f298d6

Author: Manoj Naik <[email protected]>
Date:   Fri Jun 9 09:34:25 2006 -0400

NFSv4: Define an fs_locations bitmap

This is (similar to getattr bitmap) but includes fs_locations and mounted_on_fileid attributes. Use this bitmap for encoding in fs_locations requests.
Note: We can probably do better by requesting locations as part of fsinfo itself.

commit 361e624f6d8bfbeac53769603d995d47535cfd46

Author: Manoj Naik <[email protected]>
Date:   Fri Jun 9 09:34:24 2006 -0400

NFSv4: GETATTR attributes on referral

Per referral draft, only fs_locations, fsid, and mounted_on_fileid can be requested in a GETATTR on referrals.

commit 99baf625d3b9b8944920acc7c2d06079a37458c5

Author: Manoj Naik <[email protected]>
Date:   Fri Jun 9 09:34:24 2006 -0400

NFSv4: Decode mounted_on_fileid attribute in getattr.

It is ignored if fileid is also requested. This will be used on referrals (fs_locations).

commit 7aaa0b3bd4d215d9ce4d62b6c2043a63ba650f93

Author: Manoj Naik <[email protected]>
Date:   Fri Jun 9 09:34:23 2006 -0400

NFSv4: convert fs-locations-components to conform to RFC3530

Use component4-style formats for decoding list of servers and pathnames in fs_locations.

commit 683b57b435326eb512c7305892683b6205669448

Author: Trond Myklebust <[email protected]>
Date:   Fri Jun 9 09:34:22 2006 -0400

NFSv4: Implement the fs_locations function call

NFSv4 allows for the fact that filesystems may be replicated across several servers or that they may be migrated to a backup server in case of failure of the primary server.
fs_locations is an NFSv4 operation for retrieving information about the location of migrated and/or replicated filesystems.

Based on an initial implementation by Jiaying Zhang <[email protected]>

commit 8b23ea7bedb8b45a5bb56745fa3ff11018acf04e

Author: Trond Myklebust <[email protected]>
Date:   Fri Jun 9 09:34:21 2006 -0400

RPC: Allow struc xdr_stream to read the page section of an xdr_buf

commit 51d8fa6a109589d522c18a8e9bf3fb167a91b1bc

Author: Trond Myklebust <[email protected]>
Date:   Fri Jun 9 09:34:20 2006 -0400

NFS: Add timeout to submounts

Make automounted partitions expire using the mark_mounts_for_expiry() function. The timeout is controlled via a sysctl.

commit 55a975937d40cac582e981ddc8ed783b3dcc043c

Author: Trond Myklebust <[email protected]>
Date:   Fri Jun 9 09:34:19 2006 -0400

NFS: Ensure the client submounts, when it crosses a server mountpoint.

commit 8b4bdcf8995dd92b23d2ec22b32aee8fbbb50e1c

Author: Trond Myklebust <[email protected]>
Date:   Fri Jun 9 09:34:19 2006 -0400

NFS: Store the file system "fsid" value in the NFS super block.

This should enable us to detect if we are crossing a mountpoint in the case where the server is exporting "nohide" mounts.

commit 8b512d9a88875affe584bb3d2a7a235f84343b9e

Author: Trond Myklebust <[email protected]>
Date:   Fri Jun 9 09:34:18 2006 -0400

VFS: Remove dependency of ->umount_begin() call on MNT_FORCE

Allow filesystems to decide to perform pre-umount processing whether or not MNT_FORCE is set.

commit 5528f911b4c43a5de5da34bcbd7e3f2a62503617

Author: Trond Myklebust <[email protected]>
Date:   Fri Jun 9 09:34:17 2006 -0400

VFS: Add shrink_submounts()

Allow a submount to be marked as being 'shrinkable' by means of the vfsmount->mnt_flags, and then add a function 'shrink_submounts()' which attempts to recursively unmount these submounts.

commit 1f5ce9e93aa96a867f195ed45f6f77935175f12e

Author: Trond Myklebust <[email protected]>
Date:   Fri Jun 9 09:34:16 2006 -0400

VFS: Unexport do_kern_mount() and clean up simple_pin_fs()

Replace all module uses with the new vfs_kern_mount() interface, and fix up simple_pin_fs().

commit bb4a58bf46473e3e83d84054bbc110db3a0f85e4

Author: Trond Myklebust <[email protected]>
Date:   Fri Jun 9 09:34:15 2006 -0400

VFS: Add GPL_EXPORTED function vfs_kern_mount()

do_kern_mount() does not allow the kernel to use private mount interfaces without exposing the same interfaces to userland. The problem is that the filesystem is referenced by name, thus meaning that it and its mount interface must be registered in the global filesystem list.

vfs_kern_mount() passes the struct file_system_type as an explicit parameter in order to overcome this limitation.

commit da6d503aa0a75ec44f17d985a2b500077e7f6a74

Author: Trond Myklebust <[email protected]>
Date:   Thu Jun 1 17:26:35 2006 -0400

NFS: Remove nfs_delete_inode()

Now that we have a real nfs_invalidate_page() to ensure that truncate_inode_pages() does the right thing when there are pending dirty pages, we can get rid of nfs_delete_inode().

commit d2ccddf042c403b146159beea438c6bfc4a445e2

Author: Trond Myklebust <[email protected]>
Date:   Wed May 31 01:13:38 2006 -0400

NFS: Flesh out nfs_invalidate_page()

In the case of a call to truncate_inode_pages(), we should really try to cancel any pending writes on the page.

commit c04871e6345e4c6dfda564e302d7fd8c66420fd5

Author: J. Bruce Fields <[email protected]>
Date:   Tue May 30 16:28:58 2006 -0400

NFSv4: remove obviously bogus comparison from decode_getacl

We just set *acl_len to zero, and attrlen is unsigned, so this comparison is clearly bogus. I have no idea what I was thinking.

Fixes a bug that caused getacl to fail over krb5p.

commit 3873bc50e2271504da45799257f69222774d9550

Author: Alexey Dobriyan <[email protected]>
Date:   Sat May 27 03:31:12 2006 +0400

NFSv4: really return status from decode_recall_args()

commit 4814f56d19137b3b9fa8e00e1d332b3683b950de

Author: Andreas Gruenbacher <[email protected]>
Date:   Thu May 25 01:41:03 2006 -0400

NFSv3: Client-side nfsacl caching fix

Fix two errors in the client-side acl cache: First, when nfs3_proc_getacl requests only the default acl of a file and the access acl is not cached already, a NULL access acl entry is cached instead of ERR_PTR(-EAGAIN) ("not cached").

Second, update the cached acls in nfs3_proc_setacls: nfs_refresh_inode does not always invalidate the cached acls, and when it does not, the cached acls get out of sync.

commit 1842bfb447cea8b344fd91af97fb6d604ecb11fa

Author: Trond Myklebust <[email protected]>
Date:   Thu May 25 01:41:01 2006 -0400

NFS: Fix up inode revalidation accounting

Currently, we are accounting for all calls to nfs_revalidate_inode(), but not to nfs_revalidate_mapping(), or nfs_lookup_verify_inode(), etc...

commit 44b11874ff583b6e766a05856b04f3c492c32b84

Author: Trond Myklebust <[email protected]>
Date:   Thu May 25 01:40:59 2006 -0400

NFS: Separate metadata and page cache revalidation mechanisms

Separate out the function of revalidating the inode metadata, and revalidating the mapping. The former may be called by lookup(), and only really needs to check that permissions, ctime, etc haven't changed whereas the latter needs only done when we want to read data from the page cache, and may need to sync and then invalidate the mapping.

commit 38478b24e37587f1c4fedf8ac070ca54f052ed28

Author: Trond Myklebust <[email protected]>
Date:   Thu May 25 01:40:57 2006 -0400

NFS: More page cache revalidation fixups

Whenever the directory changes, we want to make sure that we always invalidate its page cache. Fix up update_changeattr() and nfs_mark_for_revalidate() so that they do so.

commit f1bb0b92ba2cdfffe6e437f7a7da53138cf08d52

Author: Trond Myklebust <[email protected]>
Date:   Thu May 25 01:40:55 2006 -0400

NFS: Fix page cache revalidation

Fix up a bug in the handling of NFS_INO_REVAL_PAGECACHE: make sure that nfs_update_inode() clears it when we're sure we're not racing with other updates.

commit 0d0b5cb36faf7002a11736032313f06d6f3d881c

Author: Chuck Lever <[email protected]>
Date:   Thu May 25 01:40:53 2006 -0400

NFS: Optimize allocation of nfs_read/write_data structures

Clean up use of page_array, and fix an off-by-one error noticed by Tom Talpey which causes kmalloc calls in cases where using the page_array is sufficient.

Test plan:
Normal client functional testing with r/wsize=32768.

commit bf3fcf89552f24657bcfb6a9d73cd167ebb496c6

Author: Chuck Lever <[email protected]>
Date:   Thu May 25 01:40:51 2006 -0400

SUNRPC: NFS_ROOT always uses the same XIDs

The XID generator uses get_random_bytes to generate an initial XID. NFS_ROOT starts up before the random driver, though, so get_random_bytes doesn't set a random XID for NFS_ROOT. This causes NFS_ROOT mount points to reuse XIDs every time the client is booted. If the client boots often enough, the server will start serving old replies out of its DRC.

Use net_random() instead.

Test plan:
I/O intensive workloads should perform well and generate no errors. Traces taken during client reboots should show that NFS_ROOT mounts use unique XIDs after every reboot.

commit b85d88068444ae5dcb1639bcef770ccbf085dd4e

Author: Chuck Lever <[email protected]>
Date:   Thu May 25 01:40:49 2006 -0400

SUNRPC: select privileged port numbers at random

Make the RPC client select privileged ephemeral source ports at random. This improves DRC behavior on the server by using the same port when reconnecting for the same mount point, but using a different port for fresh mounts.

The Linux TCP implementation already does this for nonprivileged ports. Note that TCP sockets in TIME_WAIT will prevent quick reuse of a random ephemeral port number by leaving the port INUSE until the connection transitions out of TIME_WAIT.

Test plan:
Connectathon against every known server implementation using multiple mount points. Locking especially.

commit 73a3d07c1082145a3b78407bb5252df290470c4c

Author: Trond Myklebust <[email protected]>
Date:   Thu May 25 01:40:47 2006 -0400

NFS: Clean up inode metadata updates

commit 9d1e9232223a7f065be7f956a7b749a4cbbbe16d

Author: Trond Myklebust <[email protected]>
Date:   Thu May 25 01:40:46 2006 -0400

NFSv4: Some NFSv4 servers have broken behaviour for the change attribute

The Linux NFSv4 server violates RFC3530 in that the change attribute is not guaranteed to be updated for every change to the inode. Our optimisation for checking whether or not the inode metadata has changed or not is broken too. Grr....

commit 1de3fc12ea085690547a54b6efa01c7348f1cebd

Author: Trond Myklebust <[email protected]>
Date:   Thu May 25 01:40:44 2006 -0400

NFS: Clean up and fix page zeroing when we have short reads

The code that is supposed to zero the uninitialised partial pages when the server returns a short read is currently broken: it looks at the nfs_page wb_pgbase and wb_bytes fields instead of the equivalent nfs_read_data values when deciding where to start truncating the page.

Also ensure that we are more careful about setting PG_uptodate before retrying a short read: the retry will change the nfs_read_data args.pgbase and args.count.

Documentation/filesystems/automount-support.txt +1 -1
index 58c65a1..7cac200 100644
@@ -19,7 +19,7 @@ following procedure:
 
  (2) Have the follow_link() op do the following steps:
 
-     (a) Call do_kern_mount() to call the appropriate filesystem to set up a
+     (a) Call vfs_kern_mount() to call the appropriate filesystem to set up a
          superblock and gain a vfsmount structure representing it.
 
      (b) Copy the nameidata provided as an argument and substitute the dentry
drivers/usb/core/inode.c +1 -1
index 95f5ad9..bfc9b28 100644
@@ -569,7 +569,7 @@ static int create_special_files (void)
 	ignore_mount = 1;
 
 	/* create the devices special file */
-	retval = simple_pin_fs("usbfs", &usbfs_mount, &usbfs_mount_count);
+	retval = simple_pin_fs(&usb_fs_type, &usbfs_mount, &usbfs_mount_count);
 	if (retval) {
 		err ("Unable to get usbfs mount");
 		goto exit;
fs/9p/vfs_super.c +4 -3
index 8729430..8b15bb2 100644
@@ -256,11 +256,12 @@ static int v9fs_show_options(struct seq_
 }
 
 static void
-v9fs_umount_begin(struct super_block *sb)
+v9fs_umount_begin(struct vfsmount *vfsmnt, int flags)
 {
-	struct v9fs_session_info *v9ses = sb->s_fs_info;
+	struct v9fs_session_info *v9ses = vfsmnt->mnt_sb->s_fs_info;
 
-	v9fs_session_cancel(v9ses);
+	if (flags & MNT_FORCE)
+		v9fs_session_cancel(v9ses);
 }
 
 static struct super_operations v9fs_super_ops = {
fs/afs/mntpt.c +1 -1
index b5cf9e1..99785a7 100644
@@ -203,7 +203,7 @@ static struct vfsmount *afs_mntpt_do_aut
 
 	/* try and do the mount */
 	kdebug("--- attempting mount %s -o %s ---", devname, options);
-	mnt = do_kern_mount("afs", 0, devname, options);
+	mnt = vfs_kern_mount(&afs_fs_type, 0, devname, options);
 	kdebug("--- mount result %p ---", mnt);
 
 	free_page((unsigned long) devname);
fs/afs/super.c +1 -1
index 82468df..67d1f5c 100644
@@ -48,7 +48,7 @@ static void afs_put_super(struct super_b
 
 static void afs_destroy_inode(struct inode *inode);
 
-static struct file_system_type afs_fs_type = {
+struct file_system_type afs_fs_type = {
 	.owner		= THIS_MODULE,
 	.name		= "afs",
 	.get_sb		= afs_get_sb,
fs/afs/super.h +2 -0
index ac11362..32de8cc 100644
@@ -38,6 +38,8 @@ static inline struct afs_super_info *AFS
 	return sb->s_fs_info;
 }
 
+extern struct file_system_type afs_fs_type;
+
 #endif /* __KERNEL__ */
 
 #endif /* _LINUX_AFS_SUPER_H */
fs/binfmt_misc.c +2 -1
index 07a4996..34ebbc1 100644
@@ -55,6 +55,7 @@ typedef struct {
 } Node;
 
 static DEFINE_RWLOCK(entries_lock);
+static struct file_system_type bm_fs_type;
 static struct vfsmount *bm_mnt;
 static int entry_count;
 
@@ -637,7 +638,7 @@ static ssize_t bm_register_write(struct 
 	if (!inode)
 		goto out2;
 
-	err = simple_pin_fs("binfmt_misc", &bm_mnt, &entry_count);
+	err = simple_pin_fs(&bm_fs_type, &bm_mnt, &entry_count);
 	if (err) {
 		iput(inode);
 		inode = NULL;
fs/cifs/cifsfs.c +4 -2
index 7520f46..8b4de6e 100644
@@ -403,12 +403,14 @@ static struct quotactl_ops cifs_quotactl
 #endif
 
 #ifdef CONFIG_CIFS_EXPERIMENTAL
-static void cifs_umount_begin(struct super_block * sblock)
+static void cifs_umount_begin(struct vfsmount * vfsmnt, int flags)
 {
 	struct cifs_sb_info *cifs_sb;
 	struct cifsTconInfo * tcon;
 
-	cifs_sb = CIFS_SB(sblock);
+	if (!(flags & MNT_FORCE))
+		return;
+	cifs_sb = CIFS_SB(vfsmnt->mnt_sb);
 	if(cifs_sb == NULL)
 		return;
 
fs/configfs/mount.c +1 -1
index 94dab7b..3e5fe84 100644
@@ -118,7 +118,7 @@ static struct file_system_type configfs_
 
 int configfs_pin_fs(void)
 {
-	return simple_pin_fs("configfs", &configfs_mount,
+	return simple_pin_fs(&configfs_fs_type, &configfs_mount,
 			     &configfs_mnt_count);
 }
 
fs/debugfs/inode.c +1 -1
index 440128e..6fa1e04 100644
@@ -199,7 +199,7 @@ struct dentry *debugfs_create_file(const
 
 	pr_debug("debugfs: creating file '%s'\n",name);
 
-	error = simple_pin_fs("debugfs", &debugfs_mount, &debugfs_mount_count);
+	error = simple_pin_fs(&debug_fs_type, &debugfs_mount, &debugfs_mount_count);
 	if (error)
 		goto exit;
 
fs/fuse/inode.c +3 -2
index a13c0f5..815c824 100644
@@ -195,9 +195,10 @@ struct inode *fuse_iget(struct super_blo
 	return inode;
 }
 
-static void fuse_umount_begin(struct super_block *sb)
+static void fuse_umount_begin(struct vfsmount *vfsmnt, int flags)
 {
-	fuse_abort_conn(get_fuse_conn_super(sb));
+	if (flags & MNT_FORCE)
+		fuse_abort_conn(get_fuse_conn_super(vfsmnt->mnt_sb));
 }
 
 static void fuse_put_super(struct super_block *sb)
fs/libfs.c +2 -2
index 1b11563..fc785d8 100644
@@ -424,13 +424,13 @@ out:
 
 static DEFINE_SPINLOCK(pin_fs_lock);
 
-int simple_pin_fs(char *name, struct vfsmount **mount, int *count)
+int simple_pin_fs(struct file_system_type *type, struct vfsmount **mount, int *count)
 {
 	struct vfsmount *mnt = NULL;
 	spin_lock(&pin_fs_lock);
 	if (unlikely(!*mount)) {
 		spin_unlock(&pin_fs_lock);
-		mnt = do_kern_mount(name, 0, name, NULL);
+		mnt = vfs_kern_mount(type, 0, type->name, NULL);
 		if (IS_ERR(mnt))
 			return PTR_ERR(mnt);
 		spin_lock(&pin_fs_lock);
fs/lockd/clntlock.c +25 -14
index bce7444..52774fe 100644
@@ -147,11 +147,10 @@ u32 nlmclnt_grant(const struct sockaddr_
  * Someone has sent us an SM_NOTIFY. Ensure we bind to the new port number,
  * that we mark locks for reclaiming, and that we bump the pseudo NSM state.
  */
-static inline
-void nlmclnt_prepare_reclaim(struct nlm_host *host, u32 newstate)
+static void nlmclnt_prepare_reclaim(struct nlm_host *host)
 {
+	down_write(&host->h_rwsem);
 	host->h_monitored = 0;
-	host->h_nsmstate = newstate;
 	host->h_state++;
 	host->h_nextrebind = 0;
 	nlm_rebind_host(host);
@@ -164,6 +163,13 @@ void nlmclnt_prepare_reclaim(struct nlm_
 	dprintk("NLM: reclaiming locks for host %s", host->h_name);
 }
 
+static void nlmclnt_finish_reclaim(struct nlm_host *host)
+{
+	host->h_reclaiming = 0;
+	up_write(&host->h_rwsem);
+	dprintk("NLM: done reclaiming locks for host %s", host->h_name);
+}
+
 /*
  * Reclaim all locks on server host. We do this by spawning a separate
  * reclaimer thread.
@@ -171,12 +177,10 @@ void nlmclnt_prepare_reclaim(struct nlm_
 void
 nlmclnt_recovery(struct nlm_host *host, u32 newstate)
 {
-	if (host->h_reclaiming++) {
-		if (host->h_nsmstate == newstate)
-			return;
-		nlmclnt_prepare_reclaim(host, newstate);
-	} else {
-		nlmclnt_prepare_reclaim(host, newstate);
+	if (host->h_nsmstate == newstate)
+		return;
+	host->h_nsmstate = newstate;
+	if (!host->h_reclaiming++) {
 		nlm_get_host(host);
 		__module_get(THIS_MODULE);
 		if (kernel_thread(reclaimer, host, CLONE_KERNEL) < 0)
@@ -190,6 +194,7 @@ reclaimer(void *ptr)
 	struct nlm_host	  *host = (struct nlm_host *) ptr;
 	struct nlm_wait	  *block;
 	struct file_lock *fl, *next;
+	u32 nsmstate;
 
 	daemonize("%s-reclaim", host->h_name);
 	allow_signal(SIGKILL);
@@ -199,19 +204,25 @@ reclaimer(void *ptr)
 	lock_kernel();
 	lockd_up();
 
+	nlmclnt_prepare_reclaim(host);
 	/* First, reclaim all locks that have been marked. */
 restart:
+	nsmstate = host->h_nsmstate;
 	list_for_each_entry_safe(fl, next, &host->h_reclaim, fl_u.nfs_fl.list) {
 		list_del_init(&fl->fl_u.nfs_fl.list);
 
 		if (signalled())
 			continue;
-		if (nlmclnt_reclaim(host, fl) == 0)
-			list_add_tail(&fl->fl_u.nfs_fl.list, &host->h_granted);
-		goto restart;
+		if (nlmclnt_reclaim(host, fl) != 0)
+			continue;
+		list_add_tail(&fl->fl_u.nfs_fl.list, &host->h_granted);
+		if (host->h_nsmstate != nsmstate) {
+			/* Argh! The server rebooted again! */
+			list_splice_init(&host->h_granted, &host->h_reclaim);
+			goto restart;
+		}
 	}
-
-	host->h_reclaiming = 0;
+	nlmclnt_finish_reclaim(host);
 
 	/* Now, wake up all processes that sleep on a blocked lock */
 	list_for_each_entry(block, &nlm_blocked, b_list) {
fs/lockd/clntproc.c +13 -1
index f96e381..4db6209 100644
@@ -508,7 +508,10 @@ nlmclnt_lock(struct nlm_rqst *req, struc
 	}
 
 	block = nlmclnt_prepare_block(host, fl);
+again:
 	for(;;) {
+		/* Reboot protection */
+		fl->fl_u.nfs_fl.state = host->h_state;
 		status = nlmclnt_call(req, NLMPROC_LOCK);
 		if (status < 0)
 			goto out_unblock;
@@ -531,10 +534,16 @@ nlmclnt_lock(struct nlm_rqst *req, struc
 	}
 
 	if (resp->status == NLM_LCK_GRANTED) {
-		fl->fl_u.nfs_fl.state = host->h_state;
+		down_read(&host->h_rwsem);
+		/* Check whether or not the server has rebooted */
+		if (fl->fl_u.nfs_fl.state != host->h_state) {
+			up_read(&host->h_rwsem);
+			goto again;
+		}
 		fl->fl_flags |= FL_SLEEP;
 		/* Ensure the resulting lock will get added to granted list */
 		do_vfs_lock(fl);
+		up_read(&host->h_rwsem);
 	}
 	status = nlm_stat_to_errno(resp->status);
 out_unblock:
@@ -596,6 +605,7 @@ nlmclnt_reclaim(struct nlm_host *host, s
 static int
 nlmclnt_unlock(struct nlm_rqst *req, struct file_lock *fl)
 {
+	struct nlm_host	*host = req->a_host;
 	struct nlm_res	*resp = &req->a_res;
 	int		status;
 
@@ -604,7 +614,9 @@ nlmclnt_unlock(struct nlm_rqst *req, str
 	 * request, or to deny it with NLM_LCK_DENIED_GRACE_PERIOD. In either
 	 * case, we want to unlock.
 	 */
+	down_read(&host->h_rwsem);
 	do_vfs_lock(fl);
+	up_read(&host->h_rwsem);
 
 	if (req->a_flags & RPC_TASK_ASYNC)
 		return nlm_async_call(req, NLMPROC_UNLOCK, &nlmclnt_unlock_ops);
fs/lockd/host.c +5 -4
index 729ac42..38b0e8a 100644
@@ -112,11 +112,12 @@ nlm_lookup_host(int server, struct socka
 	host->h_version    = version;
 	host->h_proto      = proto;
 	host->h_rpcclnt    = NULL;
-	init_MUTEX(&host->h_sema);
+	mutex_init(&host->h_mutex);
 	host->h_nextrebind = jiffies + NLM_HOST_REBIND;
 	host->h_expires    = jiffies + NLM_HOST_EXPIRE;
 	atomic_set(&host->h_count, 1);
 	init_waitqueue_head(&host->h_gracewait);
+	init_rwsem(&host->h_rwsem);
 	host->h_state      = 0;			/* pseudo NSM state */
 	host->h_nsmstate   = 0;			/* real NSM state */
 	host->h_server	   = server;
@@ -172,7 +173,7 @@ nlm_bind_host(struct nlm_host *host)
 			(unsigned)ntohl(host->h_addr.sin_addr.s_addr));
 
 	/* Lock host handle */
-	down(&host->h_sema);
+	mutex_lock(&host->h_mutex);
 
 	/* If we've already created an RPC client, check whether
 	 * RPC rebind is required
@@ -204,12 +205,12 @@ nlm_bind_host(struct nlm_host *host)
 		host->h_rpcclnt = clnt;
 	}
 
-	up(&host->h_sema);
+	mutex_unlock(&host->h_mutex);
 	return clnt;
 
 forgetit:
 	printk("lockd: couldn't create RPC handle for %s\n", host->h_name);
-	up(&host->h_sema);
+	mutex_unlock(&host->h_mutex);
 	return NULL;
 }
 
fs/namespace.c +101 -27

160 lines not on this page · raw message

fs/nfs/Makefile +5 -3
index ec61fd5..0b572a0 100644
@@ -4,14 +4,16 @@ #
 
 obj-$(CONFIG_NFS_FS) += nfs.o
 
-nfs-y 			:= dir.o file.o inode.o nfs2xdr.o pagelist.o \
-			   proc.o read.o symlink.o unlink.o write.o
+nfs-y 			:= dir.o file.o inode.o super.o nfs2xdr.o pagelist.o \
+			   proc.o read.o symlink.o unlink.o write.o \
+			   namespace.o
 nfs-$(CONFIG_ROOT_NFS)	+= nfsroot.o mount_clnt.o      
 nfs-$(CONFIG_NFS_V3)	+= nfs3proc.o nfs3xdr.o
 nfs-$(CONFIG_NFS_V3_ACL)	+= nfs3acl.o
 nfs-$(CONFIG_NFS_V4)	+= nfs4proc.o nfs4xdr.o nfs4state.o nfs4renewd.o \
 			   delegation.o idmap.o \
-			   callback.o callback_xdr.o callback_proc.o
+			   callback.o callback_xdr.o callback_proc.o \
+			   nfs4namespace.o
 nfs-$(CONFIG_NFS_DIRECTIO) += direct.o
 nfs-$(CONFIG_SYSCTL) += sysctl.o
 nfs-objs		:= $(nfs-y)
fs/nfs/callback.c +0 -2
index 90c95ad..d53f8c6 100644
@@ -182,8 +182,6 @@ static int nfs_callback_authenticate(str
 /*
  * Define NFS4 callback program
  */
-extern struct svc_version nfs4_callback_version1;
-
 static struct svc_version *nfs4_callback_version[] = {
 	[1] = &nfs4_callback_version1,
 };
fs/nfs/callback_xdr.c +1 -1
index 05c38cf..c929913 100644
@@ -202,7 +202,7 @@ static unsigned decode_recall_args(struc
 	status = decode_fh(xdr, &args->fh);
 out:
 	dprintk("%s: exit with status = %d\n", __FUNCTION__, status);
-	return 0;
+	return status;
 }
 
 static unsigned encode_string(struct xdr_stream *xdr, unsigned int len, const char *str)
fs/nfs/dir.c +17 -1
index cae74dd..3ddda6f 100644
@@ -528,7 +528,7 @@ static int nfs_readdir(struct file *filp
 
 	lock_kernel();
 
-	res = nfs_revalidate_inode(NFS_SERVER(inode), inode);
+	res = nfs_revalidate_mapping(inode, filp->f_mapping);
 	if (res < 0) {
 		unlock_kernel();
 		return res;
@@ -868,6 +868,17 @@ int nfs_is_exclusive_create(struct inode
 	return (nd->intent.open.flags & O_EXCL) != 0;
 }
 
+static inline int nfs_reval_fsid(struct inode *dir,
+		struct nfs_fh *fh, struct nfs_fattr *fattr)
+{
+	struct nfs_server *server = NFS_SERVER(dir);
+
+	if (!nfs_fsid_equal(&server->fsid, &fattr->fsid))
+		/* Revalidate fsid on root dir */
+		return __nfs_revalidate_inode(server, dir->i_sb->s_root->d_inode);
+	return 0;
+}
+
 static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd)
 {
 	struct dentry *res;
@@ -900,6 +911,11 @@ static struct dentry *nfs_lookup(struct 
 		res = ERR_PTR(error);
 		goto out_unlock;
 	}
+	error = nfs_reval_fsid(dir, &fhandle, &fattr);
+	if (error < 0) {
+		res = ERR_PTR(error);
+		goto out_unlock;
+	}
 	inode = nfs_fhget(dentry->d_sb, &fhandle, &fattr);
 	res = (struct dentry *)inode;
 	if (IS_ERR(res))
fs/nfs/direct.c +3 -3
index 3c72b0c..402005c 100644
@@ -892,7 +892,7 @@ out:
  * nfs_init_directcache - create a slab cache for nfs_direct_req structures
  *
  */
-int nfs_init_directcache(void)
+int __init nfs_init_directcache(void)
 {
 	nfs_direct_cachep = kmem_cache_create("nfs_direct_cache",
 						sizeof(struct nfs_direct_req),
@@ -906,10 +906,10 @@ int nfs_init_directcache(void)
 }
 
 /**
- * nfs_init_directcache - destroy the slab cache for nfs_direct_req structures
+ * nfs_destroy_directcache - destroy the slab cache for nfs_direct_req structures
  *
  */
-void nfs_destroy_directcache(void)
+void __exit nfs_destroy_directcache(void)
 {
 	if (kmem_cache_destroy(nfs_direct_cachep))
 		printk(KERN_INFO "nfs_direct_cache: not all structures were freed\n");
fs/nfs/file.c +8 -22
index fa05c02..add2891 100644
@@ -127,23 +127,6 @@ nfs_file_release(struct inode *inode, st
 }
 
 /**
- * nfs_revalidate_file - Revalidate the page cache & related metadata
- * @inode - pointer to inode struct
- * @file - pointer to file
- */
-static int nfs_revalidate_file(struct inode *inode, struct file *filp)
-{
-	struct nfs_inode *nfsi = NFS_I(inode);
-	int retval = 0;
-
-	if ((nfsi->cache_validity & (NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_ATTR))
-			|| nfs_attribute_timeout(inode))
-		retval = __nfs_revalidate_inode(NFS_SERVER(inode), inode);
-	nfs_revalidate_mapping(inode, filp->f_mapping);
-	return 0;
-}
-
-/**
  * nfs_revalidate_size - Revalidate the file size
  * @inode - pointer to inode struct
  * @file - pointer to struct file
@@ -228,7 +211,7 @@ #endif
 		dentry->d_parent->d_name.name, dentry->d_name.name,
 		(unsigned long) count, (unsigned long) pos);
 
-	result = nfs_revalidate_file(inode, iocb->ki_filp);
+	result = nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping);
 	nfs_add_stats(inode, NFSIOS_NORMALREADBYTES, count);
 	if (!result)
 		result = generic_file_aio_read(iocb, buf, count, pos);
@@ -247,7 +230,7 @@ nfs_file_sendfile(struct file *filp, lof
 		dentry->d_parent->d_name.name, dentry->d_name.name,
 		(unsigned long) count, (unsigned long long) *ppos);
 
-	res = nfs_revalidate_file(inode, filp);
+	res = nfs_revalidate_mapping(inode, filp->f_mapping);
 	if (!res)
 		res = generic_file_sendfile(filp, ppos, count, actor, target);
 	return res;
@@ -263,7 +246,7 @@ nfs_file_mmap(struct file * file, struct
 	dfprintk(VFS, "nfs: mmap(%s/%s)\n",
 		dentry->d_parent->d_name.name, dentry->d_name.name);
 
-	status = nfs_revalidate_file(inode, file);
+	status = nfs_revalidate_mapping(inode, file->f_mapping);
 	if (!status)
 		status = generic_file_mmap(file, vma);
 	return status;
@@ -320,7 +303,11 @@ static int nfs_commit_write(struct file 
 
 static void nfs_invalidate_page(struct page *page, unsigned long offset)
 {
-	/* FIXME: we really should cancel any unstarted writes on this page */
+	struct inode *inode = page->mapping->host;
+
+	/* Cancel any unstarted writes on this page */
+	if (offset == 0)
+		nfs_sync_inode_wait(inode, page->index, 1, FLUSH_INVALIDATE);
 }
 
 static int nfs_release_page(struct page *page, gfp_t gfp)
@@ -373,7 +360,6 @@ #endif
 		if (result)
 			goto out;
 	}
-	nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping);
 
 	result = count;
 	if (!count)
fs/nfs/idmap.c +0 -1
index 3fab5b0..b81e7ed 100644
@@ -47,7 +47,6 @@ #include <linux/sunrpc/clnt.h>
 #include <linux/workqueue.h>
 #include <linux/sunrpc/rpc_pipe_fs.h>
 
-#include <linux/nfs_fs_sb.h>
 #include <linux/nfs_fs.h>
 
 #include <linux/nfs_idmap.h>
fs/nfs/inode.c +67 -1248

1,549 lines not on this page · raw message

fs/nfs/internal.h new file +186 -0

186 lines not on this page · raw message

fs/nfs/namespace.c new file +229 -0

229 lines not on this page · raw message

fs/nfs/nfs2xdr.c +5 -3
index f0015fa..3b939e0 100644
@@ -23,12 +23,13 @@ #include <linux/sunrpc/clnt.h>
 #include <linux/nfs.h>
 #include <linux/nfs2.h>
 #include <linux/nfs_fs.h>
+#include "internal.h"
+
+#include "internal.h"
 
 #define NFSDBG_FACILITY		NFSDBG_XDR
 /* #define NFS_PARANOIA 1 */
 
-extern int			nfs_stat_to_errno(int stat);
-
 /* Mapping from NFS error code to "errno" error code. */
 #define errno_NFSERR_IO		EIO
 
@@ -131,7 +132,8 @@ xdr_decode_fattr(u32 *p, struct nfs_fatt
 	fattr->du.nfs2.blocksize = ntohl(*p++);
 	rdev = ntohl(*p++);
 	fattr->du.nfs2.blocks = ntohl(*p++);
-	fattr->fsid_u.nfs3 = ntohl(*p++);
+	fattr->fsid.major = ntohl(*p++);
+	fattr->fsid.minor = 0;
 	fattr->fileid = ntohl(*p++);
 	p = xdr_decode_time(p, &fattr->atime);
 	p = xdr_decode_time(p, &fattr->mtime);
fs/nfs/nfs3acl.c +8 -3
index 3328787..7322da4 100644
@@ -172,8 +172,10 @@ static void nfs3_cache_acls(struct inode
 		inode->i_ino, acl, dfacl);
 	spin_lock(&inode->i_lock);
 	__nfs3_forget_cached_acls(NFS_I(inode));
-	nfsi->acl_access = posix_acl_dup(acl);
-	nfsi->acl_default = posix_acl_dup(dfacl);
+	if (!IS_ERR(acl))
+		nfsi->acl_access = posix_acl_dup(acl);
+	if (!IS_ERR(dfacl))
+		nfsi->acl_default = posix_acl_dup(dfacl);
 	spin_unlock(&inode->i_lock);
 }
 
@@ -254,7 +256,9 @@ struct posix_acl *nfs3_proc_getacl(struc
 			res.acl_access = NULL;
 		}
 	}
-	nfs3_cache_acls(inode, res.acl_access, res.acl_default);
+	nfs3_cache_acls(inode,
+		(res.mask & NFS_ACL)   ? res.acl_access  : ERR_PTR(-EINVAL),
+		(res.mask & NFS_DFACL) ? res.acl_default : ERR_PTR(-EINVAL));
 
 	switch(type) {
 		case ACL_TYPE_ACCESS:
@@ -329,6 +333,7 @@ static int nfs3_proc_setacls(struct inod
 	switch (status) {
 		case 0:
 			status = nfs_refresh_inode(inode, &fattr);
+			nfs3_cache_acls(inode, acl, dfacl);
 			break;
 		case -EPFNOSUPPORT:
 		case -EPROTONOSUPPORT:
fs/nfs/nfs3proc.c +1 -4
index cf186f0..7143b1f 100644
@@ -20,11 +20,10 @@ #include <linux/smp_lock.h>
 #include <linux/nfs_mount.h>
 
 #include "iostat.h"
+#include "internal.h"
 
 #define NFSDBG_FACILITY		NFSDBG_PROC
 
-extern struct rpc_procinfo nfs3_procedures[];
-
 /* A wrapper to handle the EJUKEBOX error message */
 static int
 nfs3_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)
@@ -809,8 +808,6 @@ nfs3_proc_pathconf(struct nfs_server *se
 	return status;
 }
 
-extern u32 *nfs3_decode_dirent(u32 *, struct nfs_entry *, int);
-
 static int nfs3_read_done(struct rpc_task *task, struct nfs_read_data *data)
 {
 	if (nfs3_async_handle_jukebox(task, data->inode))
fs/nfs/nfs3xdr.c +3 -3
index ec23361..0250269 100644
@@ -22,14 +22,13 @@ #include <linux/nfs.h>
 #include <linux/nfs3.h>
 #include <linux/nfs_fs.h>
 #include <linux/nfsacl.h>
+#include "internal.h"
 
 #define NFSDBG_FACILITY		NFSDBG_XDR
 
 /* Mapping from NFS error code to "errno" error code. */
 #define errno_NFSERR_IO		EIO
 
-extern int			nfs_stat_to_errno(int);
-
 /*
  * Declare the space requirements for NFS arguments and replies as
  * number of 32bit-words
@@ -166,7 +165,8 @@ xdr_decode_fattr(u32 *p, struct nfs_fatt
 	if (MAJOR(fattr->rdev) != major || MINOR(fattr->rdev) != minor)
 		fattr->rdev = 0;
 
-	p = xdr_decode_hyper(p, &fattr->fsid_u.nfs3);
+	p = xdr_decode_hyper(p, &fattr->fsid.major);
+	fattr->fsid.minor = 0;
 	p = xdr_decode_hyper(p, &fattr->fileid);
 	p = xdr_decode_time3(p, &fattr->atime);
 	p = xdr_decode_time3(p, &fattr->mtime);
fs/nfs/nfs4_fs.h +4 -0
index 0f5e4e7..9a10286 100644
@@ -217,6 +217,9 @@ extern int nfs4_proc_renew(struct nfs4_c
 extern int nfs4_do_close(struct inode *inode, struct nfs4_state *state);
 extern struct dentry *nfs4_atomic_open(struct inode *, struct dentry *, struct nameidata *);
 extern int nfs4_open_revalidate(struct inode *, struct dentry *, int, struct nameidata *);
+extern int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle);
+extern int nfs4_proc_fs_locations(struct inode *dir, struct dentry *dentry,
+		struct nfs4_fs_locations *fs_locations, struct page *page);
 
 extern struct nfs4_state_recovery_ops nfs4_reboot_recovery_ops;
 extern struct nfs4_state_recovery_ops nfs4_network_partition_recovery_ops;
@@ -225,6 +228,7 @@ extern const u32 nfs4_fattr_bitmap[2];
 extern const u32 nfs4_statfs_bitmap[2];
 extern const u32 nfs4_pathconf_bitmap[2];
 extern const u32 nfs4_fsinfo_bitmap[2];
+extern const u32 nfs4_fs_locations_bitmap[2];
 
 /* nfs4renewd.c */
 extern void nfs4_schedule_state_renewal(struct nfs4_client *);
fs/nfs/nfs4namespace.c new file +201 -0

201 lines not on this page · raw message

fs/nfs/nfs4proc.c +102 -9

112 lines not on this page · raw message

fs/nfs/nfs4xdr.c +212 -6

218 lines not on this page · raw message

fs/nfs/pagelist.c +30 -21

51 lines not on this page · raw message

fs/nfs/proc.c +1 -4
index 9dd85ca..b3899ea 100644

Lines of this file are not shown. View the raw message.

fs/nfs/read.c +81 -41

122 lines not on this page · raw message

fs/nfs/super.c new file +1537 -0

1,537 lines not on this page · raw message

fs/nfs/symlink.c +2 -11
index 18dc95b..600bbe6 100644

Lines of this file are not shown. View the raw message.

fs/nfs/sysctl.c +10 -0
index 4c486eb..db61e51 100644

Lines of this file are not shown. View the raw message.

fs/nfs/write.c +33 -16

49 lines not on this page · raw message

fs/super.c +0 -2
index 057b532..8a669f6 100644

Lines of this file are not shown. View the raw message.

include/linux/fs.h +2 -2
index dba4cbd..2d8b348 100644

Lines of this file are not shown. View the raw message.

include/linux/lockd/lockd.h +3 -1
index a8876bc..aa4fe90 100644

Lines of this file are not shown. View the raw message.

include/linux/mount.h +8 -0
index 60718f1..403d1a9 100644

Lines of this file are not shown. View the raw message.

include/linux/nfs4.h +1 -0
index 1059e6d..5f681d5 100644

Lines of this file are not shown. View the raw message.

include/linux/nfs_fs.h +41 -21

62 lines not on this page · raw message

include/linux/nfs_fs_sb.h +1 -0
index 65dec21..6b4a13c 100644

Lines of this file are not shown. View the raw message.

include/linux/nfs_page.h +2 -3
index 66e2ed6..1f7bd28 100644

Lines of this file are not shown. View the raw message.

include/linux/nfs_xdr.h +50 -11

61 lines not on this page · raw message

include/linux/sunrpc/xdr.h +1 -0
index 84c35d4..e6d3d34 100644

Lines of this file are not shown. View the raw message.

mm/shmem.c +1 -1
index 84b5cf9..38bc333 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/auth_null.c +2 -0
index f56767a..2eccffa 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/auth_unix.c +1 -0
index df14b6b..74c7406 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/rpc_pipe.c +1 -1
index 8241fa7..dafe793 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/xdr.c +26 -2
index ca4bfa5..49174f0 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/xprt.c +2 -2
index 4dd5b3c..02060d0 100644

Lines of this file are not shown. View the raw message.

net/sunrpc/xprtsock.c +9 -2
index 4b4e7df..21006b1 100644

Lines of this file are not shown. View the raw message.

security/inode.c +1 -1
index e6fc29a..98a0df5 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 4 lines · Trond Myklebust

Please pull from the repository at

   git pull git://git.linux-nfs.org/pub/linux/nfs-2.6.git

This is broken.

CC fs/nfs/nfs2xdr.o
In file included from fs/nfs/nfs2xdr.c:28:
fs/nfs/internal.h:7: error: redefinition of 'struct nfs_clone_mount' fs/nfs/internal.h:99: error: redefinition of 'nfs4_path' fs/nfs/internal.h:99: error: previous definition of 'nfs4_path' was here fs/nfs/internal.h:113: error: redefinition of 'nfs_devname' fs/nfs/internal.h:113: error: previous definition of 'nfs_devname' was here fs/nfs/internal.h:122: error: redefinition of 'nfs_block_bits' fs/nfs/internal.h:122: error: previous definition of 'nfs_block_bits' was here fs/nfs/internal.h:141: error: redefinition of 'nfs_calc_block_size' fs/nfs/internal.h:141: error: previous definition of 'nfs_calc_block_size' was here fs/nfs/internal.h:151: error: redefinition of 'nfs_block_size' fs/nfs/internal.h:151: error: previous definition of 'nfs_block_size' was here fs/nfs/internal.h:165: error: redefinition of 'nfs_super_set_maxbytes' fs/nfs/internal.h:165: error: previous definition of 'nfs_super_set_maxbytes' was here fs/nfs/internal.h:175: error: redefinition of 'valid_ipaddr4' fs/nfs/internal.h:175: error: previous definition of 'valid_ipaddr4' was here make[2]: *** [fs/nfs/nfs2xdr.o] Error 1
make[1]: *** [fs/nfs] Error 2
make: *** [fs] Error 2

Looks like a merge error, causing that "internal.h" file to be included twice.

Alternatively, you're applying patches without "--fuzz=0", which allowed Andrew's "git-nfs-build-fixes" patch to be applied wice.

In either case, it came from your tree, and had apparently never even been compile-tested.

Tssk, tssk..

Linus

Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs