Re: [PATCH] dm: support ioctls on mapped devices: fix with fake file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 23, 2006 at 07:45:20PM +0100, Christoph Hellwig wrote:
> NACK.  You should use ioctl_by_bdev and fix it to fake up the file pointer
> instead.  That keeps faking the file pointer in a single place and solves
> the problem of NULL file pointers for other cases like the s390 partitioning
> code, or various odd filesystems figuring out partition tables by themselves.
> For bonus points use a common helper for both blkdev_get and ioctl_by_bdev
> that creates the fake struct file.

Fixing the existing callers that pass a NULL file struct is a separate matter
that can be handled by a later patch, as can consolidating all the fake users.

I don't follow the reasoning behind backing out and using ioctl_by_bdev() here.
Isn't the primary reason for its existence to add a set_fs(KERNEL_DS) to the
mix?  I don't understand why device-mapper should interfere (surely
incorrectly?) at that level.

Alasdair
-- 
[email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux