Thanks
We are trying to create this module without modifying existing kernel code, so that it will be easy to install it in existing environements. using a name like dm-1 is not user freindly , since the user needs to go and figure out this name before procceding. I see that there's a method dm_copy_name_and_uuid , but its not extern. I guess I'll just let the user set the name for now. Thanks -gili > Date: Mon, 6 Jul 2015 12:49:56 +0300 > From: n.borisov@xxxxxxxxxxxxxx > To: dm-devel@xxxxxxxxxx > Subject: Re: [dm-devel] Getting mapped device namw > > > > On 07/06/2015 12:40 PM, Gili B wrote: > > Thanks > > hash_cell is defined privately in dm_ioctl.c , so I cannot access it. > The beauty of open source software is that you can always export it for > you own needs :) > > > also dm_get_mdptr ,is not extern so I can't access it neither. > The function is exposed via device_mapper.h so you can just include this > header. Poke the code around you might come up with an even better idea. > But generally you wouldn't want to use the name the user provided. > Instead, use the name of the block device being created e.g. dm-1. This > can be obtained from the dm_get_device function and using the dm_dev struct > > > > > Thanks > > -gili > > > >> Date: Mon, 6 Jul 2015 12:32:33 +0300 > >> From: kernel@xxxxxxxx > >> To: dm-devel@xxxxxxxxxx > >> Subject: Re: [dm-devel] Getting mapped device namw > >> > >> > >> On 07/06/2015 12:20 PM, Gili B wrote: > >>> hi > >>> when a user run : > >>> dmsetup create [device name] .... > >>> Can a device mapper target find out the device name that the user entered ? > >> > >> Apparently the name is being associated with a hash_cell object, which > >> in turn is associated with struct mapped_device in dm_hash_insert > >> (called from dev_create, which is invoked as part of the create IOCTL). > >> So presumably if you get an instance of struct mapped_device and then > >> invoke dm_get_mdptr(md). What you'd get is a pointer to struct hash_cell > >> > >>> I need it for creating entries in proc for example. > >>> > >>> Thanks > >>> -gili > >>> > >>> > >>> > >>> > >>> -- > >>> dm-devel mailing list > >>> dm-devel@xxxxxxxxxx > >>> https://www.redhat.com/mailman/listinfo/dm-devel > >>> > >> > >> -- > >> dm-devel mailing list > >> dm-devel@xxxxxxxxxx > >> https://www.redhat.com/mailman/listinfo/dm-devel > > > > > > > > > > -- > > dm-devel mailing list > > dm-devel@xxxxxxxxxx > > https://www.redhat.com/mailman/listinfo/dm-devel > > > > -- > dm-devel mailing list > dm-devel@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/dm-devel |
-- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel