lkml.org 
[lkml]   [2006]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/15] dm: support ioctls on mapped devices
Andrew Morton wrote:
> On Wed, 21 Jun 2006 20:31:21 +0100
> Alasdair G Kergon <agk@redhat.com> wrote:
>
>> From: Milan Broz <mbroz@redhat.com>
>>
>> Extend the core device-mapper infrastructure to accept arbitrary ioctls
>> on a mapped device provided that it has exactly one target and it is
>> capable of supporting ioctls.
>
> I don't understand that. We're taking an ioctl against a dm device and
> we're passing it through to an underlying device? Or something else?

Solving this situation: logical volume (say /dev/mapper/lv1) mapped in dm
to single device (/dev/sda):

If there is need to send ioctl you must know that /dev/mapper/lv1
is mapped to /dev/sda (and use /dev/sda for ioctl).
This is dm work - so send ioctl to /dev/mapper/lv1 directly
and let dm decide what to do.

This is supported only for single mapping. If there are more than one target
it will return -ENOTTY.

>> [We can't use unlocked_ioctl because we need 'inode': 'file' might be NULL.
>> Is it worth changing this?]
>
> It _should_ be possible to use unlocked_ioctl() - unlocked_ioctl() would be
> pretty useless if someone was passing it a NULL file*. More details?

yes,
(I prefer change block code to not pass NULL and use unlocked_ioctl,
- Alasdair ?)

see

drivers/char/raw.c:
126: return blkdev_ioctl(bdev->bd_inode, *NULL*, command, arg);

and block/ioctl.c: [file = NULL here]
206: if (disk->fops->unlocked_ioctl)
207: return disk->fops->unlocked_ioctl(*file*, cmd, arg);


--
Milan Broz
mbroz@redhat.com



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

\
 
 \ /
  Last update: 2006-06-22 10:18    [W:0.223 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site