aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/flexfilelayout/flexfilelayout.c
AgeCommit message (Collapse)AuthorFilesLines
2015-08-12pnfs/flexfiles: LAYOUTSTATS ii_count should be ops instead of bytesPeng Tao1-3/+2
Turned out I misinterpreted the spec... Cc: Tom Haynes <[email protected]> Reported-by: Jean Spector <[email protected]> Signed-off-by: Peng Tao <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2015-07-08NFSv4.2/flexfiles: Fix a typo in the flexfiles layoutstats codeTrond Myklebust1-1/+1
Signed-off-by: Trond Myklebust <[email protected]>
2015-06-26pNFS/flexfiles: Fix the reset of struct pgio_header when resendingTrond Myklebust1-1/+1
hdr->good_bytes needs to be set to the length of the request, not zero. Cc: [email protected] # 4.0+ Signed-off-by: Trond Myklebust <[email protected]>
2015-06-26pNFS/flexfiles: Turn off layoutcommit for servers that don't need itTrond Myklebust1-1/+15
This patch ensures that we record the value of 'ffl_flags' from the layout, and then checks for the presence of the FF_FLAGS_NO_LAYOUTCOMMIT flag before deciding whether or not to call pnfs_set_layoutcommit(). The effect is that servers now can decide whether or not they want the client to call layoutcommit before returning a writeable layout. Signed-off-by: Trond Myklebust <[email protected]>
2015-06-26pnfs/flexfiles: protect ktime manipulation with mirror lockPeng Tao1-19/+12
It looks as if xchg() and cmpxchg() are not available for 64-bit integers on sparc32: > New breakage seen in linux-next today: > > ERROR: "__xchg_called_with_bad_pointer" [fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko] undefined! > ERROR: "__cmpxchg_called_with_bad_pointer" [fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko] undefined! > make[2]: *** [__modpost] Error 1 > make[1]: *** [modules] Error 2 Given that mirror ktime manipulation is already under mirror->lock, let's make use of the fact. Reported-by: Paul Gortmaker <[email protected]> Signed-off-by: Peng Tao <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2015-06-24pnfs/flexfiles: report layoutstat regularlyPeng Tao1-4/+23
As a simple scheme, report every minute if IO is still going on. Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Peng Tao <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2015-06-24pnfs/flexfiles: encode LAYOUTSTATS flexfiles specific dataPeng Tao1-2/+176
Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Peng Tao <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2015-06-24pnfs/flexfiles: add ff_layout_prepare_layoutstatsPeng Tao1-0/+71
It fills in the generic part of LAYOUTSTATS call. One thing to note is that we don't really track if IO is continuous or not. So just fake to use the completed bytes for it. Still missing flexfiles specific part, which will be included in the next patch. Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Peng Tao <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2015-06-24pNFS/flexfiles: track when layout is first usedPeng Tao1-3/+7
So that we can report cumulative time since the beginning of statistics collection of the layout. Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Peng Tao <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2015-06-24pNFS/flexfiles: add layoutstats trackingTrond Myklebust1-11/+181
Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2015-06-16pnfs/flexfiles: use swap() in ff_layout_sort_mirrors()Fabian Frederick1-6/+3
Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2015-04-23NFS: Move nfs_idmap.h into fs/nfs/Anna Schumaker1-1/+1
This file is only used internally to the NFS v4 module, so it doesn't need to be in the global include path. I also renamed it from nfs_idmap.h to nfs4idmap.h to emphasize that it's an NFSv4-only include file. Signed-off-by: Anna Schumaker <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2015-03-27NFSv4.1/pnfs: Separate out metadata and data consistency for pNFSTrond Myklebust1-0/+1
The LAYOUTCOMMIT operation means different things to different layout types. For blocks and objects, it is both a data and metadata consistency operation. For files and flexfiles, it is only a metadata consistency operation. This patch separates out the 2 cases, allowing the files/flexfiles layout drivers to optimise away the data consistency calls to layoutcommit. Signed-off-by: Trond Myklebust <[email protected]>
2015-03-27NFSv4.1/pnfs: Refactor pnfs_set_layoutcommit()Trond Myklebust1-2/+3
pnfs_set_layoutcommit() and pnfs_commit_set_layoutcommit() are 100% identical except for the function arguments. Refactor to eliminate the difference. Signed-off-by: Trond Myklebust <[email protected]>
2015-03-27NFS: Fix free_deveiceid -> free_deviceidTrond Myklebust1-2/+2
Make it easier to grep for these functions by name. Signed-off-by: Trond Myklebust <[email protected]>
2015-02-18pnfs: Refactor the *_layout_mark_request_commit to use ↵Tom Haynes1-37/+1
pnfs_layout_mark_request_commit The File Layout's filelayout_mark_request_commit() is almost the Flex File Layout's ff_layout_mark_request_commit(). And that can be reduced by calling into nfs_request_add_commit_list(). Signed-off-by: Tom Haynes <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2015-02-13nfs: Provide and use helper functions for marking a page as unstableTom Haynes1-7/+2
Signed-off-by: Tom Haynes <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2015-02-12Merge branch 'for-3.20/bdi' of git://git.kernel.dk/linux-blockLinus Torvalds1-1/+1
Pull backing device changes from Jens Axboe: "This contains a cleanup of how the backing device is handled, in preparation for a rework of the life time rules. In this part, the most important change is to split the unrelated nommu mmap flags from it, but also removing a backing_dev_info pointer from the address_space (and inode), and a cleanup of other various minor bits. Christoph did all the work here, I just fixed an oops with pages that have a swap backing. Arnd fixed a missing export, and Oleg killed the lustre backing_dev_info from staging. Last patch was from Al, unexporting parts that are now no longer needed outside" * 'for-3.20/bdi' of git://git.kernel.dk/linux-block: Make super_blocks and sb_lock static mtd: export new mtd_mmap_capabilities fs: make inode_to_bdi() handle NULL inode staging/lustre/llite: get rid of backing_dev_info fs: remove default_backing_dev_info fs: don't reassign dirty inodes to default_backing_dev_info nfs: don't call bdi_unregister ceph: remove call to bdi_unregister fs: remove mapping->backing_dev_info fs: export inode_to_bdi and use it in favor of mapping->backing_dev_info nilfs2: set up s_bdi like the generic mount_bdev code block_dev: get bdev inode bdi directly from the block device block_dev: only write bdev inode on close fs: introduce f_op->mmap_capabilities for nommu mmap support fs: kill BDI_CAP_SWAP_BACKED fs: deduplicate noop_backing_dev_info
2015-02-03pnfs/flexfiles: Add the FlexFile Layout DriverTom Haynes1-0/+1574
The flexfile layout is a new layout that extends the file layout. It is currently being drafted as a specification at https://datatracker.ietf.org/doc/draft-ietf-nfsv4-layout-types/ Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Tom Haynes <[email protected]> Signed-off-by: Tao Peng <[email protected]>