Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1709078
| From | Benjamin Block <bblock@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH 5/6] bsg: reduce unnecessary arguments for bsg_map_hdr() |
| Date | 2017-08-11 00:30 +0200 |
| Message-ID | <ud47M-3wS-5@gated-at.bofh.it> (permalink) |
| References | <ucA01-8w8-5@gated-at.bofh.it> <ucA02-8w8-17@gated-at.bofh.it> <ucS6C-3LT-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Aug 10, 2017 at 11:35:31AM +0200, Christoph Hellwig wrote:
> On Wed, Aug 09, 2017 at 04:11:19PM +0200, Benjamin Block wrote:
> > Since struct bsg_command is now used in every calling case, we don't
> > need separation of arguments anymore that are contained in the same
> > bsg_command.
> >
> > Signed-off-by: Benjamin Block <bblock@linux.vnet.ibm.com>
> > ---
> > block/bsg.c | 13 ++++++-------
> > 1 file changed, 6 insertions(+), 7 deletions(-)
> >
> > diff --git a/block/bsg.c b/block/bsg.c
> > index 8517361a9b3f..6ee2ffca808a 100644
> > --- a/block/bsg.c
> > +++ b/block/bsg.c
> > @@ -212,11 +212,12 @@ bsg_validate_sgv4_hdr(struct sg_io_v4 *hdr, int *op)
> > * map sg_io_v4 to a request.
> > */
> > static struct request *
> > -bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,
> > - u8 *reply_buffer)
> > +bsg_map_hdr(struct bsg_device *bd, struct bsg_command *bc,
> > + fmode_t has_write_perm)
>
> I wish we could just rename the argument to mode and pass on the
> whole file->f_mode while you are cleaning up this code. That should
> be a separate patch, though.
>
Hmm, I did a quick pass through the code and the only place this seems
to be used, is to pass it to blk_verify_command() if the subcommand used
in the BSG request is a SCSI Command. And this has the same semantics.
So I guess this would require adjustments to the whole stack, as this is
also used from the 'normal' SG side of the world.
Beste Grüße / Best regards,
- Benjamin Block
--
Linux on z Systems Development / IBM Systems & Technology Group
IBM Deutschland Research & Development GmbH
Vorsitz. AufsR.: Martina Koederitz / Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: AmtsG Stuttgart, HRB 243294
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 0/6] bsg: fix regression resulting in panics when sending commands via BSG and some sanity cleanups Benjamin Block <bblock@linux.vnet.ibm.com> - 2017-08-09 16:20 +0200
[RFC PATCH 5/6] bsg: reduce unnecessary arguments for bsg_map_hdr() Benjamin Block <bblock@linux.vnet.ibm.com> - 2017-08-09 16:20 +0200
Re: [RFC PATCH 5/6] bsg: reduce unnecessary arguments for bsg_map_hdr() Johannes Thumshirn <jthumshirn@suse.de> - 2017-08-10 10:30 +0200
Re: [RFC PATCH 5/6] bsg: reduce unnecessary arguments for bsg_map_hdr() Christoph Hellwig <hch@lst.de> - 2017-08-10 11:40 +0200
Re: [RFC PATCH 5/6] bsg: reduce unnecessary arguments for bsg_map_hdr() Benjamin Block <bblock@linux.vnet.ibm.com> - 2017-08-11 00:30 +0200
[RFC PATCH 3/6] bsg: scsi-transport: add compile-tests to prevent reply-buffer overflows Benjamin Block <bblock@linux.vnet.ibm.com> - 2017-08-09 16:20 +0200
Re: [RFC PATCH 3/6] bsg: scsi-transport: add compile-tests to prevent reply-buffer overflows Christoph Hellwig <hch@lst.de> - 2017-08-10 11:40 +0200
csiph-web