Re: [[Patch mdadm] 1/5] Make the IMSM_DEVNAME_AS_SERIAL option work when creating containers. This allows a person to testing using loopback devices that don't support serial number queries.

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

 



On 01/18/2010 05:13 PM, Dan Williams wrote:
> Hi Doug,
> 
> On Mon, Jan 11, 2010 at 1:38 PM, Doug Ledford <dledford@xxxxxxxxxx> wrote:
>> Signed-off-by: Doug Ledford <dledford@xxxxxxxxxx>
>> ---
>>  super-intel.c |    5 ++++-
>>  1 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/super-intel.c b/super-intel.c
>> index d6951cc..fcf438c 100644
>> --- a/super-intel.c
>> +++ b/super-intel.c
>> @@ -3208,7 +3208,10 @@ static int add_to_super_imsm(struct supertype *st, mdu_disk_info_t *dk,
>>        dd->fd = fd;
>>        dd->e = NULL;
>>        rv = imsm_read_serial(fd, devname, dd->serial);
>> -       if (rv) {
>> +       if (rv && check_env("IMSM_DEVNAME_AS_SERIAL")) {
>> +               memset(dd->serial, 0, MAX_RAID_SERIAL_LEN);
>> +               fd2devname(fd, (char *) dd->serial);
>> +       } else if (rv) {
> 
> This just duplicates the check already inside imsm_read_serial().
> Containers on loopback devices worked before this patch, so I'll send
> a revert.
> 
> --
> Dan

Me thinks you didn't try it, because this does not duplicate the code in
imsm_read_serial().  That code is needed to assemble an IMSM array that
already exists on loopback devices.  This is needed to *create* an imsm
container on fresh loopback devices.  I'm assuming your imsm container
superblocks already existed or some such.

-- 
Doug Ledford <dledford@xxxxxxxxxx>
              GPG KeyID: CFBFF194
	      http://people.redhat.com/dledford

Infiniband specific RPMs available at
	      http://people.redhat.com/dledford/Infiniband

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux