lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <18ea3a96-d205-0933-bb2f-5b792ef6884c@huawei.com>
Date: Tue, 1 Jul 2025 17:31:22 +0800
From: zhanchengbin <zhanchengbin1@...wei.com>
To: "Darrick J. Wong" <djwong@...nel.org>
CC: Theodore Ts'o <tytso@....edu>, <linux-ext4@...r.kernel.org>,
	<qiangxiaojun@...wei.com>, <hejie3@...wei.com>
Subject: Re: [PATCH] debugfs/logdump.c: Add parameter t to dump sequence
 commit timestamps

On 2025/6/30 23:10, Darrick J. Wong wrote:
> On Tue, Jun 17, 2025 at 07:31:35PM +0800, zhanchengbin wrote:
>> When filesystem errors occur, inspect journal sequences with parameter t to
>>   dump commit timestamps.
>>
>> Signed-off-by: zhanchengbin <zhanchengbin@...wei.com>
>> ---
>>   debugfs/logdump.c | 63 ++++++++++++++++++++++++++++++++++++++++-------
>>   1 file changed, 54 insertions(+), 9 deletions(-)
>>
>> diff --git a/debugfs/logdump.c b/debugfs/logdump.c
>> index 324ed42..bbe1384 100644
>> --- a/debugfs/logdump.c
>> +++ b/debugfs/logdump.c
>> @@ -47,7 +47,7 @@ enum journal_location {JOURNAL_IS_INTERNAL,
>> JOURNAL_IS_EXTERNAL};
>>
>>   #define ANY_BLOCK ((blk64_t) -1)
>>
>> -static int        dump_all, dump_super, dump_old, dump_contents,
>> dump_descriptors;
>> +static int        dump_all, dump_super, dump_old, dump_contents,
>> dump_descriptors, dump_time;
>>   static int64_t        dump_counts;
>>   static blk64_t        block_to_dump, bitmap_to_dump, inode_block_to_dump;
>>   static unsigned int    group_to_dump, inode_offset_to_dump;
>> @@ -67,6 +67,8 @@ static void dump_descriptor_block(FILE *, struct
>> journal_source *,
>>                     char *, journal_superblock_t *,
>>                     unsigned int *, unsigned int, __u32, tid_t);
>>
>> +static void dump_commit_time(FILE *out_file, char *buf);
>> +
>>   static void dump_revoke_block(FILE *, char *, journal_superblock_t *,
>>                     unsigned int, unsigned int, tid_t);
>>
>> @@ -118,10 +120,11 @@ void do_logdump(int argc, ss_argv_t argv, int sci_idx
>> EXT2FS_ATTR((unused)),
>>       inode_block_to_dump = ANY_BLOCK;
>>       inode_to_dump = -1;
>>       dump_counts = -1;
>> +    dump_time = 0;
> 
> Globals are initialized to zero if not given an explicit value so this
> isn't necessary.

When I run 'logdump -t', it displays the time,but when I run 'logdump'
without parameters for the second time, it still shows the time. Globals
retain their assigned values, which affects subsequent execution
results. So I think initializing the globals here is necessary.

Thanks,
  - bin.

> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ