All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the block tree with the s390 tree
@ 2010-08-24  0:53 Stephen Rothwell
  2010-08-24  7:13 ` Martin Schwidefsky
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2010-08-24  0:53 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-next, linux-kernel, Peter Oberparleiter,
	Martin Schwidefsky, Heiko Carstens

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]

Hi Jens,

Today's linux-next merge of the block tree got a conflict in
drivers/s390/char/tape_block.c between commit
7dc74a8fdb22f4410a2d8e45353c9ea75821a9ba ("[S390] tape: fix kernel panic
when setting tape device offline") from the s390 tree and commit
52cc2eef31587b22ce9fbe77b064a031a9613ab0 ("block: switch s390 tape_block
and mg_disk to elevator_change()") from the block tree.

I assume that the latter removes the need for the former, so I used that.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: manual merge of the block tree with the s390 tree
  2010-08-24  0:53 linux-next: manual merge of the block tree with the s390 tree Stephen Rothwell
@ 2010-08-24  7:13 ` Martin Schwidefsky
  2010-08-24  8:17   ` Jens Axboe
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Schwidefsky @ 2010-08-24  7:13 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Jens Axboe, linux-next, linux-kernel, Peter Oberparleiter,
	Heiko Carstens

Hi Stephen,

On Tue, 24 Aug 2010 10:53:28 +1000
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Jens,
> 
> Today's linux-next merge of the block tree got a conflict in
> drivers/s390/char/tape_block.c between commit
> 7dc74a8fdb22f4410a2d8e45353c9ea75821a9ba ("[S390] tape: fix kernel panic
> when setting tape device offline") from the s390 tree and commit
> 52cc2eef31587b22ce9fbe77b064a031a9613ab0 ("block: switch s390 tape_block
> and mg_disk to elevator_change()") from the block tree.
> 
> I assume that the latter removes the need for the former, so I used that.

The patch in the block tree includes the fix for the s390 tape driver.
So I guess its best if I remove the s390 specific patch from the
git390 tree.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: manual merge of the block tree with the s390 tree
  2010-08-24  7:13 ` Martin Schwidefsky
@ 2010-08-24  8:17   ` Jens Axboe
  0 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2010-08-24  8:17 UTC (permalink / raw)
  To: Martin Schwidefsky
  Cc: Stephen Rothwell, linux-next, linux-kernel, Peter Oberparleiter,
	Heiko Carstens

On 2010-08-24 09:13, Martin Schwidefsky wrote:
> Hi Stephen,
> 
> On Tue, 24 Aug 2010 10:53:28 +1000
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
>> Hi Jens,
>>
>> Today's linux-next merge of the block tree got a conflict in
>> drivers/s390/char/tape_block.c between commit
>> 7dc74a8fdb22f4410a2d8e45353c9ea75821a9ba ("[S390] tape: fix kernel panic
>> when setting tape device offline") from the s390 tree and commit
>> 52cc2eef31587b22ce9fbe77b064a031a9613ab0 ("block: switch s390 tape_block
>> and mg_disk to elevator_change()") from the block tree.
>>
>> I assume that the latter removes the need for the former, so I used that.
> 
> The patch in the block tree includes the fix for the s390 tape driver.
> So I guess its best if I remove the s390 specific patch from the
> git390 tree.
> 

Probably best, since the change in my tree is different from the
one you likely merged. So it will clash, as Stephen also reports.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: manual merge of the block tree with the s390 tree
  2017-06-13  6:20 ` Christoph Hellwig
  2017-06-13  6:28   ` Stephen Rothwell
@ 2017-06-13 11:20   ` Sebastian Ott
  1 sibling, 0 replies; 7+ messages in thread
From: Sebastian Ott @ 2017-06-13 11:20 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Stephen Rothwell, Jens Axboe, Linux-Next Mailing List,
	Linux Kernel Mailing List

Hi,

On Tue, 13 Jun 2017, Christoph Hellwig wrote:
> Btw, scm_blk.c blk-mq conversion seems odd if not broken.  It should
> always call blk_mq_complete_request from scm_request_finish and
> then pass the error to blk_mq_end_request frin
> there.

OK. I had added that because rq->errors went away. Would the change below
be ok?

diff --git a/drivers/s390/block/scm_blk.c b/drivers/s390/block/scm_blk.c
index 71c0158..86a8d80 100644
--- a/drivers/s390/block/scm_blk.c
+++ b/drivers/s390/block/scm_blk.c
@@ -249,13 +249,13 @@ static void scm_request_requeue(struct scm_request *scmrq)
 static void scm_request_finish(struct scm_request *scmrq)
 {
 	struct scm_blk_dev *bdev = scmrq->bdev;
+	int *error;
 	int i;
 
 	for (i = 0; i < nr_requests_per_io && scmrq->request[i]; i++) {
-		if (scmrq->error)
-			blk_mq_end_request(scmrq->request[i], scmrq->error);
-		else
-			blk_mq_complete_request(scmrq->request[i]);
+		error = blk_mq_rq_to_pdu(scmrq->request[i]);
+		*error = scmrq->error;
+		blk_mq_complete_request(scmrq->request[i]);
 	}
 
 	atomic_dec(&bdev->queued_reqs);
@@ -415,7 +415,9 @@ void scm_blk_irq(struct scm_device *scmdev, void *data, int error)
 
 static void scm_blk_request_done(struct request *req)
 {
-	blk_mq_end_request(req, 0);
+	int *error = blk_mq_rq_to_pdu(req);
+
+	blk_mq_end_request(req, *error);
 }
 
 static const struct block_device_operations scm_blk_devops = {
@@ -448,6 +450,7 @@ int scm_blk_dev_setup(struct scm_blk_dev *bdev, struct scm_device *scmdev)
 	atomic_set(&bdev->queued_reqs, 0);
 
 	bdev->tag_set.ops = &scm_mq_ops;
+	bdev->tag_set.cmd_size = sizeof(int);
 	bdev->tag_set.nr_hw_queues = nr_requests;
 	bdev->tag_set.queue_depth = nr_requests_per_io * nr_requests;
 	bdev->tag_set.flags = BLK_MQ_F_SHOULD_MERGE;

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: linux-next: manual merge of the block tree with the s390 tree
  2017-06-13  6:20 ` Christoph Hellwig
@ 2017-06-13  6:28   ` Stephen Rothwell
  2017-06-13 11:20   ` Sebastian Ott
  1 sibling, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2017-06-13  6:28 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Jens Axboe, Linux-Next Mailing List, Linux Kernel Mailing List,
	Sebastian Ott, Martin Schwidefsky, Heiko Carstens

Hi Christoph,

On Tue, 13 Jun 2017 08:20:55 +0200 Christoph Hellwig <hch@lst.de> wrote:
>
> Btw, scm_blk.c blk-mq conversion seems odd if not broken.  It should
> always call blk_mq_complete_request from scm_request_finish and
> then pass the error to blk_mq_end_request frin
> there.
> 
> It would be great if such major block driver changes were Cc'ed to
> linux-block.

And I missed cc'ing the s390 guys with my report :-(

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: manual merge of the block tree with the s390 tree
  2017-06-13  3:06 Stephen Rothwell
@ 2017-06-13  6:20 ` Christoph Hellwig
  2017-06-13  6:28   ` Stephen Rothwell
  2017-06-13 11:20   ` Sebastian Ott
  0 siblings, 2 replies; 7+ messages in thread
From: Christoph Hellwig @ 2017-06-13  6:20 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Jens Axboe, Linux-Next Mailing List, Linux Kernel Mailing List,
	Christoph Hellwig, Sebastian Ott

Btw, scm_blk.c blk-mq conversion seems odd if not broken.  It should
always call blk_mq_complete_request from scm_request_finish and
then pass the error to blk_mq_end_request frin
there.

It would be great if such major block driver changes were Cc'ed to
linux-block.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* linux-next: manual merge of the block tree with the s390 tree
@ 2017-06-13  3:06 Stephen Rothwell
  2017-06-13  6:20 ` Christoph Hellwig
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2017-06-13  3:06 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Christoph Hellwig, Sebastian Ott

Hi Jens,

Today's linux-next merge of the block tree got conflicts in:

  drivers/s390/block/scm_blk.c
  drivers/s390/block/scm_blk.h

between commits:

  94d26bfcf312 ("s390/scm: remove cluster option")
  c7b3e92331fb ("s390/scm: convert tasklet")

from the s390 tree and commit:

  2a842acab109 ("block: introduce new block status code type")

from the block tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/s390/block/scm_blk.c
index 725f912fab41,3c2c84b72877..000000000000
--- a/drivers/s390/block/scm_blk.c
+++ b/drivers/s390/block/scm_blk.c
@@@ -228,12 -231,22 +228,12 @@@ static inline void scm_request_init(str
  	aob->request.data = (u64) aobrq;
  	scmrq->bdev = bdev;
  	scmrq->retries = 4;
- 	scmrq->error = 0;
+ 	scmrq->error = BLK_STS_OK;
  	/* We don't use all msbs - place aidaws at the end of the aob page. */
  	scmrq->next_aidaw = (void *) &aob->msb[nr_requests_per_io];
 -	scm_request_cluster_init(scmrq);
  }
  
 -static void scm_ensure_queue_restart(struct scm_blk_dev *bdev)
 -{
 -	if (atomic_read(&bdev->queued_reqs)) {
 -		/* Queue restart is triggered by the next interrupt. */
 -		return;
 -	}
 -	blk_delay_queue(bdev->rq, SCM_QUEUE_DELAY);
 -}
 -
 -void scm_request_requeue(struct scm_request *scmrq)
 +static void scm_request_requeue(struct scm_request *scmrq)
  {
  	struct scm_blk_dev *bdev = scmrq->bdev;
  	int i;
@@@ -394,28 -419,43 +394,28 @@@ restart
  		return;
  
  requeue:
 -	spin_lock_irqsave(&bdev->rq_lock, flags);
  	scm_request_requeue(scmrq);
 -	spin_unlock_irqrestore(&bdev->rq_lock, flags);
  }
  
- void scm_blk_irq(struct scm_device *scmdev, void *data, int error)
 -static void scm_blk_tasklet(struct scm_blk_dev *bdev)
++void scm_blk_irq(struct scm_device *scmdev, void *data, blk_status_t error)
  {
 -	struct scm_request *scmrq;
 -	unsigned long flags;
 -
 -	spin_lock_irqsave(&bdev->lock, flags);
 -	while (!list_empty(&bdev->finished_requests)) {
 -		scmrq = list_first_entry(&bdev->finished_requests,
 -					 struct scm_request, list);
 -		list_del(&scmrq->list);
 -		spin_unlock_irqrestore(&bdev->lock, flags);
 +	struct scm_request *scmrq = data;
  
 -		if (scmrq->error && scmrq->retries-- > 0) {
 +	scmrq->error = error;
 +	if (error) {
 +		__scmrq_log_error(scmrq);
 +		if (scmrq->retries-- > 0) {
  			scm_blk_handle_error(scmrq);
 -
 -			/* Request restarted or requeued, handle next. */
 -			spin_lock_irqsave(&bdev->lock, flags);
 -			continue;
 +			return;
  		}
 +	}
  
 -		if (scm_test_cluster_request(scmrq)) {
 -			scm_cluster_request_irq(scmrq);
 -			spin_lock_irqsave(&bdev->lock, flags);
 -			continue;
 -		}
 +	scm_request_finish(scmrq);
 +}
  
 -		scm_request_finish(scmrq);
 -		spin_lock_irqsave(&bdev->lock, flags);
 -	}
 -	spin_unlock_irqrestore(&bdev->lock, flags);
 -	/* Look out for more requests. */
 -	blk_run_queue(bdev->rq);
 +static void scm_blk_request_done(struct request *req)
 +{
 +	blk_mq_end_request(req, 0);
  }
  
  static const struct block_device_operations scm_blk_devops = {
diff --cc drivers/s390/block/scm_blk.h
index 242d17a91920,cd598d1a4eae..000000000000
--- a/drivers/s390/block/scm_blk.h
+++ b/drivers/s390/block/scm_blk.h
@@@ -32,7 -35,14 +32,7 @@@ struct scm_request 
  	struct aob *aob;
  	struct list_head list;
  	u8 retries;
- 	int error;
+ 	blk_status_t error;
 -#ifdef CONFIG_SCM_BLOCK_CLUSTER_WRITE
 -	struct {
 -		enum {CLUSTER_NONE, CLUSTER_READ, CLUSTER_WRITE} state;
 -		struct list_head list;
 -		void **buf;
 -	} cluster;
 -#endif
  };
  
  #define to_aobrq(rq) container_of((void *) rq, struct aob_rq_header, data)
@@@ -40,8 -50,11 +40,8 @@@
  int scm_blk_dev_setup(struct scm_blk_dev *, struct scm_device *);
  void scm_blk_dev_cleanup(struct scm_blk_dev *);
  void scm_blk_set_available(struct scm_blk_dev *);
- void scm_blk_irq(struct scm_device *, void *, int);
+ void scm_blk_irq(struct scm_device *, void *, blk_status_t);
  
 -void scm_request_finish(struct scm_request *);
 -void scm_request_requeue(struct scm_request *);
 -
  struct aidaw *scm_aidaw_fetch(struct scm_request *scmrq, unsigned int bytes);
  
  int scm_drv_init(void);

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-06-13 11:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-24  0:53 linux-next: manual merge of the block tree with the s390 tree Stephen Rothwell
2010-08-24  7:13 ` Martin Schwidefsky
2010-08-24  8:17   ` Jens Axboe
2017-06-13  3:06 Stephen Rothwell
2017-06-13  6:20 ` Christoph Hellwig
2017-06-13  6:28   ` Stephen Rothwell
2017-06-13 11:20   ` Sebastian Ott

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.