All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Max Gurtovoy <maxg@mellanox.com>,
	linux-block@vger.kernel.org, martin.petersen@oracle.com,
	linux-nvme@lists.infradead.org, keith.busch@intel.com,
	hch@lst.de, sagi@grimberg.me
Cc: shlomin@mellanox.com, israelr@mellanox.com
Subject: Re: [PATCH v5 2/2] block: centralize PI remapping logic to the block layer
Date: Wed, 11 Sep 2019 16:01:11 -0600	[thread overview]
Message-ID: <380932df-2119-ad86-8bb2-3eccb005c949@kernel.dk> (raw)
In-Reply-To: <1568215397-15496-2-git-send-email-maxg@mellanox.com>

On 9/11/19 9:23 AM, Max Gurtovoy wrote:
> @@ -1405,6 +1406,11 @@ bool blk_update_request(struct request *req, blk_status_t error,
>   	if (!req->bio)
>   		return false;
>   
> +	if (blk_integrity_rq(req) && req_op(req) == REQ_OP_READ &&
> +	    error == BLK_STS_OK)
> +		req->q->integrity.profile->complete_fn(req, nr_bytes);
> +
> +
>   	if (unlikely(error && !blk_rq_is_passthrough(req) &&
>   		     !(req->rq_flags & RQF_QUIET)))
>   		print_req_error(req, error, __func__);
> @@ -693,6 +694,10 @@ void blk_mq_start_request(struct request *rq)
>   		 */
>   		rq->nr_phys_segments++;
>   	}
> +
> +	if (blk_integrity_rq(rq) && req_op(rq) == REQ_OP_WRITE)
> +		rq->q->integrity.profile->prepare_fn(rq);
> +
>   }
>   EXPORT_SYMBOL(blk_mq_start_request);

While I like the idea of centralizing stuff like this, I'm also not
happy with adding checks like this to the fast path. But I guess it's
still better than stuff it in drivers.

You have an extra line after both of these above hunks for some reason.
Can you clean that up?

And the blk-mq.c hunk, we have 'q' in that function, use that instead of
rq->q.

-- 
Jens Axboe


WARNING: multiple messages have this Message-ID (diff)
From: Jens Axboe <axboe@kernel.dk>
To: Max Gurtovoy <maxg@mellanox.com>,
	linux-block@vger.kernel.org, martin.petersen@oracle.com,
	linux-nvme@lists.infradead.org, keith.busch@intel.com,
	hch@lst.de, sagi@grimberg.me
Cc: shlomin@mellanox.com, israelr@mellanox.com
Subject: Re: [PATCH v5 2/2] block: centralize PI remapping logic to the block layer
Date: Wed, 11 Sep 2019 16:01:11 -0600	[thread overview]
Message-ID: <380932df-2119-ad86-8bb2-3eccb005c949@kernel.dk> (raw)
In-Reply-To: <1568215397-15496-2-git-send-email-maxg@mellanox.com>

On 9/11/19 9:23 AM, Max Gurtovoy wrote:
> @@ -1405,6 +1406,11 @@ bool blk_update_request(struct request *req, blk_status_t error,
>   	if (!req->bio)
>   		return false;
>   
> +	if (blk_integrity_rq(req) && req_op(req) == REQ_OP_READ &&
> +	    error == BLK_STS_OK)
> +		req->q->integrity.profile->complete_fn(req, nr_bytes);
> +
> +
>   	if (unlikely(error && !blk_rq_is_passthrough(req) &&
>   		     !(req->rq_flags & RQF_QUIET)))
>   		print_req_error(req, error, __func__);
> @@ -693,6 +694,10 @@ void blk_mq_start_request(struct request *rq)
>   		 */
>   		rq->nr_phys_segments++;
>   	}
> +
> +	if (blk_integrity_rq(rq) && req_op(rq) == REQ_OP_WRITE)
> +		rq->q->integrity.profile->prepare_fn(rq);
> +
>   }
>   EXPORT_SYMBOL(blk_mq_start_request);

While I like the idea of centralizing stuff like this, I'm also not
happy with adding checks like this to the fast path. But I guess it's
still better than stuff it in drivers.

You have an extra line after both of these above hunks for some reason.
Can you clean that up?

And the blk-mq.c hunk, we have 'q' in that function, use that instead of
rq->q.

-- 
Jens Axboe


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2019-09-11 22:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-11 15:23 [PATCH v5 1/2] block: use symbolic constants for t10_pi type Max Gurtovoy
2019-09-11 15:23 ` Max Gurtovoy
2019-09-11 15:23 ` [PATCH v5 2/2] block: centralize PI remapping logic to the block layer Max Gurtovoy
2019-09-11 15:23   ` Max Gurtovoy
2019-09-11 22:01   ` Jens Axboe [this message]
2019-09-11 22:01     ` Jens Axboe
2019-09-13 22:31     ` Martin K. Petersen
2019-09-13 22:31       ` Martin K. Petersen
2019-09-16  8:01     ` Christoph Hellwig
2019-09-16  8:01       ` Christoph Hellwig
2019-09-13 22:26   ` Martin K. Petersen
2019-09-13 22:26     ` Martin K. Petersen
2019-09-13 22:21 ` [PATCH v5 1/2] block: use symbolic constants for t10_pi type Martin K. Petersen
2019-09-13 22:21   ` Martin K. Petersen

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=380932df-2119-ad86-8bb2-3eccb005c949@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=israelr@mellanox.com \
    --cc=keith.busch@intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=martin.petersen@oracle.com \
    --cc=maxg@mellanox.com \
    --cc=sagi@grimberg.me \
    --cc=shlomin@mellanox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.