* [PATCH] nfs41: update ff_layout_io_track_ds_error to accept rpc task
@ 2020-12-10 10:55 Tigran Mkrtchyan
2020-12-10 14:42 ` Trond Myklebust
0 siblings, 1 reply; 3+ messages in thread
From: Tigran Mkrtchyan @ 2020-12-10 10:55 UTC (permalink / raw)
To: linux-nfs; +Cc: anna.schumaker, trond.myklebust, Tigran Mkrtchyan
When debugging READ_PLUS issues sent to DS I noticed that layoutstats
was reporting READ, though READ_PLUS was used.
The ff_layout_io_track_ds_error function takes the 'major' opnum as an
argumentas well as the corresponding resulting error code.
By passing rpc task as an argument, the bogh values can be extracted
insideff_layout_io_track_ds_error and reduce a possibility of calling
with incorrect opnum.
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
---
fs/nfs/flexfilelayout/flexfilelayout.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index a163533446fa..9da11586f685 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -1213,11 +1213,13 @@ static int ff_layout_async_handle_error(struct rpc_task *task,
static void ff_layout_io_track_ds_error(struct pnfs_layout_segment *lseg,
u32 idx, u64 offset, u64 length,
- u32 *op_status, int opnum, int error)
+ u32 *op_status, struct rpc_task *task)
{
struct nfs4_ff_layout_mirror *mirror;
u32 status = *op_status;
int err;
+ int error = task->tk_status;
+ int opnum = task->tk_msg.rpc_proc->p_statidx;
if (status == 0) {
switch (error) {
@@ -1279,8 +1281,7 @@ static int ff_layout_read_done_cb(struct rpc_task *task,
if (task->tk_status < 0) {
ff_layout_io_track_ds_error(hdr->lseg, hdr->pgio_mirror_idx,
hdr->args.offset, hdr->args.count,
- &hdr->res.op_status, OP_READ,
- task->tk_status);
+ &hdr->res.op_status, task);
trace_ff_layout_read_error(hdr);
}
@@ -1446,8 +1447,7 @@ static int ff_layout_write_done_cb(struct rpc_task *task,
if (task->tk_status < 0) {
ff_layout_io_track_ds_error(hdr->lseg, hdr->pgio_mirror_idx,
hdr->args.offset, hdr->args.count,
- &hdr->res.op_status, OP_WRITE,
- task->tk_status);
+ &hdr->res.op_status, task);
trace_ff_layout_write_error(hdr);
}
@@ -1492,8 +1492,7 @@ static int ff_layout_commit_done_cb(struct rpc_task *task,
if (task->tk_status < 0) {
ff_layout_io_track_ds_error(data->lseg, data->ds_commit_index,
data->args.offset, data->args.count,
- &data->res.op_status, OP_COMMIT,
- task->tk_status);
+ &data->res.op_status, task);
trace_ff_layout_commit_error(data);
}
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nfs41: update ff_layout_io_track_ds_error to accept rpc task
2020-12-10 10:55 [PATCH] nfs41: update ff_layout_io_track_ds_error to accept rpc task Tigran Mkrtchyan
@ 2020-12-10 14:42 ` Trond Myklebust
2020-12-10 14:54 ` Mkrtchyan, Tigran
0 siblings, 1 reply; 3+ messages in thread
From: Trond Myklebust @ 2020-12-10 14:42 UTC (permalink / raw)
To: tigran.mkrtchyan, linux-nfs; +Cc: anna.schumaker
Hi Tigran,
On Thu, 2020-12-10 at 10:55 +0000, Tigran Mkrtchyan wrote:
> When debugging READ_PLUS issues sent to DS I noticed that layoutstats
> was reporting READ, though READ_PLUS was used.
>
> The ff_layout_io_track_ds_error function takes the 'major' opnum as
> an
> argumentas well as the corresponding resulting error code.
>
> By passing rpc task as an argument, the bogh values can be extracted
> insideff_layout_io_track_ds_error and reduce a possibility of calling
> with incorrect opnum.
I think we just want to disable READ_PLUS support in pNFS for the
moment. We have no way of discovering and tracking whether or not the
DS actually supports it, so let's leave it out for now.
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nfs41: update ff_layout_io_track_ds_error to accept rpc task
2020-12-10 14:42 ` Trond Myklebust
@ 2020-12-10 14:54 ` Mkrtchyan, Tigran
0 siblings, 0 replies; 3+ messages in thread
From: Mkrtchyan, Tigran @ 2020-12-10 14:54 UTC (permalink / raw)
To: trondmy; +Cc: linux-nfs, Anna Schumaker
----- Original Message -----
> From: "trondmy" <trondmy@hammerspace.com>
> To: "Tigran Mkrtchyan" <tigran.mkrtchyan@desy.de>, "linux-nfs" <linux-nfs@vger.kernel.org>
> Cc: "Anna Schumaker" <anna.schumaker@netapp.com>
> Sent: Thursday, 10 December, 2020 15:42:38
> Subject: Re: [PATCH] nfs41: update ff_layout_io_track_ds_error to accept rpc task
> Hi Tigran,
>
> On Thu, 2020-12-10 at 10:55 +0000, Tigran Mkrtchyan wrote:
>> When debugging READ_PLUS issues sent to DS I noticed that layoutstats
>> was reporting READ, though READ_PLUS was used.
>>
>> The ff_layout_io_track_ds_error function takes the 'major' opnum as
>> an
>> argumentas well as the corresponding resulting error code.
>>
>> By passing rpc task as an argument, the bogh values can be extracted
>> insideff_layout_io_track_ds_error and reduce a possibility of calling
>> with incorrect opnum.
>
> I think we just want to disable READ_PLUS support in pNFS for the
> moment. We have no way of discovering and tracking whether or not the
> DS actually supports it, so let's leave it out for now.
No objections.
Tigran.
>
> --
> Trond Myklebust
> Linux NFS client maintainer, Hammerspace
> trond.myklebust@hammerspace.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-10 14:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-10 10:55 [PATCH] nfs41: update ff_layout_io_track_ds_error to accept rpc task Tigran Mkrtchyan
2020-12-10 14:42 ` Trond Myklebust
2020-12-10 14:54 ` Mkrtchyan, Tigran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).