From: m-ota@ys.jp.nec.com
To: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: what should I do when an error occurred after write_begin()
Date: Fri, 18 Jul 2008 09:43:15 +0900 [thread overview]
Message-ID: <20080718094315m-ota@mail.jp.nec.com> (raw)
Hi, all
ext4 online defrag exchanges the data block in the following procedures.
1. Creates a temporary inode and allocates contiguous blocks.
2. Read data from original file to memory page by write_begin()
3. Swap the blocks between the original inode and the temporary inode.
Updates the extent tree and registers the block to transaction by
ext4_journal_dirty_metadata().
4. Write data in memory page to new blocks by write_end().
In the current implementation, when the block swap failed,
data could not move to the new block.
So the defrag process exits without calling write_end().
We try to defrag for the same file again, but the defrag process seems to stall.
After defrag process stalled, all acess to the file systems like "ls" command
also stall.
Both processes wait for unlock j_wait_transaction_locked.
If the block exchange between write_begin() and write_end() failed,
what should I do?
Any advice is welcome, thank you.
Mikako ohta
next reply other threads:[~2008-07-18 0:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-18 0:43 m-ota [this message]
2008-07-21 5:04 ` what should I do when an error occurred after write_begin() Andreas Dilger
2008-08-04 12:51 ` Akira Fujita
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=20080718094315m-ota@mail.jp.nec.com \
--to=m-ota@ys.jp.nec.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).