From: Jeff Liu <jeff.liu@oracle.com>
To: Dave Chinner <david@fromorbit.com>
Cc: Yongmin <dev.yongmin@gmail.com>, xfs@oss.sgi.com
Subject: Re: Hello, I have a question about XFS File System
Date: Fri, 07 Mar 2014 13:23:53 +0800 [thread overview]
Message-ID: <531957E9.50903@oracle.com> (raw)
In-Reply-To: <20140307041917.GP6851@dastard>
On 03/07 2014 12:19 PM, Dave Chinner wrote:
> On Fri, Mar 07, 2014 at 10:23:38AM +0800, Jeff Liu wrote:
>>
<snip>
>>>
>>> There is some documentation about some of the logging concepts and
>>> design. eg:
>>>
>>> http://oss.sgi.com/cgi-bin/gitweb.cgi?p=xfs/xfs-documentation.git;a=blob;f=design/xfs-delayed-logging-design.asciidoc
>>
>> Not sure if someone else also think that XFS journal design is the stumbling-block
>> to get involved into the development...but I once heard of "I'm really confused by
>> the design of delayed logging, I have to give up after reading the document for about
>> 2 or 3 weeks..." from 2 Chinese developers in the past year, though nothing can help
>> someone out without taking infinite patience.
>
> Let me put it this way: it took me *5 years* of working deep in the
> XFS code to really understand how the XFS transaction and
> journalling subsystems are supposed to function. Delayed logging
> took me 3 failed design attempts over 3 years before I had learnt
> enough to come up with a design that worked. It's by far the most
> complex part of XFS - expecting to understand how it works by
> spending a couple of weeks reading the code is unrealistic.
Hah, this would help me relax a lot when I felt frustrating to understand
something in XFS :-P.
> Fundamentally, understanding delayed logging means you have to first
> understand why relogging is necessary in the XFS journal. To
> understand why relogging is necessary, you first need to understand
> the transaction subsystem, the log space reservation subsystem, log
> recovery constraints, how tail pushing works, the physical log
> interface code, the on-disk log format, etc andhow they all
> interact.
>
> IOWs, delayed logging is the last thing in the journalling layer
> that anyone should try to understand because understanding it fully
> requires a high level of knoweldge about the XFS metadata and
> logging subsystem architecture and fundamental principles....
Thanks for the nice guidance.
>
>>> But the only way to learn about the actual structure of the log is to
>>> read the code and use xfs_logprint to study the contents of the log.
>>
>> To Yongmin,
>>
>> For your information only.
>>
>> I'm trying to understand XFS journal via the following steps:
>>
>> 1) Download Linux-2.6.34 source, read the journal code.
>> Understand the original design as there is no delayed-logging support at that time.
>
> Delayed logging changes neither the journal nor the transaction
> layer code or design. If you can't understand the fundamental
> principles behind those subsystems from the current code, then
> looking at the older code won't make it any clearer because it is
> exactly the same...
>
>> FYI, two obsoleted documents could be found at,
>> http://oss.sgi.com/projects/xfs/design_docs/xfsdocs93_pdf/log_mgr-overview.pdf
>> http://oss.sgi.com/projects/xfs/design_docs/xfsdocs93_pdf/log_mgr.pdf
>
> The first of those really doesn't contain much useful information.
>
> The second really only documents the physical log format. That might
> be useful as a first step, but it doesn't document any of the
> alogorithms that the log uses, and that is where all the complexity
> lies.
Actually, both documents are only a little useful to me when I began to
understand the semantics of in-core logs.
>
> Reading code will only get you so far - the only way to continue the
> learning process is by trying to modify the code and fixing what you
> break, along with asking questions about things you don't understand
> on the list so that people who do understand them can teach you
> things that aren't obvious from the code and aren't documented
> anywhere other than the code.
Thanks,
-Jeff
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2014-03-07 5:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 9:15 Hello, I have a question about XFS File System Yongmin
2014-03-06 20:30 ` Stan Hoeppner
[not found] ` <279D0A265E5D4AF5B099BFAD4E8B1700@gmail.com>
2014-03-07 22:19 ` Stan Hoeppner
2014-03-07 22:40 ` Shaun Gosse
2014-03-08 2:22 ` Stan Hoeppner
2014-03-07 23:09 ` Dave Chinner
2014-03-08 0:38 ` Greg Freemyer
2014-03-09 0:28 ` Dave Chinner
2014-03-10 17:53 ` Jay Ashworth
2014-03-08 2:08 ` Stan Hoeppner
2014-03-08 3:24 ` Eric Sandeen
2014-03-06 22:59 ` Dave Chinner
2014-03-07 2:23 ` Jeff Liu
2014-03-07 4:19 ` Dave Chinner
2014-03-07 5:23 ` Jeff Liu [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=531957E9.50903@oracle.com \
--to=jeff.liu@oracle.com \
--cc=david@fromorbit.com \
--cc=dev.yongmin@gmail.com \
--cc=xfs@oss.sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.