public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Akinobu Mita <mita@miraclelinux.com>
Cc: linux-kernel@vger.kernel.org, sct@redhat.com,
	adilger@clusterfs.com, ext3-users@redhat.com
Subject: Re: [PATCH 0/6] jbd cleanup
Date: Sat, 10 Sep 2005 14:58:48 -0700	[thread overview]
Message-ID: <20050910145848.51881e61.akpm@osdl.org> (raw)
In-Reply-To: <20050910145525.GB7593@miraclelinux.com>

Akinobu Mita <mita@miraclelinux.com> wrote:
>
> On Fri, Sep 09, 2005 at 02:15:22AM -0700, Andrew Morton wrote:
> > Akinobu Mita <mita@miraclelinux.com> wrote:
> > >
> > > The following 6 patches cleanup the jbd code and kill about 200 lines. 
> > >
> > 
> > Thanks, but I'm not inclined to apply them.
> > 
> > a) Maybe 70-80% of the Linux world uses this filesystem.  We need to be
> >    very cautious in making changes to it.
> 
> And we need many eyeballs.

True.  And the only way to really learn code is to make changes to it.

> (I've tried to understand how the jbd works several times.
>  But I always failed.)

It's very hard to reverse engineer the high-level design concepts from the
implementation.  And the design concepts in JBD are really complex, which
is a problem fo us.

When I first had to learn the thing 4-5 years back I sat down for a solid
week and wrote a 40-odd page how-it-works document for myself, just to
force it into my head.  It was probably about 50% accurate, but it was a
useful exercise.

> About the debuggability of list_heads, how about adding the kind of
> the following gdb macros in .gdbinit?
> 
> ---
> 
> define list_entry
> 	set $ptr=$arg0
> 	p ($arg1 *)((char *)$ptr - (size_t) &(($arg1 *)0)->$arg2)
> end
> 
> define list_entry_s
> 	set $ptr=$arg0
> 	p (struct $arg1 *)((char *)$ptr - (size_t) &((struct $arg1 *)0)->$arg2)
> end
> 
> define to_journal_head
> 	list_entry_s $arg0 journal_head b_list
> end

Here's mine ;)

# list_entry list type member
define list_entry
	set $off = (int)&(((struct $arg1 *)0)->$arg2)
	set $addr = (int)$arg0
	set $res = $addr - $off
	printf "0x%x\n", (struct $arg1 *)$res
end


      reply	other threads:[~2005-09-10 21:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-09  8:42 [PATCH 0/6] jbd cleanup Akinobu Mita
2005-09-09  8:43 ` [PATCH 1/6] jbd: remove duplicated debug print Akinobu Mita
2005-09-09 18:16   ` Theodore Ts'o
2005-09-10 14:36     ` Akinobu Mita
2005-09-09  8:44 ` [PATCH 2/6] jbd: use hlist for the revoke tables Akinobu Mita
2005-09-09  8:46 ` [PATCH 3/6] jbd: cleanup for initializing/destroying " Akinobu Mita
2005-09-09  8:47 ` [PATCH 4/6] jbd: use list_head for the list of buffers on a transaction's data Akinobu Mita
2005-09-09  8:48 ` [-mm PATCH 5/6] jbd: use list_head for the list of all transactions waiting for Akinobu Mita
2005-09-09  8:50 ` [-mm PATCH 6/6] jbd: use list_head for a transaction checkpoint list Akinobu Mita
2005-09-09  9:15 ` [PATCH 0/6] jbd cleanup Andrew Morton
2005-09-10 14:55   ` Akinobu Mita
2005-09-10 21:58     ` Andrew Morton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050910145848.51881e61.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=adilger@clusterfs.com \
    --cc=ext3-users@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mita@miraclelinux.com \
    --cc=sct@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox