From: Edward Shishkin <edward.shishkin@gmail.com>
To: Ivan Shapovalov <intelfx100@gmail.com>, reiserfs-devel@vger.kernel.org
Subject: Re: reiser4: discard implementation, pass 2: allocation issues
Date: Wed, 18 Jun 2014 03:41:04 +0200 [thread overview]
Message-ID: <53A0EE30.3090303@gmail.com> (raw)
In-Reply-To: <1517464.b3HDrHDRa3@intelfx-laptop>
On 06/17/2014 10:47 PM, Ivan Shapovalov wrote:
> On Tuesday 17 June 2014 at 22:31:36, Ivan Shapovalov wrote:
>> On Tuesday 17 June 2014 at 12:29:53, Edward Shishkin wrote:
>>> [...]
>>>
>>> Yup.
>>> So, if discard is on, we work with 2 lists (delete_set,
>>> delete_set_for_wander).
>>> If discard is off, we work with one blocknr set..
>> Good. So I'll do roughly following for v5:
>> - rename discard_set_* to block_list_* and split off these definitions
>> - write a family of reiser4_atom_dset_*() (log_deferred, log_immediate,
>> apply_deferred, merge, init, destroy) which will encapsulate discard/nodiscard
>> check and operate on correct lists (blocknr_set vs block_list)
>> - call reiser4_atom_dset_{init,destroy,merge}() from respective functions
>> - call reiser4_atom_dset_log_{deferred,immediate}() from reiser4_dealloc_blocks()
>> - call reiser4_atom_dset_apply_deferred() from reiser4_post_commit_hook()
>> - directly manipulate the block lists from discard_atom(), checking that we
>> indeed have discard enabled
>>
>> Is this OK?
> BTW, with txn_atoms there is a locking idiom involving E_REPEAT loops.
>
> Is it fine to implement a
> current_atom_dset_log_...(...) // E_REPEAT loop inside
> instead of
> atom_dset_log_...(txn_atom* atom, ...)
IMHO it is not needed.
atom = get_current_atom_locked();
atom_dset_{defer, immed}_add_extent(atom, ...); // <-- the loop is here
spin_unlock_atom(atom);
next prev parent reply other threads:[~2014-06-18 1:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 20:28 reiser4: discard implementation, pass 2: allocation issues Ivan Shapovalov
2014-06-15 17:36 ` Edward Shishkin
2014-06-15 18:07 ` Ivan Shapovalov
2014-06-15 21:49 ` Edward Shishkin
2014-06-15 21:58 ` Ivan Shapovalov
2014-06-16 0:14 ` Edward Shishkin
2014-06-16 5:03 ` Ivan Shapovalov
2014-06-16 9:24 ` Edward Shishkin
2014-06-16 11:00 ` Ivan Shapovalov
2014-06-16 11:32 ` Edward Shishkin
2014-06-16 11:47 ` Ivan Shapovalov
2014-06-17 0:37 ` Edward Shishkin
2014-06-17 10:14 ` Ivan Shapovalov
2014-06-17 10:29 ` Edward Shishkin
2014-06-17 18:31 ` Ivan Shapovalov
2014-06-17 20:47 ` Ivan Shapovalov
2014-06-18 1:41 ` Edward Shishkin [this message]
2014-06-18 9:55 ` Ivan Shapovalov
2014-06-18 11:49 ` Edward Shishkin
2014-06-18 12:26 ` Ivan Shapovalov
2014-06-18 22:46 ` Edward Shishkin
2014-06-18 0:30 ` Edward Shishkin
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=53A0EE30.3090303@gmail.com \
--to=edward.shishkin@gmail.com \
--cc=intelfx100@gmail.com \
--cc=reiserfs-devel@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.