xfs-masters
[Top] [All Lists]

[xfs-masters] Re: XFS logging

To: xfs-masters@xxxxxxxxxxx
Subject: [xfs-masters] Re: XFS logging
From: Steve Lord <lord@xxxxxxx>
Date: Thu, 19 Aug 2004 11:32:33 -0500
Cc: Eric Sandeen <sandeen@xxxxxxx>
In-reply-to: <Pine.GSO.4.44.0408190000390.17630-100000@elaine24.Stanford.EDU>
References: <Pine.GSO.4.44.0408190000390.17630-100000@elaine24.Stanford.EDU>
Reply-to: xfs-masters@xxxxxxxxxxx
Sender: xfs-masters-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 0.7.1 (X11/20040626)
Junfeng Yang wrote:
> Hi Guys,
> 
> I'm from the Stanford checker team and currently working on applying my
> file system checking tool to XFS.  can you guys answer me a few basic
> questions regarding XFS logging:
> 
> 1. if a transaction's commit record is written to the on-disk log (i.e.,
> the record that contains XLOG_COMMIT_TRANS is synced to the on-disk log by
> xlog_sync)  but not checkpointed, can XFS guarantee the replay of this
> transaction during next mount?

checkpointed? Not really a concept XFS uses. Log replay will scan the on
disk log looking for the head and tail, it will reject any parts of the
log which appear not to have been completely written. Each 512 byte
chunk of disk is verified against a log header, so it can tell if a
write was not completed - but does depend on 512 byte writes being
atomic. So a transaction will not be replayed unless:

   a) its commit record is found in the on disk log
   b) there are no missing blocks between this and the tail of the log.

> 
> 2. does XFS allow concurrent writes to the on-disk log?

Yes, multiple iclog buffers can be in flight to the on disk log at once,
the tricky part has always been making sure that I/O completion logic
for these writes is only performed in the correct order. i.e. The I/O
completion call is only done for a log write after all the I/O
completion handers for all writes to earlier points in the log have
been completed.

> 
> If you guys can point me to any XFS logging documents that'll be great.

There are original design documents on the oss.sgi.com web page, but
not a whole lot of detail on the inner workings. Also out there is
a presentation I did at OLS a few years ago which contains a step
by step walk through of how the logging works.

Steve

> 
> Thanks,
> -Junfeng
> 
> 


<Prev in Thread] Current Thread [Next in Thread>