mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-23 21:19:04 -04:00
NFS client updates for Linux 4.3
Highlights include:
Stable patches:
- Fix atomicity of pNFS commit list updates
- Fix NFSv4 handling of open(O_CREAT|O_EXCL|O_RDONLY)
- nfs_set_pgio_error sometimes misses errors
- Fix a thinko in xs_connect()
- Fix borkage in _same_data_server_addrs_locked()
- Fix a NULL pointer dereference of migration recovery ops for v4.2 client
- Don't let the ctime override attribute barriers.
- Revert "NFSv4: Remove incorrect check in can_open_delegated()"
- Ensure flexfiles pNFS driver updates the inode after write finishes
- flexfiles must not pollute the attribute cache with attrbutes from the DS
- Fix a protocol error in layoutreturn
- Fix a protocol issue with NFSv4.1 CLOSE stateids
Bugfixes + cleanups
- pNFS blocks bugfixes from Christoph
- Various cleanups from Anna
- More fixes for delegation corner cases
- Don't fsync twice for O_SYNC/IS_SYNC files
- Fix pNFS and flexfiles layoutstats bugs
- pnfs/flexfiles: avoid duplicate tracking of mirror data
- pnfs: Fix layoutget/layoutreturn/return-on-close serialisation issues.
- pnfs/flexfiles: error handling retries a layoutget before fallback to MDS
Features:
- Full support for the OPEN NFS4_CREATE_EXCLUSIVE4_1 mode from Kinglong
- More RDMA client transport improvements from Chuck
- Removal of the deprecated ib_reg_phys_mr() and ib_rereg_phys_mr() verbs
from the SUNRPC, Lustre and core infiniband tree.
- Optimise away the close-to-open getattr if there is no cached data
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJV7chgAAoJEGcL54qWCgDyqJQP/3kto9VXnXcatC382jF9Pfj5
F55XeSnviOXH7CyiKA4nSBhnxg/sLuWOTpbkVI/4Y+VyWhLby9h+mtcKURHOlBnj
d5BFoPwaBVDnUiKlHFQDkRjIyxjj2Sb6/uEb2V/u3v+3znR5AZZ4lzFx4cD85oaz
mcru7yGiSxaQCIH6lHExcCEKXaDP5YdvS9YFsyQfv2976JSaQHM9ZG04E0v6MzTo
E5wwC4CLMKmhuX9kmQMj85jzs1ASAKZ3N7b4cApTIo6F8DCDH0vKQphq/nEQC497
ECjEs5/fpxtNJUpSBu0gT7G4LCiW3PzE7pHa+8bhbaAn9OzxIR5+qWujKsfGYQhO
Oomp3K9zO6omshAc5w4MkknPpbImjoZjGAj/q/6DbtrDpnD7DzOTirwYY2yX0CA8
qcL81uJUb8+j4jJj4RTO+lTUBItrM1XTqTSd/3eSMr5DDRVZj+ERZxh17TaxRBZL
YrbrLHxCHrcbdSbPlovyvY+BwjJUUFJRcOxGQXLmNYR9u92fF59rb53bzVyzcRRO
wBozzrNRCFL+fPgfNPLEapIb6VtExdM3rl2HYsJGckHj4DPQdnoB3ytIT9iEFZEN
+/rE14XEZte7kuH3OP4el2UsP/hVsm7A49mtwrkdbd7rxMWD6XfQUp8DAggWUEtI
1H6T7RC1Y6wsu0X1fnVz
=knJA
-----END PGP SIGNATURE-----
Merge tag 'nfs-for-4.3-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust:
"Highlights include:
Stable patches:
- Fix atomicity of pNFS commit list updates
- Fix NFSv4 handling of open(O_CREAT|O_EXCL|O_RDONLY)
- nfs_set_pgio_error sometimes misses errors
- Fix a thinko in xs_connect()
- Fix borkage in _same_data_server_addrs_locked()
- Fix a NULL pointer dereference of migration recovery ops for v4.2
client
- Don't let the ctime override attribute barriers.
- Revert "NFSv4: Remove incorrect check in can_open_delegated()"
- Ensure flexfiles pNFS driver updates the inode after write finishes
- flexfiles must not pollute the attribute cache with attrbutes from
the DS
- Fix a protocol error in layoutreturn
- Fix a protocol issue with NFSv4.1 CLOSE stateids
Bugfixes + cleanups
- pNFS blocks bugfixes from Christoph
- Various cleanups from Anna
- More fixes for delegation corner cases
- Don't fsync twice for O_SYNC/IS_SYNC files
- Fix pNFS and flexfiles layoutstats bugs
- pnfs/flexfiles: avoid duplicate tracking of mirror data
- pnfs: Fix layoutget/layoutreturn/return-on-close serialisation
issues
- pnfs/flexfiles: error handling retries a layoutget before fallback
to MDS
Features:
- Full support for the OPEN NFS4_CREATE_EXCLUSIVE4_1 mode from
Kinglong
- More RDMA client transport improvements from Chuck
- Removal of the deprecated ib_reg_phys_mr() and ib_rereg_phys_mr()
verbs from the SUNRPC, Lustre and core infiniband tree.
- Optimise away the close-to-open getattr if there is no cached data"
* tag 'nfs-for-4.3-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (108 commits)
NFSv4: Respect the server imposed limit on how many changes we may cache
NFSv4: Express delegation limit in units of pages
Revert "NFS: Make close(2) asynchronous when closing NFS O_DIRECT files"
NFS: Optimise away the close-to-open getattr if there is no cached data
NFSv4.1/flexfiles: Clean up ff_layout_write_done_cb/ff_layout_commit_done_cb
NFSv4.1/flexfiles: Mark the layout for return in ff_layout_io_track_ds_error()
nfs: Remove unneeded checking of the return value from scnprintf
nfs: Fix truncated client owner id without proto type
NFSv4.1/flexfiles: Mark layout for return if the mirrors are invalid
NFSv4.1/flexfiles: RW layouts are valid only if all mirrors are valid
NFSv4.1/flexfiles: Fix incorrect usage of pnfs_generic_mark_devid_invalid()
NFSv4.1/flexfiles: Fix freeing of mirrors
NFSv4.1/pNFS: Don't request a minimal read layout beyond the end of file
NFSv4.1/pnfs: Handle LAYOUTGET return values correctly
NFSv4.1/pnfs: Don't ask for a read layout for an empty file.
NFSv4.1: Fix a protocol issue with CLOSE stateids
NFSv4.1/flexfiles: Don't mark the entire deviceid as bad for file errors
SUNRPC: Prevent SYN+SYNACK+RST storms
SUNRPC: xs_reset_transport must mark the connection as disconnected
NFSv4.1/pnfs: Ensure layoutreturn reserves space for the opaque payload
...
This commit is contained in:
commit
4e4adb2f46
54 changed files with 1321 additions and 1089 deletions
|
|
@ -547,6 +547,24 @@ enum pnfs_notify_deviceid_type4 {
|
|||
NOTIFY_DEVICEID4_DELETE = 1 << 2,
|
||||
};
|
||||
|
||||
enum pnfs_block_volume_type {
|
||||
PNFS_BLOCK_VOLUME_SIMPLE = 0,
|
||||
PNFS_BLOCK_VOLUME_SLICE = 1,
|
||||
PNFS_BLOCK_VOLUME_CONCAT = 2,
|
||||
PNFS_BLOCK_VOLUME_STRIPE = 3,
|
||||
};
|
||||
|
||||
enum pnfs_block_extent_state {
|
||||
PNFS_BLOCK_READWRITE_DATA = 0,
|
||||
PNFS_BLOCK_READ_DATA = 1,
|
||||
PNFS_BLOCK_INVALID_DATA = 2,
|
||||
PNFS_BLOCK_NONE_DATA = 3,
|
||||
};
|
||||
|
||||
/* on the wire size of a block layout extent */
|
||||
#define PNFS_BLOCK_EXTENT_SIZE \
|
||||
(7 * sizeof(__be32) + NFS4_DEVICEID4_SIZE)
|
||||
|
||||
#define NFL4_UFLG_MASK 0x0000003F
|
||||
#define NFL4_UFLG_DENSE 0x00000001
|
||||
#define NFL4_UFLG_COMMIT_THRU_MDS 0x00000002
|
||||
|
|
|
|||
|
|
@ -353,7 +353,6 @@ extern void nfs_access_add_cache(struct inode *, struct nfs_access_entry *);
|
|||
extern void nfs_access_set_mask(struct nfs_access_entry *, u32);
|
||||
extern int nfs_permission(struct inode *, int);
|
||||
extern int nfs_open(struct inode *, struct file *);
|
||||
extern int nfs_release(struct inode *, struct file *);
|
||||
extern int nfs_attribute_timeout(struct inode *inode);
|
||||
extern int nfs_attribute_cache_expired(struct inode *inode);
|
||||
extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode);
|
||||
|
|
@ -371,6 +370,7 @@ extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struc
|
|||
extern struct nfs_open_context *alloc_nfs_open_context(struct dentry *dentry, fmode_t f_mode);
|
||||
extern void nfs_inode_attach_open_context(struct nfs_open_context *ctx);
|
||||
extern void nfs_file_set_open_context(struct file *filp, struct nfs_open_context *ctx);
|
||||
extern void nfs_file_clear_open_context(struct file *flip);
|
||||
extern struct nfs_lock_context *nfs_get_lock_context(struct nfs_open_context *ctx);
|
||||
extern void nfs_put_lock_context(struct nfs_lock_context *l_ctx);
|
||||
extern u64 nfs_compat_user_ino64(u64 fileid);
|
||||
|
|
|
|||
|
|
@ -173,6 +173,11 @@ struct nfs_server {
|
|||
set of attributes supported
|
||||
on this filesystem excluding
|
||||
the label support bit. */
|
||||
u32 exclcreat_bitmask[3];
|
||||
/* V4 bitmask representing the
|
||||
set of attributes supported
|
||||
on this filesystem for the
|
||||
exclusive create. */
|
||||
u32 cache_consistency_bitmask[3];
|
||||
/* V4 bitmask representing the subset
|
||||
of change attribute, size, ctime
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ struct nfs_openargs {
|
|||
struct stateowner_id id;
|
||||
union {
|
||||
struct {
|
||||
struct iattr * attrs; /* UNCHECKED, GUARDED */
|
||||
struct iattr * attrs; /* UNCHECKED, GUARDED, EXCLUSIVE4_1 */
|
||||
nfs4_verifier verifier; /* EXCLUSIVE */
|
||||
};
|
||||
nfs4_stateid delegation; /* CLAIM_DELEGATE_CUR */
|
||||
|
|
@ -389,7 +389,7 @@ struct nfs_openargs {
|
|||
const struct nfs_server *server; /* Needed for ID mapping */
|
||||
const u32 * bitmask;
|
||||
const u32 * open_bitmap;
|
||||
__u32 claim;
|
||||
enum open_claim_type4 claim;
|
||||
enum createmode4 createmode;
|
||||
const struct nfs4_label *label;
|
||||
};
|
||||
|
|
@ -406,8 +406,8 @@ struct nfs_openres {
|
|||
const struct nfs_server *server;
|
||||
fmode_t delegation_type;
|
||||
nfs4_stateid delegation;
|
||||
unsigned long pagemod_limit;
|
||||
__u32 do_recall;
|
||||
__u64 maxsize;
|
||||
__u32 attrset[NFS4_BITMAP_SIZE];
|
||||
struct nfs4_string *owner;
|
||||
struct nfs4_string *group_owner;
|
||||
|
|
@ -1057,11 +1057,13 @@ struct nfs4_statfs_res {
|
|||
struct nfs4_server_caps_arg {
|
||||
struct nfs4_sequence_args seq_args;
|
||||
struct nfs_fh *fhandle;
|
||||
const u32 * bitmask;
|
||||
};
|
||||
|
||||
struct nfs4_server_caps_res {
|
||||
struct nfs4_sequence_res seq_res;
|
||||
u32 attr_bitmask[3];
|
||||
u32 exclcreat_bitmask[3];
|
||||
u32 acl_bitmask;
|
||||
u32 has_links;
|
||||
u32 has_symlinks;
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ static inline void rpc_set_port(struct sockaddr *sap,
|
|||
#define IPV6_SCOPE_DELIMITER '%'
|
||||
#define IPV6_SCOPE_ID_LEN sizeof("%nnnnnnnnnn")
|
||||
|
||||
static inline bool __rpc_cmp_addr4(const struct sockaddr *sap1,
|
||||
const struct sockaddr *sap2)
|
||||
static inline bool rpc_cmp_addr4(const struct sockaddr *sap1,
|
||||
const struct sockaddr *sap2)
|
||||
{
|
||||
const struct sockaddr_in *sin1 = (const struct sockaddr_in *)sap1;
|
||||
const struct sockaddr_in *sin2 = (const struct sockaddr_in *)sap2;
|
||||
|
|
@ -67,8 +67,8 @@ static inline bool __rpc_copy_addr4(struct sockaddr *dst,
|
|||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
static inline bool __rpc_cmp_addr6(const struct sockaddr *sap1,
|
||||
const struct sockaddr *sap2)
|
||||
static inline bool rpc_cmp_addr6(const struct sockaddr *sap1,
|
||||
const struct sockaddr *sap2)
|
||||
{
|
||||
const struct sockaddr_in6 *sin1 = (const struct sockaddr_in6 *)sap1;
|
||||
const struct sockaddr_in6 *sin2 = (const struct sockaddr_in6 *)sap2;
|
||||
|
|
@ -93,7 +93,7 @@ static inline bool __rpc_copy_addr6(struct sockaddr *dst,
|
|||
return true;
|
||||
}
|
||||
#else /* !(IS_ENABLED(CONFIG_IPV6) */
|
||||
static inline bool __rpc_cmp_addr6(const struct sockaddr *sap1,
|
||||
static inline bool rpc_cmp_addr6(const struct sockaddr *sap1,
|
||||
const struct sockaddr *sap2)
|
||||
{
|
||||
return false;
|
||||
|
|
@ -122,14 +122,27 @@ static inline bool rpc_cmp_addr(const struct sockaddr *sap1,
|
|||
if (sap1->sa_family == sap2->sa_family) {
|
||||
switch (sap1->sa_family) {
|
||||
case AF_INET:
|
||||
return __rpc_cmp_addr4(sap1, sap2);
|
||||
return rpc_cmp_addr4(sap1, sap2);
|
||||
case AF_INET6:
|
||||
return __rpc_cmp_addr6(sap1, sap2);
|
||||
return rpc_cmp_addr6(sap1, sap2);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* rpc_cmp_addr_port - compare the address and port number of two sockaddrs.
|
||||
* @sap1: first sockaddr
|
||||
* @sap2: second sockaddr
|
||||
*/
|
||||
static inline bool rpc_cmp_addr_port(const struct sockaddr *sap1,
|
||||
const struct sockaddr *sap2)
|
||||
{
|
||||
if (!rpc_cmp_addr(sap1, sap2))
|
||||
return false;
|
||||
return rpc_get_port(sap1) == rpc_get_port(sap2);
|
||||
}
|
||||
|
||||
/**
|
||||
* rpc_copy_addr - copy the address portion of one sockaddr to another
|
||||
* @dst: destination sockaddr
|
||||
|
|
|
|||
|
|
@ -18,9 +18,13 @@
|
|||
#include <linux/atomic.h>
|
||||
#include <linux/rcupdate.h>
|
||||
#include <linux/uidgid.h>
|
||||
#include <linux/utsname.h>
|
||||
|
||||
/* size of the nodename buffer */
|
||||
#define UNX_MAXNODENAME 32
|
||||
/*
|
||||
* Size of the nodename buffer. RFC1831 specifies a hard limit of 255 bytes,
|
||||
* but Linux hostnames are actually limited to __NEW_UTS_LEN bytes.
|
||||
*/
|
||||
#define UNX_MAXNODENAME __NEW_UTS_LEN
|
||||
|
||||
struct rpcsec_gss_info;
|
||||
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
* a single chunk type per message is supported currently.
|
||||
*/
|
||||
#define RPCRDMA_MIN_SLOT_TABLE (2U)
|
||||
#define RPCRDMA_DEF_SLOT_TABLE (32U)
|
||||
#define RPCRDMA_DEF_SLOT_TABLE (128U)
|
||||
#define RPCRDMA_MAX_SLOT_TABLE (256U)
|
||||
|
||||
#define RPCRDMA_DEF_INLINE (1024) /* default inline max */
|
||||
|
|
|
|||
Loading…
Reference in a new issue