On Tue, 20 Jan 2009 16:38:38 +0200 Boaz Harrosh <bharrosh@xxxxxxxxxxx> wrote: > > 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@xxxxxxxxxxx> > --- > block/bsg.c | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/block/bsg.c b/block/bsg.c > index 44a2a0f..1da14fe 100644 > --- a/block/bsg.c > +++ b/block/bsg.c > @@ -270,6 +270,11 @@ 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)) { > + if (printk_ratelimit()) { > + printk(KERN_ERR > + "bsg: Attempt to send a bidi command " > + "to a none bidi device\n"); > + } > ret = -EOPNOTSUPP; > goto out; I don't think that we need this patch. Returning -EOPNOTSUPP should be enough. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html