From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH] block: drop "sending ioctl to a partition" message Date: Thu, 21 Sep 2017 07:53:00 -0700 Message-ID: <20170921145300.GA1617@infradead.org> References: <1506005362-13429-1-git-send-email-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, axboe@kernel.de, linux-block@vger.kernel.org To: Paolo Bonzini Return-path: Content-Disposition: inline In-Reply-To: <1506005362-13429-1-git-send-email-pbonzini@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org This looks ok to me, but do we even need to keep the special cases above? Is there anything relying on the safe but not very useful ioctls? Condensing the thing down to: int scsi_verify_blk_ioctl(struct block_device *bd, unsigned int cmd) { if (bd && bd == bd->bd_contains) return 0; if (capable(CAP_SYS_RAWIO)) return 0; return -ENOIOCTLCMD; } would certainly be nice.