xfs
[Top] [All Lists]

Re: transaction in XFS

To: Steve Lord <lord@xxxxxxx>
Subject: Re: transaction in XFS
From: jin hee park <jinny84@xxxxxxxxxxx>
Date: Wed, 16 Jul 2003 04:03:25 -0700 (PDT)
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <1058289365.15986.98.camel@jen.americas.sgi.com>
Sender: linux-xfs-bounce@xxxxxxxxxxx
Hello~

thank you very much for your kind description.
I understood what I have wondered.

> For inodes which are being truncated without being
> unlinked
> then the truncate may be partial after recovery.

Can I recover such a partial garbage by xfs_repair or
other tools?

-JinHee

--- Steve Lord <lord@xxxxxxx> wrote:
> On Mon, 2003-07-14 at 19:44, jin hee park wrote:
> > Hello, Steve
> > thank you for a clear explanation.
> > 
> > For example, there are four extents to truncate in
> a
> > file. Maybe two transacions (each transaction for
> two
> > extents deletion) will occur.
> > If there is a crash in the middle of two
> transactions
> > (the one : incore log was logged to disk log, and
> the
> > other : incore log was not logged to disk log),
> > doesn't the other work?
> > I mean that the one worked, and the other didn't
> work.
> > How can I understand this?
> 
> If the file is being deleted then it is placed on
> the unlinked
> inode list when the remove is performed. When the
> inode goes
> inactive, the extents are freed. At the end of
> freeing the
> extents the inode itself is freed, so there are more
> transactions
> than just removing the extents.
> 
> If the crash happens at any time after the
> transaction which 
> puts the inode on the unlinked list, the remainder
> of the
> process of deleting the file happens during the
> recovery
> processing in the next mount. If this transaction
> did not
> make it out to disk, then the file will still be
> there 
> after the crash.
> 
> For inodes which are being truncated without being
> unlinked
> then the truncate may be partial after recovery.
> ext3 places
> these inodes on its 'unlinked' list too so the
> truncate
> gets completed after recovery I have been
> considering doing
> this for xfs too.
> 
> Steve
> 
> > 
> > --- Steve Lord <lord@xxxxxxx> wrote:
> > > On Mon, 2003-07-14 at 06:50, jin hee park wrote:
> > > > Hello~
> > > > 
> > > > I have a question about transaction in XFS.
> > > > 
> > > > Are transactions (which are chained using
> > > > xfs_trans_dup function) atomic?
> > > > I wonder that such transactions are like one
> > > > transacion idea(all or nothing).
> > > > please, let me know..
> > > > 
> > > > thank you.
> > > > - JinHee
> > > > 
> > > 
> > > These transactions are not atomic, each one
> records
> > > sufficient
> > > information to rebuild a consistent filesystem
> after
> > > a crash.
> > > 
> > > An example use of chained transactions is
> deleting
> > > extents in a
> > > file, the amount of log space this needs is
> > > unbounded - a function
> > > of the number of extents in the file. We cannot
> do
> > > the whole
> > > sequence in one transaction, so we use a chain
> of
> > > them.
> > > 
> > > Steve
> > > 
> > > 
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> -- 
> 
> Steve Lord                                     
> voice: +1-651-683-3511
> Principal Engineer, Filesystem Software        
> email: lord@xxxxxxx


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


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