Message ID | 1596062878-4238-2-git-send-email-ritika.srivastava@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] block: Return blk_status_t instead of errno codes | expand |
On Wed, Jul 29, 2020 at 03:47:57PM -0700, Ritika Srivastava wrote: > Replace returning legacy errno codes with blk_status_t in > blk_cloned_rq_check_limits(). > > Signed-off-by: Ritika Srivastava <ritika.srivastava@oracle.com> Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de>
Hi Jens, Can the following patches please be applied. [PATCH 1/2] block: Return blk_status_t instead of errno codes [PATCH v4 2/2] block: better deal with the delayed not supported case in blk_cloned_rq_check_limits Thanks, Ritika > On Aug 13, 2020, at 11:26 PM, Christoph Hellwig <hch@infradead.org> wrote: > > On Wed, Jul 29, 2020 at 03:47:57PM -0700, Ritika Srivastava wrote: >> Replace returning legacy errno codes with blk_status_t in >> blk_cloned_rq_check_limits(). >> >> Signed-off-by: Ritika Srivastava <ritika.srivastava@oracle.com> > > Looks good, > > Reviewed-by: Christoph Hellwig <hch@lst.de>
On 8/26/20 11:03 AM, Ritika Srivastava wrote: > Hi Jens, > > Can the following patches please be applied. > > [PATCH 1/2] block: Return blk_status_t instead of errno codes > [PATCH v4 2/2] block: better deal with the delayed not supported case in blk_cloned_rq_check_limits Can you resend them against the current tree? They don't apply.
Sure, Will resend them. Thanks, Ritika > On Aug 26, 2020, at 10:19 AM, Jens Axboe <axboe@kernel.dk> wrote: > > On 8/26/20 11:03 AM, Ritika Srivastava wrote: >> Hi Jens, >> >> Can the following patches please be applied. >> >> [PATCH 1/2] block: Return blk_status_t instead of errno codes >> [PATCH v4 2/2] block: better deal with the delayed not supported case in blk_cloned_rq_check_limits > > Can you resend them against the current tree? They don't apply. > > -- > Jens Axboe >
Hi Jens, The two patches apply on branch block-5.9 in linux-block.git I apply the patches using git am xxx.patch. $ git log --oneline --decorate -n 5 4d8e990 (HEAD, block59) block: better deal with the delayed not supported case in blk_cloned_rq_check_limits 9a8a3d4 block: Return blk_status_t instead of errno codes a433d72 (origin/block-5.9) Merge branch 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-5.9 6af10a3 md/raid5: make sure stripe_size as power of two 79e5dc5 loop: Set correct device size when using LOOP_CONFIGURE Please let me know if I missed something and should test on another branch? Thanks, Ritika > On Aug 26, 2020, at 10:23 AM, Ritika Srivastava <ritika.srivastava@oracle.com> wrote: > > Sure, Will resend them. > > Thanks, > Ritika > >> On Aug 26, 2020, at 10:19 AM, Jens Axboe <axboe@kernel.dk> wrote: >> >> On 8/26/20 11:03 AM, Ritika Srivastava wrote: >>> Hi Jens, >>> >>> Can the following patches please be applied. >>> >>> [PATCH 1/2] block: Return blk_status_t instead of errno codes >>> [PATCH v4 2/2] block: better deal with the delayed not supported case in blk_cloned_rq_check_limits >> >> Can you resend them against the current tree? They don't apply. >> >> -- >> Jens Axboe >> >
On 8/28/20 9:52 AM, Ritika Srivastava wrote: > Hi Jens, > > The two patches apply on branch block-5.9 in linux-block.git > > I apply the patches using git am xxx.patch. > > $ git log --oneline --decorate -n 5 > 4d8e990 (HEAD, block59) block: better deal with the delayed not supported case in blk_cloned_rq_check_limits > 9a8a3d4 block: Return blk_status_t instead of errno codes > a433d72 (origin/block-5.9) Merge branch 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-5.9 > 6af10a3 md/raid5: make sure stripe_size as power of two > 79e5dc5 loop: Set correct device size when using LOOP_CONFIGURE > > Please let me know if I missed something and should test on another branch? It doesn't on my 5.10 branch, but I haven't pushed that out yet so can't really fault you for that. I'll get to it in the next day or so.
Thanks Jens for the update. I will look out for 5.10 branch and send the updated patches. Thanks, Ritika > On Aug 28, 2020, at 8:52 AM, Jens Axboe <axboe@kernel.dk> wrote: > > On 8/28/20 9:52 AM, Ritika Srivastava wrote: >> Hi Jens, >> >> The two patches apply on branch block-5.9 in linux-block.git >> >> I apply the patches using git am xxx.patch. >> >> $ git log --oneline --decorate -n 5 >> 4d8e990 (HEAD, block59) block: better deal with the delayed not supported case in blk_cloned_rq_check_limits >> 9a8a3d4 block: Return blk_status_t instead of errno codes >> a433d72 (origin/block-5.9) Merge branch 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-5.9 >> 6af10a3 md/raid5: make sure stripe_size as power of two >> 79e5dc5 loop: Set correct device size when using LOOP_CONFIGURE >> >> Please let me know if I missed something and should test on another branch? > > It doesn't on my 5.10 branch, but I haven't pushed that out yet so can't > really fault you for that. I'll get to it in the next day or so. > > -- > Jens Axboe >
On 8/28/20 11:10 AM, Ritika Srivastava wrote: > Thanks Jens for the update. > I will look out for 5.10 branch and send the updated patches. I pushed it out this morning.
Thanks Jens for the update. I will send the patches on top of 5.10 branch. Thanks, Ritika > On Aug 31, 2020, at 8:38 AM, Jens Axboe <axboe@kernel.dk> wrote: > > On 8/28/20 11:10 AM, Ritika Srivastava wrote: >> Thanks Jens for the update. >> I will look out for 5.10 branch and send the updated patches. > > I pushed it out this morning. > > -- > Jens Axboe >
diff --git a/block/blk-core.c b/block/blk-core.c index 9bfaee0..d241ab8 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1220,14 +1220,14 @@ blk_qc_t submit_bio(struct bio *bio) * limits when retrying requests on other queues. Those requests need * to be checked against the new queue limits again during dispatch. */ -static int blk_cloned_rq_check_limits(struct request_queue *q, +static blk_status_t blk_cloned_rq_check_limits(struct request_queue *q, struct request *rq) { if (blk_rq_sectors(rq) > blk_queue_get_max_sectors(q, req_op(rq))) { printk(KERN_ERR "%s: over max size limit. (%u > %u)\n", __func__, blk_rq_sectors(rq), blk_queue_get_max_sectors(q, req_op(rq))); - return -EIO; + return BLK_STS_IOERR; } /* @@ -1240,10 +1240,10 @@ static int blk_cloned_rq_check_limits(struct request_queue *q, if (rq->nr_phys_segments > queue_max_segments(q)) { printk(KERN_ERR "%s: over max segments limit. (%hu > %hu)\n", __func__, rq->nr_phys_segments, queue_max_segments(q)); - return -EIO; + return BLK_STS_IOERR; } - return 0; + return BLK_STS_OK; } /**
Replace returning legacy errno codes with blk_status_t in blk_cloned_rq_check_limits(). Signed-off-by: Ritika Srivastava <ritika.srivastava@oracle.com> --- block/blk-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)