[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <87y1muy1ds.fsf@doe.com>
Date: Fri, 14 Apr 2023 20:08:55 +0530
From: Ritesh Harjani (IBM) <ritesh.list@...il.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: Christoph Hellwig <hch@...radead.org>,
linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
Jan Kara <jack@...e.cz>,
"Darrick J . Wong" <djwong@...nel.org>,
Ojaswin Mujoo <ojaswin@...ux.ibm.com>,
Disha Goel <disgoel@...ux.ibm.com>
Subject: Re: [RFCv3 10/10] iomap: Add trace points for DIO path
Christoph Hellwig <hch@...radead.org> writes:
> On Fri, Apr 14, 2023 at 01:26:38PM +0530, Ritesh Harjani wrote:
>> How about this below change? Does this look good to you?
>> It should cover all error types and both entry and exit.
>
> I don't think it is very useful. The complete tracepoint is the
> end of the I/O. Having a separate end one doesn't make sense.
> That's why I suggested a queued one for the asynchronous case.
Ok, does this look good then?
diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index 36ab1152dbea..859efb5de1bf 100644
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@ -130,6 +130,7 @@ ssize_t iomap_dio_complete(struct iomap_dio *dio)
if (ret > 0)
ret += dio->done_before;
+ trace_iomap_dio_complete(iocb, dio->error, ret);
kfree(dio);
return ret;
@@ -650,8 +651,12 @@ __iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
*/
dio->wait_for_completion = wait_for_completion;
if (!atomic_dec_and_test(&dio->ref)) {
- if (!wait_for_completion)
- return ERR_PTR(-EIOCBQUEUED);
+ if (!wait_for_completion) {
+ ret = -EIOCBQUEUED;
+ trace_iomap_dio_rw_queued(iocb, iter, dio_flags,
+ done_before, ret);
+ return ERR_PTR(ret);
+ }
for (;;) {
set_current_state(TASK_UNINTERRUPTIBLE);
-ritesh
Powered by blists - more mailing lists