linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Jens Axboe <axboe@kernel.dk>
Cc: Jan Kara <jack@suse.cz>, linux-block@vger.kernel.org
Subject: Re: [PATCH] blktrace: Show requests without sector
Date: Thu, 7 Feb 2019 11:54:00 +0100	[thread overview]
Message-ID: <20190207105400.GC3597@quack2.suse.cz> (raw)
In-Reply-To: <04f7afa6-a137-823c-75be-a09422a63998@kernel.dk>

On Wed 06-02-19 12:49:46, Jens Axboe wrote:
> On 2/6/19 5:04 AM, Jan Kara wrote:
> > Currently, blktrace will not show requests that don't have any data as
> > rq->__sector is initialized to -1 which is out of device range and thus
> > discarded by act_log_check(). This is most notably the case for cache
> > flush requests sent to the device. Fix the problem by making
> > blk_rq_trace_sector() return 0 for requests without initialized sector.
> 
> Concept is fine, but man, that's not very readable. How about:
> 
> if (blk_rq_passthrough(rq) || blk_rq_pos(rq) == (sector_t) -1)
> 	return 0;
> 
> return blk_rq_pos(rq);
> 
> instead? Preferably with a comment on why blk_rq_pos() will be -1.

Good points. Will send v2 shortly. Thanks!

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

      reply	other threads:[~2019-02-07 10:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-06 12:04 [PATCH] blktrace: Show requests without sector Jan Kara
2019-02-06 12:37 ` Johannes Thumshirn
2019-02-06 19:49 ` Jens Axboe
2019-02-07 10:54   ` Jan Kara [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190207105400.GC3597@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).