[PATCH v2 7/8] makedumpfile: Add erased information in compressed kdump file

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

 



Hi Ken'ichi,

On 08/12/2011 01:40 PM, Ken'ichi Ohmichi wrote:
> 
> Hi Mahesh,
> 
> On Wed, 18 May 2011 01:36:17 +0530
> Mahesh J Salgaonkar <mahesh at linux.vnet.ibm.com> wrote:
>> --- a/makedumpfile.c
>> +++ b/makedumpfile.c
>> @@ -29,6 +29,8 @@ struct DumpInfo		*info = NULL;
>>  struct module_sym_table	mod_st = { 0 };
>>  struct filter_info	*filter_info = NULL;
>>  struct filter_config	filter_config;
>> +struct erase_info	*erase_info = NULL;
>> +unsigned long		num_erase_info = 1; /* Node 0 is unused. */
> 
> I cannot understand erase_info[0] is unused.

I did this to avoid the explicit need of initializing erase_info_idx
member from struct config_entry and struct filter_info with some other
invalid value, instead I thought I will use '0' as invalid index.

Do you think I should change this patch to use '-1' as invalid index?

> 
> 
>> @@ -6000,10 +6007,17 @@ write_kdump_header(void)
>>  			kh.size_vmcoreinfo = info->size_vmcoreinfo;
>>  		}
>>  	}
>> -	if (!write_buffer(info->fd_dumpfile, dh->block_size, &kh,
>> -	    size, info->name_dumpfile))
>> -		goto out;
>> +	/*
>> +	 * While writing dump data to STDOUT, delay the writing of sub header
>> +	 * untill we gather erase info offset and size.
>> +	 */
>> +	if (!info->flag_flatten) {
>> +		if (!write_buffer(info->fd_dumpfile, dh->block_size, &kh,
>> +		    size, info->name_dumpfile))
>> +			goto out;
>> +	}
> 
> Does makedumpfile work wrong if removing the above change ?
> 

Hmm.. while implementing this patch I thought we may run into issues if
we write sub_header data twice for flattened case. But it seems the '-R'
option rearranges the data properly.

I agree that we dont need above change. Thanks for catching this.

Thanks,
-Mahesh.



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux