From: Theodore Ts'o <tytso@mit.edu>
To: Joseph Qi <joseph.qi@huawei.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: Issue in ext4 rename
Date: Fri, 3 Apr 2015 11:06:00 -0400 [thread overview]
Message-ID: <20150403150600.GC9988@thunk.org> (raw)
In-Reply-To: <551E6405.8050600@huawei.com>
On Fri, Apr 03, 2015 at 05:57:25PM +0800, Joseph Qi wrote:
> Hi Ted,
> Thanks very much for your quick and detailed reply.
> Yes, currently it will behave as RO, or PANIC or CONT based on the
> mounted options.
> You suggested a way to make sure the allocation cannot fail.
> I am wondering if we can omit this handle when commit, for example,
> introducing a way that invalids the handle in jbd2.
Not really, because we've already started modifying data structures at
this point; hence my comment that in order to do this we would have to
implement a fairly heavyweight transaction rollback scheme. For
eample, we could make every single ext4_journal_get_write_access()
allocate a 4k page to store a copy of the 4k buffer we were about to
modify, so in case some other ext4_journal_get_write_access() failed,
we could roll back the handle. But that inceases the amount of memory
required for each transaction by an order of magnitude --- and worse,
what if some other handle needs to modify the same block? We couldn't
let that handle proceed until the first handle was stopped.
So we would trash performance *and* use more memory, making memory
allocation and memory pressures worse. In other words, the cure is
worse than the disease; much worse.
Best regards,
- Ted
prev parent reply other threads:[~2015-04-03 15:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-02 10:49 Issue in ext4 rename Joseph Qi
2015-04-02 14:02 ` Theodore Ts'o
2015-04-03 9:57 ` Joseph Qi
2015-04-03 15:06 ` Theodore Ts'o [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=20150403150600.GC9988@thunk.org \
--to=tytso@mit.edu \
--cc=joseph.qi@huawei.com \
--cc=linux-ext4@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 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.