Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1498815 > unrolled thread

[PATCH 00/44] Convert FibreChannel bsg code to use bsg-lib

Started byJohannes Thumshirn <jthumshirn@suse.de>
First post2016-10-11 13:50 +0200
Last post2016-10-11 20:20 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 00/44] Convert FibreChannel bsg code to use bsg-lib Johannes Thumshirn <jthumshirn@suse.de> - 2016-10-11 13:50 +0200
    Re: [PATCH 00/44] Convert FibreChannel bsg code to use bsg-lib Christoph Hellwig <hch@infradead.org> - 2016-10-11 18:50 +0200
      Re: [PATCH 00/44] Convert FibreChannel bsg code to use bsg-lib Johannes Thumshirn <jthumshirn@suse.de> - 2016-10-12 09:10 +0200
    Re: [PATCH 00/44] Convert FibreChannel bsg code to use bsg-lib Hannes Reinecke <hare@suse.de> - 2016-10-11 20:20 +0200

#1498815 — [PATCH 00/44] Convert FibreChannel bsg code to use bsg-lib

FromJohannes Thumshirn <jthumshirn@suse.de>
Date2016-10-11 13:50 +0200
Subject[PATCH 00/44] Convert FibreChannel bsg code to use bsg-lib
Message-ID<sr3pT-666-3@gated-at.bofh.it>
This series converts the current bsg usage in the FibreChannel drivers over
to use bsg-lib. SAS will follow but 44 patches are big enough for one shot,
so I didn't want to include SAS in there as well.

It looks a bit huge but most of the patches are only code movement and slow
API conversions so everything still works and builds when doing git bisects.

I did take some inspiration from a similar patchset from Mike Christie
dating back to 2011 but it's not a 1:1 copy. Patch 43/44 is heavily based
on his series and attribution is given to him in the commit message.

It is currently regression tested on FCoE using the 'fcns' and
'fcrls'utilities.  I'm still trying to figure out how to test the other
LLDDs. So any pointer from the respective maintainers are appreciated
although the LLDD changes are purely mechanical. All they do is change from
'struct fc_bsg_job' to 'struct bsg_job' and corresponding changes in order
to get the series bisectable.

The idea for this change arose when discussing racy sysfs handling the FC
bsg code with Christoph and is a next step in moving all bsg clients to
bsg-lib to eventually clean up the in kernel bsg API.

Johannes Thumshirn (44):
  scsi: Get rid of struct fc_bsg_buffer
  bfa: don't use fc_bsg_job::request and fc_bsg_job::reply directly
  zfcp: don't use fc_bsg_job::request and fc_bsg_job::reply directly
  ibmvfc: don't use fc_bsg_job::request and fc_bsg_job::reply directly
  lpfc: don't use fc_bsg_job::request and fc_bsg_job::reply directly
  qla2xxx: don't use fc_bsg_job::request and fc_bsg_job::reply directly
  libfc: don't use fc_bsg_job::request and fc_bsg_job::reply directly
  scsi: fc: don't use fc_bsg_job::request and fc_bsg_job::reply directly
  scsi: fc: Export fc_bsg_jobdone
  zfcp: Use fc_bsg_jobdone()
  bfa: Use fc_bsg_jobdone()
  ibmvfc: Use fc_bsg_jobdone()
  libfc: Use fc_bsg_jobdone()
  lpfc: Use fc_bsg_jobdone()
  qla2xxx: Use fc_bsg_jobdone()
  scsi: fc: remove job_done method from struct fc_bsg_job
  scsi: Unify interfaces of fc_bsg_jobdone and bsg_job_done
  scsi: fc: provide fc_bsg_to_shost() helper
  scsi: fc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host
  bfa: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host
  lpfc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host
  qla2xxx: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host
  libfc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host
  ibmvfc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host
  zfcp: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host
  scsi: fc: provide fc_bsg_to_rport() helper
  scsi: fc: use fc_bsg_to_rport() to access a bsg_job's rport
  zfcp: use fc_bsg_to_rport() to access a bsg_job's rport
  qla2xxx: use fc_bsg_to_rport() to access a bsg_job's rport
  lpfc: use fc_bsg_to_rport() to access a bsg_job's rport
  libfc: use fc_bsg_to_rport() to access a bsg_job's rport
  ibmvfc: use fc_bsg_to_rport() to access a bsg_job's rport
  scsi: libfc: don't set FC_RQST_STATE_DONE before calling
    fc_bsg_jobdone()
  scsi: fc: implement kref backed reference counting
  block: add reference counting for struct bsg_job
  scsi: change FC drivers to use 'struct bsg_job'
  block: export bsg_destroy_job
  scsi: fc: Use bsg_destroy_job
  block: export bsg_softirq_done
  scsi: fc: use bsg_softirq_done
  scsi: fc: use bsg_job_done
  block: add bsg_job_put() and bsg_job_get()
  scsi: fc: move FC transport's bsg code to bsg-lib
  block: unexport bsg_softirq_done() again

 block/bsg-lib.c                  |  19 +-
 drivers/s390/scsi/zfcp_fc.c      |  33 +--
 drivers/scsi/bfa/bfad_bsg.c      |  62 +++---
 drivers/scsi/bfa/bfad_im.h       |   4 +-
 drivers/scsi/ibmvscsi/ibmvfc.c   |  40 ++--
 drivers/scsi/libfc/fc_lport.c    |  47 ++--
 drivers/scsi/lpfc/lpfc_bsg.c     | 375 +++++++++++++++++++-------------
 drivers/scsi/lpfc/lpfc_crtn.h    |   4 +-
 drivers/scsi/qla2xxx/qla_bsg.c   | 449 ++++++++++++++++++++++-----------------
 drivers/scsi/qla2xxx/qla_def.h   |   2 +-
 drivers/scsi/qla2xxx/qla_gbl.h   |   4 +-
 drivers/scsi/qla2xxx/qla_iocb.c  |  13 +-
 drivers/scsi/qla2xxx/qla_isr.c   |  52 +++--
 drivers/scsi/qla2xxx/qla_mr.c    |  15 +-
 drivers/scsi/scsi_transport_fc.c | 409 ++++++-----------------------------
 include/linux/bsg-lib.h          |   4 +
 include/scsi/libfc.h             |   2 +-
 include/scsi/scsi_transport_fc.h |  62 ++----
 18 files changed, 742 insertions(+), 854 deletions(-)

-- 
1.8.5.6

[toc] | [next] | [standalone]


#1499014

FromChristoph Hellwig <hch@infradead.org>
Date2016-10-11 18:50 +0200
Message-ID<sr8pA-DS-17@gated-at.bofh.it>
In reply to#1498815
Hi Johannes,

this looks great to me.  But is there a chance to consolidate it into
a more manageable set of patches?  E.g. all the patches to call
export fc_bsg_jobdone, use it directly and remove the function pointer
could go together, possibly even including the new calling convention.
Similar all the patches about fc_bsg_to_shost could be merged into one,
and if we add the bsg refcounting early, we could maybe skip a few
steps of the conversion later on?

[toc] | [prev] | [next] | [standalone]


#1499393

FromJohannes Thumshirn <jthumshirn@suse.de>
Date2016-10-12 09:10 +0200
Message-ID<srlPQ-12Y-21@gated-at.bofh.it>
In reply to#1499014
On Tue, Oct 11, 2016 at 09:49:38AM -0700, Christoph Hellwig wrote:
> Hi Johannes,
> 
> this looks great to me.  But is there a chance to consolidate it into
> a more manageable set of patches?  E.g. all the patches to call
> export fc_bsg_jobdone, use it directly and remove the function pointer
> could go together, possibly even including the new calling convention.
> Similar all the patches about fc_bsg_to_shost could be merged into one,
> and if we add the bsg refcounting early, we could maybe skip a few
> steps of the conversion later on?

Sure, I think 44 patches is a bit huge. Especially given the 0day bot
fallout it generated. Let me see how I can slim it down.

	Johannes

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

[toc] | [prev] | [next] | [standalone]


#1499127

FromHannes Reinecke <hare@suse.de>
Date2016-10-11 20:20 +0200
Message-ID<sr9OF-1Fj-17@gated-at.bofh.it>
In reply to#1498815
On 10/11/2016 01:28 PM, Johannes Thumshirn wrote:
> This series converts the current bsg usage in the FibreChannel drivers over
> to use bsg-lib. SAS will follow but 44 patches are big enough for one shot,
> so I didn't want to include SAS in there as well.
>
> It looks a bit huge but most of the patches are only code movement and slow
> API conversions so everything still works and builds when doing git bisects.
>
> I did take some inspiration from a similar patchset from Mike Christie
> dating back to 2011 but it's not a 1:1 copy. Patch 43/44 is heavily based
> on his series and attribution is given to him in the commit message.
>
> It is currently regression tested on FCoE using the 'fcns' and
> 'fcrls'utilities.  I'm still trying to figure out how to test the other
> LLDDs. So any pointer from the respective maintainers are appreciated
> although the LLDD changes are purely mechanical. All they do is change from
> 'struct fc_bsg_job' to 'struct bsg_job' and corresponding changes in order
> to get the series bisectable.
>
> The idea for this change arose when discussing racy sysfs handling the FC
> bsg code with Christoph and is a next step in moving all bsg clients to
> bsg-lib to eventually clean up the in kernel bsg API.
>
> Johannes Thumshirn (44):
>    scsi: Get rid of struct fc_bsg_buffer

>    bfa: don't use fc_bsg_job::request and fc_bsg_job::reply directly
>    zfcp: don't use fc_bsg_job::request and fc_bsg_job::reply directly
>    ibmvfc: don't use fc_bsg_job::request and fc_bsg_job::reply directly
>    lpfc: don't use fc_bsg_job::request and fc_bsg_job::reply directly
>    qla2xxx: don't use fc_bsg_job::request and fc_bsg_job::reply directly
>    libfc: don't use fc_bsg_job::request and fc_bsg_job::reply directly
>    scsi: fc: don't use fc_bsg_job::request and fc_bsg_job::reply directly
Please merge these in a single patch.
You do a similar thing later (in the patch 'change FC drivers to use 
'struct bsg_job''), so there's no need to have them a separate patches here.

>    scsi: fc: Export fc_bsg_jobdone
>    zfcp: Use fc_bsg_jobdone()
>    bfa: Use fc_bsg_jobdone()
>    ibmvfc: Use fc_bsg_jobdone()
>    libfc: Use fc_bsg_jobdone()
>    lpfc: Use fc_bsg_jobdone()
>    qla2xxx: Use fc_bsg_jobdone()
Same for these patches

>    scsi: fc: remove job_done method from struct fc_bsg_job
>    scsi: Unify interfaces of fc_bsg_jobdone and bsg_job_done
>    scsi: fc: provide fc_bsg_to_shost() helper
>    scsi: fc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host
>    bfa: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host
>    lpfc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host
>    qla2xxx: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host
>    libfc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host
>    ibmvfc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host
>    zfcp: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host
And these

>    scsi: fc: provide fc_bsg_to_rport() helper
>    scsi: fc: use fc_bsg_to_rport() to access a bsg_job's rport
>    zfcp: use fc_bsg_to_rport() to access a bsg_job's rport
>    qla2xxx: use fc_bsg_to_rport() to access a bsg_job's rport
>    lpfc: use fc_bsg_to_rport() to access a bsg_job's rport
>    libfc: use fc_bsg_to_rport() to access a bsg_job's rport
>    ibmvfc: use fc_bsg_to_rport() to access a bsg_job's rport
And these.

That should cut down the number of patches by quite a bit.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web