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
| ||
|
Message-ID: <20140506002453.GN8434@birch.djwong.org> Date: Mon, 5 May 2014 17:24:53 -0700 From: "Darrick J. Wong" <darrick.wong@...cle.com> To: Lukáš Czerner <lczerner@...hat.com> Cc: tytso@....edu, linux-ext4@...r.kernel.org Subject: Re: [PATCH 06/37] debugfs: force logdump to display (old) journal contents On Fri, May 02, 2014 at 01:49:37PM +0200, Lukáš Czerner wrote: > On Thu, 1 May 2014, Darrick J. Wong wrote: > > > Date: Thu, 01 May 2014 16:13:02 -0700 > > From: Darrick J. Wong <darrick.wong@...cle.com> > > To: tytso@....edu, darrick.wong@...cle.com > > Cc: linux-ext4@...r.kernel.org > > Subject: [PATCH 06/37] debugfs: force logdump to display (old) journal > > contents > > > > If the user passes -a more than once to logdump, try to dump old log > > contents. This can be used to try to track down journal problems even > > after recovery. > > You need to update man page as well for this. Also I wonder what's > the behaviour if '-a' and '-b' or '-c' are specified simultaneously > and '-a' is specified multiple times ? I'll update the manpage. -c seems to hexdump the contents of any block that we find while iterating the journal. -b would seem to allow you to dump an arbitrary block #, but I could never get it to do that. In any case, specifying -a even once will make logdump dump every block and ignore -b. --D > > Thanks! > -Lukas > > > > > Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com> > > --- > > debugfs/logdump.c | 11 ++++++++--- > > 1 file changed, 8 insertions(+), 3 deletions(-) > > > > > > diff --git a/debugfs/logdump.c b/debugfs/logdump.c > > index 8b9dc5b..bf4bef5 100644 > > --- a/debugfs/logdump.c > > +++ b/debugfs/logdump.c > > @@ -393,9 +393,13 @@ static void dump_journal(char *cmdname, FILE *out_file, > > fprintf(out_file, "Journal starts at block %u, transaction %u\n", > > blocknr, transaction); > > > > - if (!blocknr) > > + if (!blocknr) { > > /* Empty journal, nothing to do. */ > > - return; > > + if (dump_all < 2) > > + return; > > + else > > + blocknr = 1; > > + } > > > > while (1) { > > retval = read_journal_block(cmdname, source, > > @@ -420,7 +424,8 @@ static void dump_journal(char *cmdname, FILE *out_file, > > fprintf (out_file, "Found sequence %u (not %u) at " > > "block %u: end of journal.\n", > > sequence, transaction, blocknr); > > - return; > > + if (dump_all < 2) > > + return; > > } > > > > if (dump_descriptors) { > > > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in > > the body of a message to majordomo@...r.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in > the body of a message to majordomo@...r.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists