public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bsg: Error print if device is not bidi capable when refusing a bidi command
@ 2009-01-20 14:13 Boaz Harrosh
  2009-01-20 14:15 ` Jens Axboe
  0 siblings, 1 reply; 9+ messages in thread
From: Boaz Harrosh @ 2009-01-20 14:13 UTC (permalink / raw)
  To: FUJITA Tomonori, Jens Axboe; +Cc: linux-scsi, open-osd mailing-list


If a bidi command was issued to a request_queue not mark as
QUEUE_FLAG_BIDI. Issue an error report. This is a misconfiguration
an administrator would like to know about, which is otherwise
hard to detect.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
---
 block/bsg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/block/bsg.c b/block/bsg.c
index 44a2a0f..977547a 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -270,6 +270,8 @@ bsg_map_hdr(struct bsg_device *bd, struct sg_io_v4 *hdr, fmode_t has_write_perm,
 
 	if (rw == WRITE && hdr->din_xfer_len) {
 		if (!test_bit(QUEUE_FLAG_BIDI, &q->queue_flags)) {
+			printk(KERN_ERR "bsg: Attempt to send a bidi command "
+			       "to a none bidi device\n");
 			ret = -EOPNOTSUPP;
 			goto out;
 		}
-- 
1.6.0.1


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

end of thread, other threads:[~2009-01-21  7:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-20 14:13 [PATCH] bsg: Error print if device is not bidi capable when refusing a bidi command Boaz Harrosh
2009-01-20 14:15 ` Jens Axboe
2009-01-20 14:38   ` [PATCH ver2 printk_ratelimit] " Boaz Harrosh
2009-01-20 14:46     ` Jens Axboe
2009-01-20 15:01       ` Boaz Harrosh
2009-01-20 15:31         ` Boaz Harrosh
2009-01-21  7:53           ` Jens Axboe
2009-01-20 23:10     ` FUJITA Tomonori
2009-01-20 14:41   ` [PATCH] " Boaz Harrosh

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