summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | SUNRPC: Remove unused function rpc_get_timeout()Trond Myklebust2017-02-092-16/+0Star
| | | | | | | | | | | | | | | Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFSv4: Fix memory and state leak in _nfs4_open_and_get_stateTrond Myklebust2017-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we exit because the file access check failed, we currently leak the struct nfs4_state. We need to attach it to the open context before returning. Fixes: 3efb9722475e ("NFSv4: Refactor _nfs4_open_and_get_state..") Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | sunrpc: use simple_read_from_buffer for reading cache flushKinglong Mee2017-02-081-12/+3Star
| | | | | | | | | | | | | | | Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | sunrpc: record rpc client pointer in seq->private directlyKinglong Mee2017-02-081-25/+10Star
| | | | | | | | | | | | | | | | | | | | | pos in rpc_clnt_iter is useless, drop it and record clnt in seq_private. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | sunrpc: update the comments of sunrpc proc pathKinglong Mee2017-02-081-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | sunrpc: remove dead codes of cr_magic in rpc_credKinglong Mee2017-02-083-11/+0Star
| | | | | | | | | | | | | | | | | | | | | Don't found any place using the cr_magic. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | sunrpc: rename NFS_NGROUPS to UNX_NGROUPS for auth unixKinglong Mee2017-02-083-12/+11Star
| | | | | | | | | | | | | | | | | | | | | NFS_NGROUPS has been move to sunrpc, rename to UNX_NGROUPS. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | sunrpc/nfs: cleanup procfs/pipefs entry in cache_detailKinglong Mee2017-02-083-46/+21Star
| | | | | | | | | | | | | | | | | | | | | Record flush/channel/content entries is useless, remove them. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | sunrpc: error out if register_shrinker failKinglong Mee2017-02-081-1/+5
| | | | | | | | | | | | | | | | | | | | | register_shrinker may return error when register fail, error out. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | nfs: no PG_private waiters remain, remove wakerNicholas Piggin2017-02-081-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 4f52b6bb ("NFS: Don't call COMMIT in ->releasepage()"), no tasks wait on PagePrivate, so the wake introduced in commit 95905446 ("NFS: avoid deadlocks with loop-back mounted NFS filesystems.") can be removed. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: nfs_rename() handle -ERESTARTSYS dentry left behindBenjamin Coddington2017-02-081-11/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An interrupted rename will leave the old dentry behind if the rename succeeds. Fix this by moving the final local work of the rename to rpc_call_done so that the results of the RENAME can always be handled, even if the original process has already returned with -ERESTARTSYS. Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFSv4: Fix warning for using 0 as NULLWei Yongjun2017-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following sparse warning: fs/nfs/nfs4state.c:862:60: warning: Using plain integer as NULL pointer Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | pNFS/flexfiles: Make local symbol layoutreturn_ops staticWei Yongjun2017-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following sparse warning: fs/nfs/flexfilelayout/flexfilelayout.c:2114:34: warning: symbol 'layoutreturn_ops' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Return the comparison result directly in nfs41_match_stateid()Anna Schumaker2017-01-301-3/+1Star
| | | | | | | | | | | | Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Clean up nfs41_same_server_scope()Anna Schumaker2017-01-301-5/+3Star
| | | | | | | | | | | | | | | | | | | | | The function is cleaner this way, since we can use the result of memcmp() directly Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: No need to set and return status in nfs41_lock_expired()Anna Schumaker2017-01-301-2/+1Star
| | | | | | | | | | | | Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Remove unnecessary goto in nfs4_lookup_root_sec()Anna Schumaker2017-01-301-8/+3Star
| | | | | | | | | | | | | | | | | | Once again, it's easier and cleaner just to return the error directly. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Remove nfs4_recover_expired_lease()Anna Schumaker2017-01-301-6/+1Star
| | | | | | | | | | | | | | | | | | | | | This function doesn't add much, since all it does is access the server's nfs_client variable. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Remove an extra if in _nfs4_recover_proc_open()Anna Schumaker2017-01-301-4/+1Star
| | | | | | | | | | | | | | | | | | It's simpler just to return the status unconditionally Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Return errors directly in _nfs4_opendata_reclaim_to_nfs4_state()Anna Schumaker2017-01-301-8/+3Star
| | | | | | | | | | | | | | | | | | | | | There is no need for a goto just to return an error code without any cleanup. Returning the error directly helps to clean up the code. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Remove nfs4_wait_for_completion_rpc_task()Anna Schumaker2017-01-301-15/+7Star
| | | | | | | | | | | | Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Clean up _nfs4_is_integrity_protected()Anna Schumaker2017-01-301-6/+1Star
| | | | | | | | | | | | | | | | | | | | | We can cut out the if statement and return the results of the comparison directly. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Fix inconsistent indentation in nfs4proc.cAnna Schumaker2017-01-301-28/+28
| | | | | | | | | | | | Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Make trace_nfs4_setup_sequence() available to NFS v4.0Anna Schumaker2017-01-303-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | This tracepoint displays information about the slot that was chosen for the RPC, in addition to session information. This could be useful information for debugging, and we can set the session id hash to 0 to indicate that there is no session. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Merge the remaining setup_sequence functionsAnna Schumaker2017-01-301-67/+20Star
| | | | | | | | | | | | | | | | | | | | | This creates a single place for all the work to happen, using the presence of a session to determine if extra values need to be set. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Check if the slot table is draining from nfs4_setup_sequence()Anna Schumaker2017-01-301-14/+9Star
| | | | | | | | | | | | Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Handle setup sequence task rescheduling in a single placeAnna Schumaker2017-01-301-22/+15Star
| | | | | | | | | | | | Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Lock the slot table from a single place during setup sequenceAnna Schumaker2017-01-301-13/+12Star
| | | | | | | | | | | | | | | | | | Rather than implementing this twice for NFS v4.0 and v4.1 Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Move slot-already-allocated check into nfs_setup_sequence()Anna Schumaker2017-01-301-10/+9Star
| | | | | | | | | | | | | | | | | | | | | This puts the check in a single place, rather than needing to implement it twice for v4.0 and v4.1. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Create a single nfs4_setup_sequence() functionAnna Schumaker2017-01-301-47/+29Star
| | | | | | | | | | | | | | | | | | | | | The inline ifdef lets us put everything in a single place, rather than having two (very similar) versions of this function. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Use nfs4_setup_sequence() everywhereAnna Schumaker2017-01-305-52/+33Star
| | | | | | | | | | | | | | | | | | | | | This does the right thing depending on if we have a session, rather than needing to handle this manually in multiple places. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Change nfs4_setup_sequence() to take an nfs_client structureAnna Schumaker2017-01-301-16/+15Star
| | | | | | | | | | | | | | | | | | | | | | | | I want to have all callers use this function, rather than calling the NFS v4.0 and v4.1 versions directly. This includes pNFS, which only has access to the nfs_client structure in some places. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Change nfs4_get_session() to take an nfs_client structureAnna Schumaker2017-01-303-10/+9Star
| | | | | | | | | | | | | | | | | | | | | | | | pNFS only has access to the nfs_client structure, and not the nfs_server, so we need to make this change so the function can be used by pNFS as well. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: Move nfs4_get_session() into nfs4_session.hAnna Schumaker2017-01-303-10/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | This puts session related functions together in the same space. I only keep one version of this function, since this variable will always be NULL when using NFS v4.0. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | NFS: tidy up nfs_show_mountd_netidNeilBrown2017-01-301-14/+7Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is a bit clumsy, incorrectly producing ",mountproto=" if mountd_protocol is 0 and !showdefaults, and duplicating the code for reporting "auto". Tidy it up so that it only makes a single seq_printf() call, and more obviously does the right thing. Fixes: ee671b016fbf ("NFS: convert proto= option to use netids rather than a protoname") Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | SUNRPC: two small improvements to rpcauth shrinker.NeilBrown2017-01-301-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1/ If we find an entry that is too young to be pruned, return SHRINK_STOP to ensure we don't get called again. This is more correct, and avoids wasting a little CPU time. Prior to 3.12, it can prevent drop_slab() from spinning indefinitely. 2/ Return a precise number from rpcauth_cache_shrink_count(), rather than rounding down to a multiple of 100 (of whatever sysctl_vfs_cache_pressure is). This ensures that when we "echo 3 > /proc/sys/vm/drop_caches", this cache is still purged, even if it has fewer than 100 entires. Neither of these are really important, they just make behaviour more predicatable, which can be helpful when debugging related issues. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
| * | sunrpc & nfs: Add and use dprintk_cont macrosJoe Perches2017-01-302-21/+43
| | | | | | | | | | | | | | | | | | | | | | | | Allow line continuations to work properly with KERN_CONT. Signed-off-by: Joe Perches <joe@perches.com> [Anna: Add fallback dprintk_cont() for when CONFIG_SUNRPC_DEBUG=n] Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
* | | Merge tag 'for-f2fs-4.11' of ↵Linus Torvalds2017-03-0221-810/+1966
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "This round introduces several interesting features such as on-disk NAT bitmaps, IO alignment, and a discard thread. And it includes a couple of major bug fixes as below. Enhancements: - introduce on-disk bitmaps to avoid scanning NAT blocks when getting free nids - support IO alignment to prepare open-channel SSD integration in future - introduce a discard thread to avoid long latency during checkpoint and fstrim - use SSR for warm node and enable inline_xattr by default - introduce in-memory bitmaps to check FS consistency for debugging - improve write_begin by avoiding needless read IO Bug fixes: - fix broken zone_reset behavior for SMR drive - fix wrong victim selection policy during GC - fix missing behavior when preparing discard commands - fix bugs in atomic write support and fiemap - workaround to handle multiple f2fs_add_link calls having same name ... and it includes a bunch of clean-up patches as well" * tag 'for-f2fs-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (97 commits) f2fs: avoid to flush nat journal entries f2fs: avoid to issue redundant discard commands f2fs: fix a plint compile warning f2fs: add f2fs_drop_inode tracepoint f2fs: Fix zoned block device support f2fs: remove redundant set_page_dirty() f2fs: fix to enlarge size of write_io_dummy mempool f2fs: fix memory leak of write_io_dummy mempool during umount f2fs: fix to update F2FS_{CP_}WB_DATA count correctly f2fs: use MAX_FREE_NIDS for the free nids target f2fs: introduce free nid bitmap f2fs: new helper cur_cp_crc() getting crc in f2fs_checkpoint f2fs: update the comment of default nr_pages to skipping f2fs: drop the duplicate pval in f2fs_getxattr f2fs: Don't update the xattr data that same as the exist f2fs: kill __is_extent_same f2fs: avoid bggc->fggc when enough free segments are avaliable after cp f2fs: select target segment with closer temperature in SSR mode f2fs: show simple call stack in fault injection message f2fs: no need lock_op in f2fs_write_inline_data ...
| * | | f2fs: avoid to flush nat journal entriesJaegeuk Kim2017-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a missing condition which flushes nat journal entries unnecessarily introduced by: f2fs: add bitmaps for empty or full NAT blocks Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| * | | f2fs: avoid to issue redundant discard commandsJaegeuk Kim2017-02-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If segs_per_sec is over 1 like under SMR, previously f2fs issues discard commands redundantly on the same section, since we didn't move end position for the previous discard command. E.g., start end | | prefree_bitmap = [01111100111100] And, after issue discard for this section, end start | | prefree_bitmap = [01111100111100] Select this section again by searching from (end + 1), start end | | prefree_bitmap = [01111100111100] Fixes: 36abef4e796d38 ("f2fs: introduce mode=lfs mount option") Cc: <stable@vger.kernel.org> Cc: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| * | | f2fs: fix a plint compile warningHou Pengyang2017-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix such pclint warning: ... Loss of precision (arg. no. 2) (unsigned long long to unsigned int)) Signed-off-by: Hou Pengyang <houpengyang@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| * | | f2fs: add f2fs_drop_inode tracepointHou Pengyang2017-02-272-2/+12
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Hou Pengyang <houpengyang@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| * | | f2fs: Fix zoned block device supportMasato Suzuki2017-02-271-23/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The introduction of the multi-device feature partially broke the support for zoned block devices. In the function f2fs_scan_devices, sbi->devs allocation and initialization is skipped in the case of a single device mount. This result in no device information structure being allocated for the device. This is fine if the device is a regular device, but in the case of a zoned block device, the device zone type array is not initialized, which causes the function __f2fs_issue_discard_zone to fail as get_blkz_type is unable to determine the zone type of a section. Fix this by always allocating and initializing the sbi->devs device information array even in the case of a single device if that device is zoned. For this particular case, make sure to obtain a reference on the single device so that the call to blkdev_put() in destroy_device_list operates as expected. Fixes: 3c62be17d4f562f4 ("f2fs: support multiple devices") Cc: <stable@vger.kernel.org> # v4.10 Signed-off-by: Masato Suzuki <masato.suzuki@wdc.com> Acked-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| * | | f2fs: remove redundant set_page_dirty()Yunlei He2017-02-271-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch remove redundant set_page_dirty in truncate_blocks Signed-off-by: Yunlei He <heyunlei@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| * | | f2fs: fix to enlarge size of write_io_dummy mempoolChao Yu2017-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It needs to double cache size of write_io_dummy mempool, otherwise we may run out of cache in scenraio of Data/Node IOs were issued concurrently. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| * | | f2fs: fix memory leak of write_io_dummy mempool during umountChao Yu2017-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| * | | f2fs: fix to update F2FS_{CP_}WB_DATA count correctlyChao Yu2017-02-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We should only account F2FS_{CP_}WB_DATA IOs for write path, fix it. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| * | | f2fs: use MAX_FREE_NIDS for the free nids targetKinglong Mee2017-02-271-5/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | F2FS has define MAX_FREE_NIDS for maximum of cached free nids target. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| * | | f2fs: introduce free nid bitmapChao Yu2017-02-274-10/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In scenario of intensively node allocation, free nids will be ran out soon, then it needs to stop to load free nids by traversing NAT blocks, in worse case, if NAT blocks does not be cached in memory, it generates IOs which slows down our foreground operations. In order to speed up node allocation, in this patch we introduce a new free_nid_bitmap array, so there is an bitmap table for each NAT block, Once the NAT block is loaded, related bitmap cache will be switched on, and bitmap will be set during traversing nat entries in NAT block, later we can query and update nid usage status in memory completely. With such implementation, I expect performance of node allocation can be improved in the long-term after filesystem image is mounted. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| * | | f2fs: new helper cur_cp_crc() getting crc in f2fs_checkpointKinglong Mee2017-02-274-19/+15Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are four places that getting the crc value in f2fs_checkpoint, just add a new helper cur_cp_crc for them. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>