Age | Commit message (Collapse) | Author | Files | Lines |
|
The only real user of this header is fs/nfsd/nfsfh.h, so merge the
two. Various lockѕ source files used it to indirectly get other
sunrpc or nfs headers, so fix those up.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
|
|
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
|
|
When mnt_want_write() starts to handle freezing it will get a full lock
semantics requiring proper lock ordering. So push mnt_want_write() call
consistently outside of i_mutex.
CC: linux-nfs@vger.kernel.org
CC: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
|
|
Userspace shouldn't have a use for these constants. Nothing here is
used outside fs/nfsd.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
|
|
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
|
|
Whoops, missed some more.
"Reviewed-by, I guess": Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
|
|
Minor typos.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
|
|
Most of this can be trivially moved to a private header as well.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
|
|
* Add includes that are directly used by headers
* Remove includes that are not needed
These are the changes made:
[xdr.h]
struct nfsd_readdirres has an embedded struct readdir_cd from nfsd.h
fixing that we can drop other includes
[xdr4.h]
embedded types defined both at state.h and nfsd.h
[syscall.h]
After export.h fix none of these stuff is needed.
fix extra space in # include <> statement
[stats.h]
does not need <linux/nfs4.h> but was export to user-mode
so I don't touch it
[state.h]
embedded types from nfsfh.h like struct knfsd_fh. bringing that
eliminates the need for all other includes
[nfsfh.h]
directly manipulating types from sunrpc/svc.h.
Removed Other unused headers.
[nfsd.h]
removed unused headers include
[export.h]
lots of sunrpc/svc.h types and a single prototype declaration
with pointer from nfsfh.h, but all users of export.h do need
nfsfh.h any way. remove now un-needed include.
[const.h]
Unfixed (not independent)
[cache.h]
could do with a forward declaration of "struct svc_rqst;"
from sunrpc/svc.h but all users absolutely will need
sunrpc/svc.h it is easier overall this way.
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
|
|
This doesn't appear to be useful.
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
|
|
ext4 supports a real NFSv4 change attribute, which is bumped whenever
the ctime would be updated, including times when two updates arrive
within a jiffy of each other. (Note that although ext4 has space for
nanosecond-precision ctime, the real resolution is lower: it actually
uses jiffies as the time-source.) This ensures clients will invalidate
their caches when they need to.
There is some fear that keeping the i_version up-to-date could have
performance drawbacks, so for now it's turned on only by a mount option.
We hope to do something better eventually.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: Theodore Tso <tytso@mit.edu>
|
|
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
|
|
fix the following 'make headers_check' warnings:
usr/include/linux/nfsd/nfsfh.h:17: include of <linux/types.h> is preferred over <asm/types.h>
usr/include/linux/nfsd/nfsfh.h:28: found __[us]{8,16,32,64} type without #include <linux/types.h>
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
|
|
Descriptions taken from mountd code (in nfs-utils/utils/mountd/cache.c).
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
|
|
Modify the NFS server code to support 64 bit ino's, as
appropriate for the system and the NFS protocol version.
The gist of the changes is to query the underlying file system
for attributes and not just to use the cached attributes in the
inode. For this specific purpose, the inode only contains an
ino field which unsigned long, which is large enough on 64 bit
platforms, but is not large enough on 32 bit platforms.
I haven't been able to find any reason why ->getattr can't be called
while i_mutex. The specification indicates that i_mutex is not
required to be held in order to invoke ->getattr, but it doesn't say
that i_mutex can't be held while invoking ->getattr.
I also haven't come to any conclusions regarding the value of
lease_get_mtime() and whether it should or should not be invoked
by fill_post_wcc() too. I chose not to change this because I
thought that it was safer to leave well enough alone. If we
decide to make a change, it can be done separately.
Signed-off-by: Peter Staubach <staubach@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Acked-by: Neil Brown <neilb@suse.de>
|
|
Add support for using a filesystem UUID to identify and export point in the
filehandle.
For NFSv2, this UUID is xor-ed down to 4 or 8 bytes so that it doesn't take up
too much room. For NFSv3+, we use the full 16 bytes, and possibly also a
64bit inode number for exports beneath the root of a filesystem.
When generating an fsid to return in 'stat' information, use the UUID (hashed
down to size) if it is available and a small 'fsid' was not specifically
provided.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
A couple of the warnings will be followed by an Oops if they ever fire, so may
as well be BUG_ON. Another isn't obviously fatal but has never been known to
fire, so make it a WARN_ON.
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Acked-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Acked-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
while doing a kernel make modules_install install over an NFS mount.
=============================================
[ INFO: possible recursive locking detected ]
---------------------------------------------
nfsd/9550 is trying to acquire lock:
(&inode->i_mutex){--..}, at: [<c034c845>] mutex_lock+0x1c/0x1f
but task is already holding lock:
(&inode->i_mutex){--..}, at: [<c034c845>] mutex_lock+0x1c/0x1f
other info that might help us debug this:
2 locks held by nfsd/9550:
#0: (hash_sem){..--}, at: [<cc895223>] exp_readlock+0xd/0xf [nfsd]
#1: (&inode->i_mutex){--..}, at: [<c034c845>] mutex_lock+0x1c/0x1f
stack backtrace:
[<c0103508>] show_trace_log_lvl+0x58/0x152
[<c0103b8b>] show_trace+0xd/0x10
[<c0103c2f>] dump_stack+0x19/0x1b
[<c012aa57>] __lock_acquire+0x77a/0x9a3
[<c012af4a>] lock_acquire+0x60/0x80
[<c034c6c2>] __mutex_lock_slowpath+0xa7/0x20e
[<c034c845>] mutex_lock+0x1c/0x1f
[<c0162edc>] vfs_unlink+0x34/0x8a
[<cc891d98>] nfsd_unlink+0x18f/0x1e2 [nfsd]
[<cc89884f>] nfsd3_proc_remove+0x95/0xa2 [nfsd]
[<cc88f0d4>] nfsd_dispatch+0xc0/0x178 [nfsd]
[<c033e84d>] svc_process+0x3a5/0x5ed
[<cc88f5ba>] nfsd+0x1a7/0x305 [nfsd]
[<c0101005>] kernel_thread_helper+0x5/0xb
DWARF2 unwinder stuck at kernel_thread_helper+0x5/0xb
Leftover inexact backtrace:
[<c0103b8b>] show_trace+0xd/0x10
[<c0103c2f>] dump_stack+0x19/0x1b
[<c012aa57>] __lock_acquire+0x77a/0x9a3
[<c012af4a>] lock_acquire+0x60/0x80
[<c034c6c2>] __mutex_lock_slowpath+0xa7/0x20e
[<c034c845>] mutex_lock+0x1c/0x1f
[<c0162edc>] vfs_unlink+0x34/0x8a
[<cc891d98>] nfsd_unlink+0x18f/0x1e2 [nfsd]
[<cc89884f>] nfsd3_proc_remove+0x95/0xa2 [nfsd]
[<cc88f0d4>] nfsd_dispatch+0xc0/0x178 [nfsd]
[<c033e84d>] svc_process+0x3a5/0x5ed
[<cc88f5ba>] nfsd+0x1a7/0x305 [nfsd]
[<c0101005>] kernel_thread_helper+0x5/0xb
=============================================
[ INFO: possible recursive locking detected ]
---------------------------------------------
nfsd/9580 is trying to acquire lock:
(&inode->i_mutex){--..}, at: [<c034cc1d>] mutex_lock+0x1c/0x1f
but task is already holding lock:
(&inode->i_mutex){--..}, at: [<c034cc1d>] mutex_lock+0x1c/0x1f
other info that might help us debug this:
2 locks held by nfsd/9580:
#0: (hash_sem){..--}, at: [<cc89522b>] exp_readlock+0xd/0xf [nfsd]
#1: (&inode->i_mutex){--..}, at: [<c034cc1d>] mutex_lock+0x1c/0x1f
stack backtrace:
[<c0103508>] show_trace_log_lvl+0x58/0x152
[<c0103b8b>] show_trace+0xd/0x10
[<c0103c2f>] dump_stack+0x19/0x1b
[<c012aa63>] __lock_acquire+0x77a/0x9a3
[<c012af56>] lock_acquire+0x60/0x80
[<c034ca9a>] __mutex_lock_slowpath+0xa7/0x20e
[<c034cc1d>] mutex_lock+0x1c/0x1f
[<cc892ad1>] nfsd_setattr+0x2c8/0x499 [nfsd]
[<cc893ede>] nfsd_create_v3+0x31b/0x4ac [nfsd]
[<cc8984a1>] nfsd3_proc_create+0x128/0x138 [nfsd]
[<cc88f0d4>] nfsd_dispatch+0xc0/0x178 [nfsd]
[<c033ec1d>] svc_process+0x3a5/0x5ed
[<cc88f5ba>] nfsd+0x1a7/0x305 [nfsd]
[<c0101005>] kernel_thread_helper+0x5/0xb
DWARF2 unwinder stuck at kernel_thread_helper+0x5/0xb
Leftover inexact backtrace:
[<c0103b8b>] show_trace+0xd/0x10
[<c0103c2f>] dump_stack+0x19/0x1b
[<c012aa63>] __lock_acquire+0x77a/0x9a3
[<c012af56>] lock_acquire+0x60/0x80
[<c034ca9a>] __mutex_lock_slowpath+0xa7/0x20e
[<c034cc1d>] mutex_lock+0x1c/0x1f
[<cc892ad1>] nfsd_setattr+0x2c8/0x499 [nfsd]
[<cc893ede>] nfsd_create_v3+0x31b/0x4ac [nfsd]
[<cc8984a1>] nfsd3_proc_create+0x128/0x138 [nfsd]
[<cc88f0d4>] nfsd_dispatch+0xc0/0x178 [nfsd]
[<c033ec1d>] svc_process+0x3a5/0x5ed
[<cc88f5ba>] nfsd+0x1a7/0x305 [nfsd]
[<c0101005>] kernel_thread_helper+0x5/0xb
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Neil Brown <neilb@suse.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
This eliminates the i_blksize field from struct inode. Filesystems that want
to provide a per-inode st_blksize can do so by providing their own getattr
routine instead of using the generic_fillattr() function.
Note that some filesystems were providing pretty much random (and incorrect)
values for i_blksize.
[bunk@stusta.de: cleanup]
[akpm@osdl.org: generic_fillattr() fix]
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
|
|
This patch converts the inode semaphore to a mutex. I have tested it on
XFS and compiled as much as one can consider on an ia64. Anyway your
luck with it might be different.
Modified-by: Ingo Molnar <mingo@elte.hu>
(finished the conversion)
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
|
|
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
|