public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: pjones@redhat.com,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC] breakage in bsg
Date: Mon, 21 Jul 2008 07:27:48 +0100	[thread overview]
Message-ID: <20080721062748.GA5744@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20080720163406.GW28946@ZenIV.linux.org.uk>

On Sun, Jul 20, 2008 at 05:34:06PM +0100, Al Viro wrote:

> 	* cmd_filter thing is broken as well (we have no access to
> gendisk in question and there's a lot of obvious issues when you have
> several openers).
> 
> #2 and part of #3 are fixable, but I really don't see what to do with #1.
> If nothing else, it's absolutely incompatible with cmd_filter, even if you
> leave aside the issue with non-IDE/non-SCSI drivers.

Actually, cmd_filter changeset breaks all users of blk_verify_command().
It expects that struct file passed to will be that of a block device:
        inode = file->f_dentry->d_inode;
        if (!inode)
                return -EINVAL;

        disk = inode->i_bdev->bd_disk;

        return blk_cmd_filter_verify_command(&disk->cmd_filter,
                                                 cmd, &file->f_mode);

Unfortunately, all of those can get struct file of *character* device, with
obvious results.

The minimal fix is to pass disk / mode explicitly.  I'll post the patch,
but that still leaves bsg broken.

  reply	other threads:[~2008-07-21  6:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-20 16:34 [RFC] breakage in bsg Al Viro
2008-07-21  6:27 ` Al Viro [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-07-21 15:50 James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080721062748.GA5744@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pjones@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox