Akinobu Mita <mita@xxxxxxxxxxxxxxxx> wrote: > > On Fri, Sep 09, 2005 at 02:15:22AM -0700, Andrew Morton wrote: > > Akinobu Mita <mita@xxxxxxxxxxxxxxxx> 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 _______________________________________________ Ext3-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/ext3-users