public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* bidi bsg is non-blocking
@ 2007-05-07 15:21 Daniel.E.Messinger
  2007-05-08  7:23 ` FUJITA Tomonori
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel.E.Messinger @ 2007-05-07 15:21 UTC (permalink / raw)
  To: tomof; +Cc: linux-scsi


Greetings to all,

I'm attempting to use the bidi variant of bsg to talk to an OSD target
device. I've run into an undesirable situation.

My application has a free-running receive loop (doing a read() on the bsg
device) waiting for responses to commands sent to bsg by another thread.
The problem is that the receive thread is getting ENODATA from the read()
when there are no commands pending.  I have NOT set non-blocking.

Note that the old sg driver was quite willing to block until there was a
response available. I find this scenario greatly preferable.

Could bsg be fixed so that read() blocks when there is nothing to return?



Dan Messinger
Seagate Technology Research



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

end of thread, other threads:[~2007-05-08 13:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-07 15:21 bidi bsg is non-blocking Daniel.E.Messinger
2007-05-08  7:23 ` FUJITA Tomonori
2007-05-08  7:31   ` FUJITA Tomonori
2007-05-08 12:21     ` Jens Axboe
2007-05-08 12:56       ` FUJITA Tomonori
2007-05-08 13:00         ` Jens Axboe
2007-05-08 13:30           ` FUJITA Tomonori

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