aboutsummaryrefslogtreecommitdiff
path: root/fs/nfs/flexfilelayout/flexfilelayoutdev.c
AgeCommit message (Collapse)AuthorFilesLines
2015-09-01NFSv4.1/flexfiles: RW layouts are valid only if all mirrors are validTrond Myklebust1-2/+28
Unlike read layouts, the writeable layout cannot fall back to using only one of the mirrors. It need to write to all of them. Signed-off-by: Trond Myklebust <[email protected]>
2015-09-01NFSv4.1/flexfiles: Fix incorrect usage of pnfs_generic_mark_devid_invalid()Trond Myklebust1-2/+2
Unlike the files layout, flexfiles does not test for the NFS_DEVICEID_INVALID flag. Instead it relies on NFS_DEVICEID_UNAVAILABLE. Fix is to replace with nfs4_mark_deviceid_unavailable(). Signed-off-by: Trond Myklebust <[email protected]>
2015-08-27NFSv4.1/flexfiles: Fix a protocol error in layoutreturnTrond Myklebust1-2/+5
According to the flexfiles protocol, the layoutreturn should specify an array of errors in the following format: struct ff_ioerr4 { offset4 ffie_offset; length4 ffie_length; stateid4 ffie_stateid; device_error4 ffie_errors<>; }; This patch fixes up the code to ensure that our ffie_errors is indeed encoded as an array (albeit with only a single entry). Reported-by: Tom Haynes <[email protected]> Cc: [email protected] Signed-off-by: Trond Myklebust <[email protected]>
2015-06-25nfs: always update creds in mirror, even when we have an already connected dsJeff Layton1-2/+2
A ds can be associated with more than one mirror, but we currently skip setting a mirror's credentials if we find that it's already set up with a connected client. The upshot is that we can end up sending DS writes with MDS credentials instead of properly setting them up. Fix nfs4_ff_layout_prepare_ds to always verify that the mirror's credentials are set up, even when we have a DS that's already connected. Reported-by: Tom Haynes <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Cc: [email protected] # 4.0+ Signed-off-by: Trond Myklebust <[email protected]>
2015-06-25nfs: fix potential credential leak in ff_layout_update_mirror_credJeff Layton1-1/+2
If we have two tasks racing to update a mirror's credentials, then they can end up leaking one (or more) sets of credentials. The first task will set mirror->cred and then the second task will just overwrite it. Use a cmpxchg to ensure that the creds are only set once. If we get to the point where we would set mirror->cred and find that they're already set, then we just release the creds that were just found. Signed-off-by: Jeff Layton <[email protected]> Cc: [email protected] # 4.0+ Signed-off-by: Trond Myklebust <[email protected]>
2015-03-27NFSv4.1: Convert pNFS deviceid to use kfree_rcu()Trond Myklebust1-1/+1
Use of synchronize_rcu() when unmounting and potentially freeing a lot of deviceids is problematic. There really is no reason why we can't just use kfree_rcu() here. Signed-off-by: Trond Myklebust <[email protected]>
2015-02-09pnfs/flexfiles: Do not dprintk after the freeTom Haynes1-1/+1
Found by 0-DAY kernel test infrastructure: fs/nfs/flexfilelayout/flexfilelayoutdev.c:520:13-16: ERROR: reference preceded by free on line 518 fs/nfs/flexfilelayout/flexfilelayoutdev.c:520:26-29: ERROR: reference preceded by free on line 518 fs/nfs/flexfilelayout/flexfilelayoutdev.c:520:39-42: ERROR: reference preceded by free on line 518 fs/nfs/flexfilelayout/flexfilelayoutdev.c:521:3-6: ERROR: reference preceded by free on line 518 Reported-by: Julia Lawall <[email protected]> Signed-off-by: Tom Haynes <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2015-02-03pnfs/flexfiles: Add the FlexFile Layout DriverTom Haynes1-0/+552
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]>