- 12 Jul, 2013 1 commit
-
-
Colin Cross authored
NFS calls the freezable helpers with locks held, which is unsafe and will cause lockdep warnings when 6aa9707 "lockdep: check that no locks held at freeze time" is reapplied (it was reverted in dbf520a). NFS shouldn't be doing this, but it has long-running syscalls that must hold a lock but also shouldn't block suspend. Until NFS freeze handling is rewritten to use a signal to exit out of the critical section, add new *_unsafe versions of the helpers that will not run the lockdep test when 6aa9707 is reapplied, and call them from NFS. In practice the likley result of holding the lock while freezing is that a second task blocked on the lock will never freeze, aborting suspend, but it is possible to manufacture a case using the cgroup freezer, the lock, and the suspend freezer to create a deadlock. Silencing the lockdep warning here will allow problems to be found in other drivers that may have a more serious deadlock risk, and prevent new problems from being added. Change-Id: Ia17d32cdd013a6517bdd5759da900970a4427170 Signed-off-by:
Colin Cross <ccross@android.com> Acked-by:
Pavel Machek <pavel@ucw.cz> Acked-by:
Tejun Heo <tj@kernel.org> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 28 Mar, 2012 1 commit
-
-
David Howells authored
Remove all #inclusions of asm/system.h preparatory to splitting and killing it. Performed with the following command: perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *` Signed-off-by:
David Howells <dhowells@redhat.com>
-
- 20 Mar, 2012 1 commit
-
-
Trond Myklebust authored
This allows us to turn on/off the dprintk() debugging interfaces for those distributions that don't ship the 'rpcdebug' utility. It also allows us to add Kbuild dependencies. Specifically, we already know that dprintk() in general relies on CONFIG_SYSCTL. Now it turns out that the NFS dprintks depend on CONFIG_CRC32 after we added support for the filehandle hash. Reported-by:
Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 10 Mar, 2012 1 commit
-
-
Fred Isaman authored
The radix tree is only being used to compile lists of reqs needing commit. It is simpler to just put the reqs directly into a list. Signed-off-by:
Fred Isaman <iisaman@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 07 Mar, 2012 2 commits
-
-
Weston Andros Adamson authored
Print the filehandle crc in two debug messages Signed-off-by:
Weston Andros Adamson <dros@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Weston Andros Adamson authored
Match wireshark's CRC-32 hash for easier debugging Signed-off-by:
Weston Andros Adamson <dros@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 06 Mar, 2012 1 commit
-
-
Trond Myklebust authored
The check for 'fh == NULL' needs to come _before_ we dereference fh. Reported-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 02 Mar, 2012 1 commit
-
-
Chuck Lever authored
For debugging, introduce a simplistic function to print NFS file handles on the system console. The main function is hooked into the dprintk debugging facility, but you can directly call the helper, _nfs_display_fhandle(), if you want to print a handle unconditionally. Signed-off-by:
Chuck Lever <chuck.lever@oracle.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 06 Feb, 2012 3 commits
-
-
Stanislav Kinsbursky authored
This patch makes ID's infrastructure network namespace aware. This was done mainly because of nfs_client_lock, which is desired to be per network namespace, but protects NFS clients ID's. NOTE: NFS client's net pointer have to be set prior to ID initialization, proper assignment was moved. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Stanislav Kinsbursky authored
This patch splits global list of NFS clients into per-net-ns array of lists. This looks more strict and clearer. BTW, this patch also makes "/proc/fs/nfsfs/servers" entry content depends on /proc mount owner pid namespace. See below for details. NOTE: few words about how was /proc/fs/nfsfs/ entries content show per network namespace done. This is a little bit tricky and not the best is could be. But it's cheap (proper fix for /proc conteinerization is a hard nut to crack). The idea is simple: take proper network namespace from pid namespace child reaper nsproxy of /proc/ mount creator. This actually means, that if there are 2 containers with different net namespace sharing pid namespace, then read of /proc/fs/nfsfs/ entries will always return content, taken from net namespace of pid namespace creator task (and thus second namespace set wil be unvisible). Signed-off-by:
Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Weston Andros Adamson authored
This patch addresses printks that have some context to show that they are from fs/nfs/, but for the sake of consistency now start with NFS: Signed-off-by:
Weston Andros Adamson <dros@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 01 Feb, 2012 2 commits
-
-
Stanislav Kinsbursky authored
This patch makes it possible to create NFS program entry ("/proc/net/rpc/nfs") in passed network namespace context instead of hard-coded "init_net". Signed-off-by:
Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Trond Myklebust authored
Currently, we will correctly optimise away a truncate that doesn't change the file size. However, in the case of open(O_TRUNC), we also want to optimise away the time changes. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 31 Jan, 2012 2 commits
-
-
Stanislav Kinsbursky authored
This patch implements blocklayout pipe creation and registration per each existent network namespace. This was achived by registering NFS per-net operations, responsible for blocklayout pipe allocation/register and unregister/destruction instead of initialization and destruction of static "bl_device_pipe" pipe (this one was removed). Note, than pointer to network blocklayout pipe is stored in per-net "nfs_net" structure, because allocating of one more per-net structure for blocklayout module looks redundant. This patch also changes dev_remove() function prototype (and all it's callers, where it' requied) by adding network namespace pointer parameter, which is used to discover proper blocklayout pipe for rpc_queue_upcall() call. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Stanislav Kinsbursky authored
This patch implements DNS resolver cache creation and registration for each alive network namespace context. This was done by registering NFS per-net operations, responsible for DNS cache allocation/register and unregister/destructioning instead of initialization and destruction of static "nfs_dns_resolve" cache detail (this one was removed). Pointer to network dns resolver cache is stored in new per-net "nfs_net" structure. This patch also changes nfs_dns_resolve_name() function prototype (and it's calls) by adding network pointer parameter, which is used to get proper DNS resolver cache pointer for do_cache_lookup_wait() call. Note: empty nfs_dns_resolver_init() and nfs_dns_resolver_destroy() functions will be used in next patch in the series. Signed-off-by:
Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 12 Jan, 2012 1 commit
-
-
Rusty Russell authored
module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Acked-by:
Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by:
Rusty Russell <rusty@rustcorp.com.au>
-
- 07 Jan, 2012 1 commit
-
-
Trond Myklebust authored
...so that we can do the uid/gid mapping outside the asynchronous RPC context. This fixes a bug in the current NFSv4 atomic open code where the client isn't able to determine what the true uid/gid fields of the file are, (because the asynchronous nature of the OPEN call denies it the ability to do an upcall) and so fills them with default values, marking the inode as needing revalidation. Unfortunately, in some cases, the VFS will do some additional sanity checks on the file, and may override the server's decision to allow the open because it sees the wrong owner/group fields. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 04 Jan, 2012 2 commits
-
-
Al Viro authored
Seeing that just about every destructor got that INIT_LIST_HEAD() copied into it, there is no point whatsoever keeping this INIT_LIST_HEAD in inode_init_once(); the cost of taking it into inode_init_always() will be negligible for pipes and sockets and negative for everything else. Not to mention the removal of boilerplate code from ->destroy_inode() instances... Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
No need to duplicate them in both callers; make it return ERR_PTR(-ENOMEM) on allocation failure instead of NULL and it'll be able to report rpc_lookup_cred() failures just fine. Callers are much happier that way... Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 06 Dec, 2011 1 commit
-
-
Jeff Layton authored
Allow the freezer to skip wait_on_bit_killable sleeps in the sunrpc layer. This should allow suspend and hibernate events to proceed, even when there are RPC's pending on the wire. Also, wrap the TASK_KILLABLE sleeps in NFS layer in freezer_do_not_count and freezer_count calls. This allows the freezer to skip tasks that are sleeping while looping on EJUKEBOX or NFS4ERR_DELAY sorts of errors. Signed-off-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Rafael J. Wysocki <rjw@sisk.pl>
-
- 04 Nov, 2011 1 commit
-
-
Jeff Layton authored
commit d953126a changed how nfs_atomic_lookup handles an -EISDIR return from an OPEN call. Prior to that patch, that caused the client to fall back to doing a normal lookup. When that patch went in, the code began returning that error to userspace. The d_revalidate codepath however never had the corresponding change, so it was still possible to end up with a NULL ctx->state pointer after that. That patch caused a regression. When we attempt to open a directory that does not have a cached dentry, that open now errors out with EISDIR. If you attempt the same open with a cached dentry, it will succeed. Fix this by reverting the change in nfs_atomic_lookup and allowing attempts to open directories to fall back to a normal lookup Also, add a NFSv4-specific f_ops->open routine that just returns -ENOTDIR. This should never be called if things are working properly, but if it ever is, then the dprintk may help in debugging. To facilitate this, a new file_operations field is also added to the nfs_rpc_ops struct. Cc: stable@kernel.org Signed-off-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 02 Nov, 2011 2 commits
-
-
Miklos Szeredi authored
Replace remaining direct i_nlink updates with a new set_nlink() updater function. Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz> Tested-by:
Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com> Signed-off-by:
Christoph Hellwig <hch@lst.de>
-
Miklos Szeredi authored
Replace direct i_nlink updates with the respective updater function (inc_nlink, drop_nlink, clear_nlink, inode_dec_link_count). Signed-off-by:
Miklos Szeredi <mszeredi@suse.cz>
-
- 18 Oct, 2011 1 commit
-
-
Trond Myklebust authored
Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 20 Jul, 2011 1 commit
-
-
Al Viro authored
just dentry, please... Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 15 Jun, 2011 2 commits
-
-
Andy Adamson authored
Commit 28331a46 "Ensure we request the ordinary fileid when doing readdirplus" changed the meaning of NFS_ATTR_FATTR_FILEID which used to be set when FATTR4_WORD1_MOUNTED_ON_FILED was requested. Allow nfs_fhget to succeed with only a mounted on fileid when crossing a mountpoint or a referral. Ask for the fileid of the absent file system if mounted_on_fileid is not supported. Signed-off-by:
Andy Adamson <andros@netapp.com> cc:stable@kernel.org [2.6.39] Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Peng Tao authored
nfs_update_inode will update isize if there is no queued pages. For pNFS, layoutcommit is supposed to change file size on server, the same effect as queued pages. nfs_update_inode may be called when dirty pages are written back (nfsi->npages==0) but layoutcommit is not sent, and it will change client file size according to server file size. Then client ends up losing what it just writes back in pNFS path. So we should skip updating client file size if file needs layoutcommit. Signed-off-by:
Peng Tao <peng_tao@emc.com> Cc: stable@kernel.org [2.6.39] Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 29 May, 2011 1 commit
-
-
Benny Halevy authored
NFSv4.1 LAYOUTRETURN implementation Currently, does not support layout-type payload encoding. Signed-off-by:
Alexandros Batsakis <batsakis@netapp.com> Signed-off-by:
Andy Adamson <andros@citi.umich.edu> Signed-off-by:
Andy Adamson <andros@netapp.com> Signed-off-by:
Dean Hildebrand <dhildeb@us.ibm.com> Signed-off-by:
Fred Isaman <iisaman@citi.umich.edu> Signed-off-by:
Fred Isaman <iisaman@netapp.com> Signed-off-by:
Marc Eshel <eshel@almaden.ibm.com> Signed-off-by:
Zhang Jingwang <zhangjingwang@nrchpc.ac.cn> [call pnfs_return_layout right before pnfs_destroy_layout] [remove assert_spin_locked from pnfs_clear_lseg_list] [remove wait parameter from the layoutreturn path.] [remove return_type field from nfs4_layoutreturn_args] [remove range from nfs4_layoutreturn_args] [no need to send layoutcommit from _pnfs_return_layout] [don't wait on sync layoutreturn] [fix layout stateid in layoutreturn args] [fixed NULL deref in _pnfs_return_layout] [removed recaim member of nfs4_layoutreturn_args] Signed-off-by:
Benny Halevy <bhalevy@panasas.com>
-
- 27 May, 2011 1 commit
-
-
Harshula Jayasuriya authored
Hi Trond, In nfs_update_inode debug output, print the current and new inode size when the file size changes on the NFS server. Signed-off-by:
Harshula Jayasuriya <harshula@redhat.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 24 Mar, 2011 1 commit
-
-
Bryan Schumaker authored
A submount may use different security than the parent mount does. We should figure out what sec flavor the submount uses at mount time. Signed-off-by:
Bryan Schumaker <bjschuma@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 23 Mar, 2011 2 commits
-
-
Fred Isaman authored
Implement all the hooks created in the previous patches. This requires exporting quite a few functions and adding a few structure fields. Signed-off-by:
Fred Isaman <iisaman@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Bryan Schumaker authored
nfs_opendir() created a context that held much more information than we need for a readdir. This patch introduces a slimmed-down nfs_open_dir_context that contains only the cookie and the cred used for RPC operations. The new context will eventually be used to help detect readdir loops. Signed-off-by:
Bryan Schumaker <bjschuma@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 10 Mar, 2011 1 commit
-
-
Frank Filz authored
(try3-resend) Fix nfs_compat_user_ino64 so it doesn't cause problems if bit 31 or 63 are set in fileid The problem was use of an int32, which when converted to a uint64 is sign extended resulting in a fileid that doesn't fit in 32 bits even though the intent of the function is to fit the fileid into 32 bits. Signed-off-by:
Frank Filz <ffilzlnx@us.ibm.com> Reviewed-by:
Jeff Layton <jlayton@redhat.com> [Trond: Added an include for compat.h] Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 25 Jan, 2011 2 commits
-
-
Trond Myklebust authored
If the call to nfs_wcc_update_inode() results in an attribute update, we need to ensure that the inode's attr_gencount gets bumped too, otherwise we are not protected against races with other GETATTR calls. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Tejun Heo authored
WQ_RESCUER is now an internal flag and should only be used in the workqueue implementation proper. Use WQ_MEM_RECLAIM instead. This doesn't introduce any functional difference. Signed-off-by:
Tejun Heo <tj@kernel.org> Cc: dm-devel@redhat.com Cc: Neil Brown <neilb@suse.de>
-
- 16 Jan, 2011 1 commit
-
-
David Howells authored
Make NFS use the new d_automount() dentry operation rather than abusing follow_link() on directories. Signed-off-by:
David Howells <dhowells@redhat.com> Acked-by:
Trond Myklebust <Trond.Myklebust@netapp.com> Acked-by:
Ian Kent <raven@themaw.net> Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 07 Jan, 2011 1 commit
-
-
Nick Piggin authored
RCU free the struct inode. This will allow: - Subsequent store-free path walking patch. The inode must be consulted for permissions when walking, so an RCU inode reference is a must. - sb_inode_list_lock to be moved inside i_lock because sb list walkers who want to take i_lock no longer need to take sb_inode_list_lock to walk the list in the first place. This will simplify and optimize locking. - Could remove some nested trylock loops in dcache code - Could potentially simplify things a bit in VM land. Do not need to take the page lock to follow page->mapping. The downsides of this is the performance cost of using RCU. In a simple creat/unlink microbenchmark, performance drops by about 10% due to inability to reuse cache-hot slab objects. As iterations increase and RCU freeing starts kicking over, this increases to about 20%. In cases where inode lifetimes are longer (ie. many inodes may be allocated during the average life span of a single inode), a lot of this cache reuse is not applicable, so the regression caused by this patch is smaller. The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU, however this adds some complexity to list walking and store-free path walking, so I prefer to implement this at a later date, if it is shown to be a win in real situations. I haven't found a regression in any non-micro benchmark so I doubt it will be a problem. Signed-off-by:
Nick Piggin <npiggin@kernel.dk>
-
- 06 Jan, 2011 2 commits
-
-
Fred Isaman authored
This is to prepare the way for sensible io draining. Instead of just removing the lseg from the list, we instead clear the VALID flag (preventing new io from grabbing references to the lseg) and remove the reference holding it in the list. Thus the lseg will be removed once any io in progress completes and any references still held are dropped. Signed-off-by:
Fred Isaman <iisaman@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
Andy Adamson authored
Use the small id to pointer translator service to provide a unique callback identifier per SETCLIENTID call used to identify the v4.0 callback service associated with the clientid. Signed-off-by:
Andy Adamson <andros@netapp.com> Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-
- 02 Dec, 2010 1 commit
-
-
Trond Myklebust authored
We need to ensure that the entries in the nfs_cache_array get cleared when the page is removed from the page cache. To do so, we use the freepage address_space operation. Change nfs_readdir_clear_array to use kmap_atomic(), so that the function can be safely called from all contexts. Finally, modify the cache_page_release helper to call nfs_readdir_clear_array directly, when dealing with an anonymous page from 'uncached_readdir'. Signed-off-by:
Trond Myklebust <Trond.Myklebust@netapp.com>
-