Merge tag 'nfs-for-7.1-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Merge commit. Changes below are compared with the first parent: ac2dc6d5.
Changes
25 files changed · +443 −215
Only the first 600 diff lines are shown. Download the complete patch.
fs/nfs/blocklayout/dev.c
View filediff --git a/fs/nfs/blocklayout/dev.c b/fs/nfs/blocklayout/dev.c
index cc6327d..bb35f88 100644
--- a/fs/nfs/blocklayout/dev.c
+++ b/fs/nfs/blocklayout/dev.c
@@ -370,11 +370,14 @@ bl_open_path(struct pnfs_block_volume *v, const char *prefix)
if (!devname)
return ERR_PTR(-ENOMEM);
- bdev_file = bdev_file_open_by_path(devname, BLK_OPEN_READ | BLK_OPEN_WRITE,
- NULL, NULL);
+ bdev_file = bdev_file_open_by_path(devname,
+ BLK_OPEN_READ | BLK_OPEN_WRITE, NULL, NULL);
if (IS_ERR(bdev_file)) {
dprintk("failed to open device %s (%ld)\n",
devname, PTR_ERR(bdev_file));
+ } else {
+ pr_info("pNFS: using block device %s\n",
+ file_bdev(bdev_file)->bd_disk->disk_name);
}
kfree(devname);
fs/nfs/callback_xdr.c
View filediff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
index 176873f..4382bad 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -96,8 +96,7 @@ static __be32 decode_fh(struct xdr_stream *xdr, struct nfs_fh *fh)
p = xdr_inline_decode(xdr, fh->size);
if (unlikely(p == NULL))
return htonl(NFS4ERR_RESOURCE);
- memcpy(&fh->data[0], p, fh->size);
- memset(&fh->data[fh->size], 0, sizeof(fh->data) - fh->size);
+ memcpy_and_pad(fh->data, sizeof(fh->data), p, fh->size, 0);
return 0;
}
fs/nfs/flexfilelayout/flexfilelayoutdev.c
View filediff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
index c40395a..1109462 100644
--- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
+++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
@@ -97,6 +97,11 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
if (unlikely(!p))
goto out_err_drain_dsaddrs;
version_count = be32_to_cpup(p);
+
+ if (version_count == 0) {
+ ret = -EINVAL;
+ goto out_err_drain_dsaddrs;
+ }
dprintk("%s: version count %d\n", __func__, version_count);
ds_versions = kzalloc_objs(struct nfs4_ff_ds_version, version_count,
fs/nfs/inode.c
View filediff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 98a8f0d..e26030e 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -692,7 +692,8 @@ void nfs_update_delegated_atime(struct inode *inode)
void nfs_update_delegated_mtime_locked(struct inode *inode)
{
- if (nfs_have_delegated_mtime(inode))
+ if (nfs_have_delegated_mtime(inode) ||
+ nfs_have_directory_delegation(inode))
nfs_update_mtime(inode);
}
@@ -757,14 +758,7 @@ nfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
} else if (nfs_have_delegated_atime(inode) &&
attr->ia_valid & ATTR_ATIME &&
!(attr->ia_valid & ATTR_MTIME)) {
- if (attr->ia_valid & ATTR_ATIME_SET) {
- if (uid_eq(task_uid, owner_uid)) {
- spin_lock(&inode->i_lock);
- nfs_set_timestamps_to_ts(inode, attr);
- spin_unlock(&inode->i_lock);
- attr->ia_valid &= ~(ATTR_ATIME|ATTR_ATIME_SET);
- }
- } else {
+ if (!(attr->ia_valid & ATTR_ATIME_SET)) {
nfs_update_delegated_atime(inode);
attr->ia_valid &= ~ATTR_ATIME;
}
fs/nfs/internal.h
View filediff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index fc54563..18d46b0 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -253,6 +253,8 @@ extern struct nfs_client *nfs4_set_ds_client(struct nfs_server *mds_srv,
u32 minor_version);
extern struct rpc_clnt *nfs4_find_or_create_ds_client(struct nfs_client *,
struct inode *);
+extern void nfs4_session_limit_rwsize(struct nfs_server *server);
+extern void nfs4_session_limit_xasize(struct nfs_server *server);
extern struct nfs_client *nfs3_set_ds_client(struct nfs_server *mds_srv,
const struct sockaddr_storage *ds_addr, int ds_addrlen,
int ds_proto, unsigned int ds_timeo,
fs/nfs/localio.c
View filediff --git a/fs/nfs/localio.c b/fs/nfs/localio.c
index 4c7d16a..e55c597 100644
--- a/fs/nfs/localio.c
+++ b/fs/nfs/localio.c
@@ -865,6 +865,8 @@ static void nfs_local_call_write(struct work_struct *work)
file_start_write(filp);
n_iters = atomic_read(&iocb->n_iters);
for (int i = 0; i < n_iters ; i++) {
+ size_t icount;
+
if (iocb->iter_is_dio_aligned[i]) {
iocb->kiocb.ki_flags |= IOCB_DIRECT;
/* Only use AIO completion if DIO-aligned segment is last */
@@ -881,8 +883,16 @@ static void nfs_local_call_write(struct work_struct *work)
if (status == -EIOCBQUEUED)
continue;
/* Break on completion, errors, or short writes */
+ icount = iov_iter_count(&iocb->iters[i]);
if (nfs_local_pgio_done(iocb, status) || status < 0 ||
- (size_t)status < iov_iter_count(&iocb->iters[i])) {
+ (size_t)status < icount) {
+ if ((size_t)status < icount) {
+ struct nfs_lock_context *ctx =
+ iocb->hdr->req->wb_lock_context;
+
+ set_bit(NFS_CONTEXT_WRITE_SYNC,
+ &ctx->open_context->flags);
+ }
nfs_local_write_iocb_done(iocb);
break;
}
@@ -901,6 +911,9 @@ static void nfs_local_do_write(struct nfs_local_kiocb *iocb,
__func__, hdr->args.count, hdr->args.offset,
(hdr->args.stable == NFS_UNSTABLE) ? "unstable" : "stable");
+ if (test_bit(NFS_CONTEXT_WRITE_SYNC,
+ &hdr->req->wb_lock_context->open_context->flags))
+ hdr->args.stable = NFS_FILE_SYNC;
switch (hdr->args.stable) {
default:
break;
fs/nfs/nfs42proc.c
View filediff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
index 7b3ca68..7602ede 100644
--- a/fs/nfs/nfs42proc.c
+++ b/fs/nfs/nfs42proc.c
@@ -401,6 +401,7 @@ static void nfs42_copy_dest_done(struct file *file, loff_t pos, loff_t len,
NFS_INO_INVALID_MTIME |
NFS_INO_INVALID_BLOCKS);
spin_unlock(&inode->i_lock);
+ nfs_update_delegated_mtime(inode);
}
static ssize_t _nfs42_proc_copy(struct file *src,
@@ -1372,11 +1373,15 @@ out_put_src_lock:
static int _nfs42_proc_removexattr(struct inode *inode, const char *name)
{
struct nfs_server *server = NFS_SERVER(inode);
+ __u32 bitmask[NFS_BITMASK_SZ];
struct nfs42_removexattrargs args = {
.fh = NFS_FH(inode),
+ .bitmask = bitmask,
.xattr_name = name,
};
- struct nfs42_removexattrres res;
+ struct nfs42_removexattrres res = {
+ .server = server,
+ };
struct rpc_message msg = {
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_REMOVEXATTR],
.rpc_argp = &args,
@@ -1385,12 +1390,22 @@ static int _nfs42_proc_removexattr(struct inode *inode, const char *name)
int ret;
unsigned long timestamp = jiffies;
+ res.fattr = nfs_alloc_fattr();
+ if (!res.fattr)
+ return -ENOMEM;
+
+ nfs4_bitmask_set(bitmask, server->cache_consistency_bitmask,
+ inode, NFS_INO_INVALID_CHANGE);
+
ret = nfs4_call_sync(server->client, server, &msg, &args.seq_args,
&res.seq_res, 1);
trace_nfs4_removexattr(inode, name, ret);
- if (!ret)
+ if (!ret) {
nfs4_update_changeattr(inode, &res.cinfo, timestamp, 0);
+ ret = nfs_post_op_update_inode(inode, res.fattr);
+ }
+ kfree(res.fattr);
return ret;
}
fs/nfs/nfs42xdr.c
View filediff --git a/fs/nfs/nfs42xdr.c b/fs/nfs/nfs42xdr.c
index 5c7452c..ec105c6 100644
--- a/fs/nfs/nfs42xdr.c
+++ b/fs/nfs/nfs42xdr.c
@@ -263,11 +263,13 @@
#define NFS4_enc_removexattr_sz (compound_encode_hdr_maxsz + \
encode_sequence_maxsz + \
encode_putfh_maxsz + \
- encode_removexattr_maxsz)
+ encode_removexattr_maxsz + \
+ encode_getattr_maxsz)
#define NFS4_dec_removexattr_sz (compound_decode_hdr_maxsz + \
decode_sequence_maxsz + \
decode_putfh_maxsz + \
- decode_removexattr_maxsz)
+ decode_removexattr_maxsz + \
+ decode_getattr_maxsz)
/*
* These values specify the maximum amount of data that is not
@@ -869,6 +871,7 @@ static void nfs4_xdr_enc_removexattr(struct rpc_rqst *req,
encode_sequence(xdr, &args->seq_args, &hdr);
encode_putfh(xdr, args->fh, &hdr);
encode_removexattr(xdr, args->xattr_name, &hdr);
+ encode_getfattr(xdr, args->bitmask, &hdr);
encode_nops(&hdr);
}
@@ -1818,6 +1821,9 @@ static int nfs4_xdr_dec_removexattr(struct rpc_rqst *req,
goto out;
status = decode_removexattr(xdr, &res->cinfo);
+ if (status)
+ goto out;
+ status = decode_getfattr(xdr, res->fattr, res->server);
out:
return status;
}
fs/nfs/nfs4client.c
View filediff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index c211639..71c271a 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -855,7 +855,7 @@ EXPORT_SYMBOL_GPL(nfs4_set_ds_client);
* Limit the mount rsize, wsize and dtsize using negotiated fore
* channel attributes.
*/
-static void nfs4_session_limit_rwsize(struct nfs_server *server)
+void nfs4_session_limit_rwsize(struct nfs_server *server)
{
struct nfs4_session *sess;
u32 server_resp_sz;
@@ -878,7 +878,7 @@ static void nfs4_session_limit_rwsize(struct nfs_server *server)
/*
* Limit xattr sizes using the channel attributes.
*/
-static void nfs4_session_limit_xasize(struct nfs_server *server)
+void nfs4_session_limit_xasize(struct nfs_server *server)
{
#ifdef CONFIG_NFS_V4_2
struct nfs4_session *sess;
fs/nfs/nfs4proc.c
View filediff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index d839a97..a9b8d48 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4469,6 +4469,13 @@ static int _nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
case -ENOTSUPP:
case -EOPNOTSUPP:
server->caps &= ~NFS_CAP_DIR_DELEG;
+ break;
+ case -NFS4ERR_INVAL:
+ case -NFS4ERR_IO:
+ case -NFS4ERR_DIRDELEG_UNAVAIL:
+ case -NFS4ERR_NOTDIR:
+ clear_bit(NFS_INO_REQ_DIR_DELEG, &(NFS_I(inode)->flags));
+ status = -EAGAIN;
}
}
@@ -4490,6 +4497,7 @@ int nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
default:
err = nfs4_handle_exception(server, err, &exception);
break;
+ case -EAGAIN:
case -ENOTSUPP:
case -EOPNOTSUPP:
exception.retry = true;
@@ -5052,6 +5060,7 @@ static int nfs4_proc_rename_done(struct rpc_task *task, struct inode *old_dir,
res->new_fattr->time_start,
NFS_INO_INVALID_NLINK |
NFS_INO_INVALID_DATA);
+ nfs_update_delegated_mtime(new_dir);
} else
nfs4_update_changeattr(old_dir, &res->old_cinfo,
res->old_fattr->time_start,
@@ -9769,16 +9778,26 @@ static void nfs4_layoutreturn_done(struct rpc_task *task, void *calldata)
if (!nfs41_sequence_process(task, &lrp->res.seq_res))
return;
- if (task->tk_rpc_status == -ETIMEDOUT) {
- lrp->rpc_status = -EAGAIN;
- lrp->res.lrs_present = 0;
- return;
- }
- /*
- * Was there an RPC level error? Assume the call succeeded,
- * and that we need to release the layout
- */
- if (task->tk_rpc_status != 0 && RPC_WAS_SENT(task)) {
+ if (task->tk_rpc_status < 0) {
+ switch (task->tk_rpc_status) {
+ case -EACCES:
+ case -EIO:
+ case -EKEYEXPIRED:
+ case -ERESTARTSYS:
+ case -EINTR:
+ lrp->rpc_status = 0;
+ break;
+ case -ENETDOWN:
+ case -ENETUNREACH:
+ if (task->tk_flags & RPC_TASK_NETUNREACH_FATAL)
+ lrp->rpc_status = 0;
+ else
+ lrp->rpc_status = -EAGAIN;
+ break;
+ default:
+ lrp->rpc_status = -EAGAIN;
+ break;
+ }
lrp->res.lrs_present = 0;
return;
}
@@ -10618,6 +10637,9 @@ static struct nfs_server *nfs4_clone_server(struct nfs_server *source,
if (IS_ERR(server))
return server;
+ nfs4_session_limit_rwsize(server);
+ nfs4_session_limit_xasize(server);
+
error = nfs4_delegation_hash_alloc(server);
if (error) {
nfs_free_server(server);
fs/nfs/nfstrace.h
View filediff --git a/fs/nfs/nfstrace.h b/fs/nfs/nfstrace.h
index 9f9ce4a..ff46795 100644
--- a/fs/nfs/nfstrace.h
+++ b/fs/nfs/nfstrace.h
@@ -1496,7 +1496,7 @@ DECLARE_EVENT_CLASS(nfs_page_class,
__field(dev_t, dev)
__field(u32, fhandle)
__field(u64, fileid)
- __field(const struct nfs_page *__private, req)
+ __field(const struct nfs_page *, req)
__field(loff_t, offset)
__field(unsigned int, count)
__field(unsigned long, flags)
fs/nfs/pagelist.c
View filediff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index a9373de..4a87b2f 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -1186,6 +1186,9 @@ static int __nfs_pageio_add_request(struct nfs_pageio_descriptor *desc,
nfs_page_group_lock(req);
+ if (test_bit(NFS_CONTEXT_WRITE_SYNC,
+ &req->wb_lock_context->open_context->flags))
+ desc->pg_ioflags |= FLUSH_STABLE;
subreq = req;
subreq_size = subreq->wb_bytes;
for(;;) {
fs/nfs/pnfs.c
View filediff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index e79deb9..743467e 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1698,11 +1698,23 @@ int pnfs_roc_done(struct rpc_task *task, struct nfs4_layoutreturn_args **argpp,
/* If the call was not sent, let caller handle it */
if (!RPC_WAS_SENT(task))
return 0;
- /*
- * Otherwise, assume the call succeeded and
- * that we need to release the layout
- */
- *ret = 0;
+ switch (task->tk_rpc_status) {
+ default:
+ /*
+ * Defer the layoutreturn if it was due
+ * to the server being down.
+ */
+ *ret = -NFS4ERR_NOMATCHING_LAYOUT;
+ break;
+ case -EACCES:
+ case -EIO:
+ case -EKEYEXPIRED:
+ case -ERESTARTSYS:
+ case -EINTR:
+ /* Don't retry */
+ *ret = 0;
+ break;
+ }
(*respp)->lrs_present = 0;
retval = 0;
break;
fs/nfs/super.c
View filediff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 7a31858..4cd420b 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1166,12 +1166,18 @@ static int nfs_set_super(struct super_block *s, struct fs_context *fc)
static int nfs_compare_super_address(struct nfs_server *server1,
struct nfs_server *server2)
{
+ struct rpc_xprt *xprt1, *xprt2;
struct sockaddr *sap1, *sap2;
- struct rpc_xprt *xprt1 = server1->client->cl_xprt;
- struct rpc_xprt *xprt2 = server2->client->cl_xprt;
+
+ rcu_read_lock();
+
+ xprt1 = rcu_dereference(server1->client->cl_xprt);
+ xprt2 = rcu_dereference(server2->client->cl_xprt);
if (!net_eq(xprt1->xprt_net, xprt2->xprt_net))
- return 0;
+ goto out_unlock;
+
+ rcu_read_unlock();
sap1 = (struct sockaddr *)&server1->nfs_client->cl_addr;
sap2 = (struct sockaddr *)&server2->nfs_client->cl_addr;
@@ -1203,6 +1209,10 @@ static int nfs_compare_super_address(struct nfs_server *server1,
}
return 1;
+
+out_unlock:
+ rcu_read_unlock();
+ return 0;
}
static int nfs_compare_userns(const struct nfs_server *old,
fs/nfs/write.c
View filediff --git a/fs/nfs/write.c b/fs/nfs/write.c
index cc02b57..3134bb1 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -926,9 +926,13 @@ static void nfs_write_completion(struct nfs_pgio_header *hdr)
goto remove_req;
}
if (nfs_write_need_commit(hdr)) {
+ struct nfs_open_context *ctx =
+ hdr->req->wb_lock_context->open_context;
+
/* Reset wb_nio, since the write was successful. */
req->wb_nio = 0;
memcpy(&req->wb_verf, &hdr->verf.verifier, sizeof(req->wb_verf));
+ clear_bit(NFS_CONTEXT_WRITE_SYNC, &ctx->flags);
nfs_mark_request_commit(req, hdr->lseg, &cinfo,
hdr->ds_commit_idx);
goto next;
@@ -1550,9 +1554,12 @@ static void nfs_writeback_result(struct rpc_task *task,
struct nfs_pgio_args *argp = &hdr->args;
struct nfs_pgio_res *resp = &hdr->res;
- if (resp->count < argp->count) {
+ if (resp->count < argp->count && !list_empty(&hdr->pages)) {
static unsigned long complain;
+ struct nfs_open_context *ctx =
+ hdr->req->wb_lock_context->open_context;
+ set_bit(NFS_CONTEXT_WRITE_SYNC, &ctx->flags);
/* This a short write! */
nfs_inc_stats(hdr->inode, NFSIOS_SHORTWRITE);
@@ -1836,6 +1843,8 @@ static void nfs_commit_release_pages(struct nfs_commit_data *data)
/* We have a mismatch. Write the page again */
dprintk(" mismatch\n");
nfs_mark_request_dirty(req);
+ set_bit(NFS_CONTEXT_WRITE_SYNC,
+ &req->wb_lock_context->open_context->flags);
atomic_long_inc(&NFS_I(data->inode)->redirtied_pages);
next:
nfs_unlock_and_release_request(req);
include/linux/nfs_fs.h
View filediff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 8dd79a3..4623262 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -109,6 +109,7 @@ struct nfs_open_context {
#define NFS_CONTEXT_BAD (2)
#define NFS_CONTEXT_UNLOCK (3)
#define NFS_CONTEXT_FILE_OPEN (4)
+#define NFS_CONTEXT_WRITE_SYNC (5)
struct nfs4_threshold *mdsthreshold;
struct list_head list;
include/linux/nfs_xdr.h
View filediff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index ff1f12a..fcbd21b 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1611,12 +1611,15 @@ struct nfs42_listxattrsres {
struct nfs42_removexattrargs {
struct nfs4_sequence_args seq_args;
struct nfs_fh *fh;
+ const u32 *bitmask;
const char *xattr_name;
};
struct nfs42_removexattrres {
struct nfs4_sequence_res seq_res;
struct nfs4_change_info cinfo;
+ struct nfs_fattr *fattr;
+ const struct nfs_server *server;
};
#endif /* CONFIG_NFS_V4_2 */
include/linux/sunrpc/xprt.h
View filediff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index f46d1fb..a820458 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -404,6 +404,8 @@ struct rpc_xprt * xprt_alloc(struct net *net, size_t size,
unsigned int max_req);
void xprt_free(struct rpc_xprt *);
void xprt_add_backlog(struct rpc_xprt *xprt, struct rpc_task *task);
+void xprt_add_backlog_noncongested(struct rpc_xprt *xprt,
+ struct rpc_task *task);
bool xprt_wake_up_backlog(struct rpc_xprt *xprt, struct rpc_rqst *req);
void xprt_cleanup_ids(void);
include/trace/events/rpcrdma.h
View filediff --git a/include/trace/events/rpcrdma.h b/include/trace/events/rpcrdma.h
index e6a7264..b799130 100644
--- a/include/trace/events/rpcrdma.h
+++ b/include/trace/events/rpcrdma.h
@@ -392,10 +392,10 @@ DECLARE_EVENT_CLASS(xprtrdma_rdch_event,
const struct rpc_task *task,
unsigned int pos,
struct rpcrdma_mr *mr,
- int nsegs
+ bool is_last
),
- TP_ARGS(task, pos, mr, nsegs),
+ TP_ARGS(task, pos, mr, is_last),
TP_STRUCT__entry(
__field(unsigned int, task_id)
@@ -405,7 +405,7 @@ DECLARE_EVENT_CLASS(xprtrdma_rdch_event,
__field(u32, handle)
__field(u32, length)
__field(u64, offset)
- __field(int, nsegs)
+ __field(bool, is_last)
),
TP_fast_assign(
@@ -416,7 +416,7 @@ DECLARE_EVENT_CLASS(xprtrdma_rdch_event,
__entry->handle = mr->mr_handle;
__entry->length = mr->mr_length;
__entry->offset = mr->mr_offset;
- __entry->nsegs = nsegs;
+ __entry->is_last = is_last;
),
TP_printk(SUNRPC_TRACE_TASK_SPECIFIER
@@ -424,7 +424,7 @@ DECLARE_EVENT_CLASS(xprtrdma_rdch_event,
__entry->task_id, __entry->client_id,
__entry->pos, __entry->length,
(unsigned long long)__entry->offset, __entry->handle,
- __entry->nents < __entry->nsegs ? "more" : "last"
+ __entry->is_last ? "last" : "more"
)
);
@@ -434,18 +434,18 @@ DECLARE_EVENT_CLASS(xprtrdma_rdch_event,
const struct rpc_task *task, \
unsigned int pos, \
struct rpcrdma_mr *mr, \
- int nsegs \
+ bool is_last \
), \
- TP_ARGS(task, pos, mr, nsegs))
+ TP_ARGS(task, pos, mr, is_last))
DECLARE_EVENT_CLASS(xprtrdma_wrch_event,
TP_PROTO(
const struct rpc_task *task,
struct rpcrdma_mr *mr,
- int nsegs
+ bool is_last
),
- TP_ARGS(task, mr, nsegs),
+ TP_ARGS(task, mr, is_last),
TP_STRUCT__entry(
__field(unsigned int, task_id)
@@ -454,7 +454,7 @@ DECLARE_EVENT_CLASS(xprtrdma_wrch_event,
__field(u32, handle)
__field(u32, length)
__field(u64, offset)
- __field(int, nsegs)
+ __field(bool, is_last)
),
TP_fast_assign(
@@ -464,7 +464,7 @@ DECLARE_EVENT_CLASS(xprtrdma_wrch_event,
__entry->handle = mr->mr_handle;
__entry->length = mr->mr_length;
__entry->offset = mr->mr_offset;
- __entry->nsegs = nsegs;
+ __entry->is_last = is_last;
),
TP_printk(SUNRPC_TRACE_TASK_SPECIFIER
@@ -472,7 +472,7 @@ DECLARE_EVENT_CLASS(xprtrdma_wrch_event,
__entry->task_id, __entry->client_id,
__entry->length, (unsigned long long)__entry->offset,
This diff is incomplete. Download the complete patch.
net/sunrpc/xprt.c
View fileThis diff is incomplete. Download the complete patch.
net/sunrpc/xprtrdma/frwr_ops.c
View fileThis diff is incomplete. Download the complete patch.
net/sunrpc/xprtrdma/rpc_rdma.c
View fileThis diff is incomplete. Download the complete patch.
net/sunrpc/xprtrdma/transport.c
View fileThis diff is incomplete. Download the complete patch.
net/sunrpc/xprtrdma/verbs.c
View fileThis diff is incomplete. Download the complete patch.
net/sunrpc/xprtrdma/xprt_rdma.h
View fileThis diff is incomplete. Download the complete patch.