Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* crash in sg_alloc_table_chained
@ 2017-01-23 22:53 Trapp, Darren
  2017-01-23 23:08 ` Keith Busch
  2017-01-24  7:47 ` Christoph Hellwig
  0 siblings, 2 replies; 5+ messages in thread
From: Trapp, Darren @ 2017-01-23 22:53 UTC (permalink / raw)


Gents,

I am using 4.10rc4 kernel with the FC-NVME transport to format a partition on a remote nvme device.  I?ve created a partition on the device, but when I try and create a FS via:

Mkfs ?t ext3 /dev/nvme0n1p1

I get a crash in sg_alloc_table_chained at the BUG_ON(!nents).  It is called from nvme_fc_map_data:
	        ret = sg_alloc_table_chained(&freq->sg_table, rq->nr_phys_segments,
                        freq->sg_table.sgl);

 In this case, rq->nr_phys_segments is 0.  For reference blk_rq_payload_bytes returned 0x10.

Any ideas what is going on?  


Darren

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

* crash in sg_alloc_table_chained
  2017-01-23 22:53 crash in sg_alloc_table_chained Trapp, Darren
@ 2017-01-23 23:08 ` Keith Busch
  2017-01-23 23:10   ` Trapp, Darren
  2017-01-24  7:47 ` Christoph Hellwig
  1 sibling, 1 reply; 5+ messages in thread
From: Keith Busch @ 2017-01-23 23:08 UTC (permalink / raw)


On Mon, Jan 23, 2017@10:53:04PM +0000, Trapp, Darren wrote:
> Gents,
> 
> I am using 4.10rc4 kernel with the FC-NVME transport to format a partition on a remote nvme device.  I?ve created a partition on the device, but when I try and create a FS via:
> 
> Mkfs ?t ext3 /dev/nvme0n1p1
> 
> I get a crash in sg_alloc_table_chained at the BUG_ON(!nents).  It is called from nvme_fc_map_data:
> 	        ret = sg_alloc_table_chained(&freq->sg_table, rq->nr_phys_segments,
>                         freq->sg_table.sgl);
> 
>  In this case, rq->nr_phys_segments is 0.  For reference blk_rq_payload_bytes returned 0x10.
> 
> Any ideas what is going on?  

Just to confirm a suspicion, is it successful if you run:

  # mkfs.ext3 /dev/nvme0n1p1 -E nodiscard

?

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

* crash in sg_alloc_table_chained
  2017-01-23 23:08 ` Keith Busch
@ 2017-01-23 23:10   ` Trapp, Darren
  0 siblings, 0 replies; 5+ messages in thread
From: Trapp, Darren @ 2017-01-23 23:10 UTC (permalink / raw)


So that works other than hitting a WARN_ON_ONCE in nvme_fc_start_fcp_op  at: 
        WARN_ON_ONCE(sqe->common.command_id != cpu_to_le16(op->rqno));


I am able to mount and unmount the FS now.  

Darren 

On 1/23/17, 3:08 PM, "Keith Busch" <keith.busch@intel.com> wrote:

    On Mon, Jan 23, 2017@10:53:04PM +0000, Trapp, Darren wrote:
    > Gents,
    > 
    > I am using 4.10rc4 kernel with the FC-NVME transport to format a partition on a remote nvme device.  I?ve created a partition on the device, but when I try and create a FS via:
    > 
    > Mkfs ?t ext3 /dev/nvme0n1p1
    > 
    > I get a crash in sg_alloc_table_chained at the BUG_ON(!nents).  It is called from nvme_fc_map_data:
    > 	        ret = sg_alloc_table_chained(&freq->sg_table, rq->nr_phys_segments,
    >                         freq->sg_table.sgl);
    > 
    >  In this case, rq->nr_phys_segments is 0.  For reference blk_rq_payload_bytes returned 0x10.
    > 
    > Any ideas what is going on?  
    
    Just to confirm a suspicion, is it successful if you run:
    
      # mkfs.ext3 /dev/nvme0n1p1 -E nodiscard
    
    ?
    

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

* crash in sg_alloc_table_chained
  2017-01-23 22:53 crash in sg_alloc_table_chained Trapp, Darren
  2017-01-23 23:08 ` Keith Busch
@ 2017-01-24  7:47 ` Christoph Hellwig
  2017-01-24 19:20   ` Trapp, Darren
  1 sibling, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2017-01-24  7:47 UTC (permalink / raw)


Hi Darren,

you probably want this patch that I sent last week:

   "Subject: [PATCH] nvme-fc: use blk_rq_nr_phys_segments"

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

* crash in sg_alloc_table_chained
  2017-01-24  7:47 ` Christoph Hellwig
@ 2017-01-24 19:20   ` Trapp, Darren
  0 siblings, 0 replies; 5+ messages in thread
From: Trapp, Darren @ 2017-01-24 19:20 UTC (permalink / raw)


Thanks Christoph.  That patch worked.  



Darren Trapp
Senior Director - Engineering
darren.trapp at cavium.com <mailto:darren.trapp at caviumnetworks.com>
T 949-389-6273
M 949-212-8576
26650 Aliso Viejo Pkwy, Aliso Viejo, CA 92656
www.qlogic.com <http://www.qlogic.com/>
 <http://www.qlogic.com/>

On 1/23/17, 11:47 PM, "Christoph Hellwig" <hch@infradead.org> wrote:

    Hi Darren,
    
    you probably want this patch that I sent last week:
    
       "Subject: [PATCH] nvme-fc: use blk_rq_nr_phys_segments"
    

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

end of thread, other threads:[~2017-01-24 19:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-23 22:53 crash in sg_alloc_table_chained Trapp, Darren
2017-01-23 23:08 ` Keith Busch
2017-01-23 23:10   ` Trapp, Darren
2017-01-24  7:47 ` Christoph Hellwig
2017-01-24 19:20   ` Trapp, Darren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox