Re: [RFC PATCH] cryptsetup: replace udevsettle calls with temporary device error remapping

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

 



Clemens Fruhwirth wrote:
> Thanks for the patch. Your suggestion is imho the right approach to
> this problem.
> 
> At Thu, 04 Sep 2008 15:24:05 +0200,
> Milan Broz <mbroz@xxxxxxxxxx> wrote:
> 
>> - It uses dm_task_update_nodes() instead of dm library reinitialization
>> workaround.
> 
> I remember that this symbol isn't exported in all versions of
> libdevmapper, that's why it's still the reinitialization trick. (Last
> time I checked reinitialization didn't cause much harm).

well, it was introduced in DM source tree in December 2005.

>> -static int clear_mapping(const char *name, struct setup_backend *backend)
>> +static int clear_mapping(struct crypt_options *options, struct setup_backend *backend)
>>  {
>> -	struct crypt_options options;
>> -	options.name=name;
>> -	return backend->remove(&options);
>> +	return backend->remove(1, options);
>>  }
>>  
> 
> I'm trying to get rid of the all-in-one, nobody-actually-knows-what-parts-are-used 
> crypt_option structure. 
> 
> Is there a reason for you to reintroduce it?

I need name (already there) and device size at least.
Otherwise it must run one ioctl more to check for device size
(for replacing with error segment).
But we have alresy this size in options, just need to pass it through.

Anyway, in previous code was structure crypt_option uninitialized
in remove_mapping() (with random data in it, except device name),
now is it zeroed and filled through setup_mapping.
But I agree that is is not perfect code...

Milan


---------------------------------------------------------------------
dm-crypt mailing list - http://www.saout.de/misc/dm-crypt/
To unsubscribe, e-mail: dm-crypt-unsubscribe@xxxxxxxx
For additional commands, e-mail: dm-crypt-help@xxxxxxxx


[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux