lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 22 Apr 2009 15:06:13 -0400
From:	Douglas Gilbert <dgilbert@...erlog.com>
To:	Boaz Harrosh <bharrosh@...asas.com>
CC:	Vladislav Bolkhovitin <vst@...b.net>, Tejun Heo <tj@...nel.org>,
	"Nicholas A. Bellinger" <nab@...ux-iscsi.org>,
	linux-scsi <linux-scsi@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	James Bottomley <James.Bottomley@...senPartnership.com>,
	FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
	Mike Christie <michaelc@...wisc.edu>,
	Jens Axboe <jens.axboe@...cle.com>,
	Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>,
	Geoff Levand <geoffrey.levand@...sony.com>,
	Christoph Hellwig <hch@....de>,
	Paul Mundt <lethal@...ux-sh.org>
Subject: Re: [PATCH] [Target_Core_Mod/pSCSI]: Add optional legacy	scsi_execute_async()
 usage for Linux/SCSI passthrough

Boaz Harrosh wrote:
> On 04/21/2009 03:15 PM, Vladislav Bolkhovitin wrote:
>> Boaz Harrosh, on 04/19/2009 02:56 PM wrote:
>>> On 04/17/2009 04:09 AM, Nicholas A. Bellinger wrote:
>> [..]
>>
>>> Are you aware that scsi_execute_async() has gone in 2.6.30-rc1?
>>>
>>> I'm not sure what would be the best alternative for you. I would say
>>> a bio, but it is still being debated. Your current options are:
>>>
>>> 1. bio_alloc then loop () bio_add_pc_page, and finally blk_rq_append_bio
>>>    (Which block people don't like)
>>> 2. sglist => page-pointers-array translation and blk_rq_map_user with 
>>>    struct rq_map_data mode. (not possible with all kind of sglists)
>>> 2. sglist => iovec translation and blk_rq_map_user_iov()
>>>    (Very very ugly mapping of pages to virtual pointers)
>>>
>>> I have a similar situation with my OSD code.
>> Do you have somewhere in it a need to run an arbitrary CDB with data 
>> pages stored in an sglist? Is that code accepted in the mainline?
>>
> 
> No, I have a direct bio which comes from two sources.
> 1. A bio prepared by a filesystem to describe a write/read to a file (osd object)
> 2. A cloned bio that comes from a stacking block-device over osd-object.
> 
> So I do not have an sglist at all, anywhere in code.
> 
>> If yes, why not to resurrect the necessary bits of scsi_execute_async() 
>> (option (1) above)? It was deleted, because in 2.6.30 there are no users 
>> of it left, but if there are users (OSD), then why not to return it? 
>> Seems nothing better for the sg->bio case can be invented.
>>
> 
> I hate scsi_execute_async() for lots of reasons, 
> 1. The cover-up of an historical abuse of sglists by sg/sr
> 2. Override of use_sg/data-pointer crap

Hate, abuse, crap??
[I believe the author of scsi_execute_async() is cc-ed on
your post.]

It served a purpose when the block layer was taking over
sglist handling and was synchronous. Block error handling
was non-existent or poor at the time. The block layer
wanted to disown the sg and st drivers because they didn't
fit its crude model. So scsi_execute_async() was our
"get out of the !@...ng block system" card.

Happily the block system has evolved to being able to
provide the async handling and error processing that
it, sg and st need. It is now a non-block system.

So scsi_execute_async() has become superfluous.

> 3. What is data-format got to do with sync/async execution

A fair bit in async. For example I'd like to know when data-out
buffers can be re-used and data-in buffers are ready. If it was
really clever it could alert me when thresholds were met in
the data-in buffer.

Doug Gilbert

> 4. the need of all that scsi_io_context and the re-invention
>    of async_done API.
> 5. ...
> Good riddence
> 
> But you might be looking into an API introduced by an RFC by
> Tejun Heo in the form of blk_rq_map_kern_sgl() which should
> be a more appropriate general API for your use.
> (And is not directly usable for me in OSD)
> 
>> Vlad
> 
> Boaz
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ