reiserfs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: Ivan Shapovalov <intelfx100@gmail.com>
Cc: reiserfs-devel@vger.kernel.org
Subject: Re: reiser4: discard support
Date: Wed, 07 May 2014 23:04:10 +0200	[thread overview]
Message-ID: <536A9FCA.9060907@gmail.com> (raw)
In-Reply-To: <9209978.Zaz5Vcsz4S@intelfx-laptop>

On 05/07/2014 09:35 AM, Ivan Shapovalov wrote:
> On Tuesday 06 May 2014 at 10:58:53, Edward Shishkin wrote:	
>> On 05/03/2014 10:32 PM, Ivan Shapovalov wrote:
>>> On Saturday 03 May 2014 at 22:21:58, Edward Shishkin wrote:
>>>
>>> TBH, I have never looked at the deallocation paths in reiser4: everything
>>> worked fine there.. BTW, why not to use atom's delete_set to discard
>>> things? Could you please take a look?
>> [...]
>>
>>>>> Blocks used for the journal (wander.c) are deallocated without BA_DEFER
>>>>> set
>>>>> and thus they never hit delete_set. However, we want to discard these.
>>>> This happens in error paths. Don't be so scrupulous ;)
>>> I don't think so:
>>> - wander.c:485
>>>
>>>     dealloc_tx_list() <- reiser4_write_logs()
>>>
>>> - wander.c:505
>>>
>>>     dealloc_wmap_actor() <- dealloc_wmap() <- reiser4_write_logs()
>> Yep, indeed.
>> I don't completely understand this special case of wandered blocks.
>  From what I've been able to understand, delete_set is not used there just
> because the deallocations are done directly to the bitmaps: we already hold
> the tmgr mutex at that time.
>
>> Also I don't see where wandered blocks are deallocated after journal
>> replay (as journal is not needed any more): it can be a possible leak
>> of disk space after system crashes..
> Maybe the bitmap version submitted to disk does not have these blocks
> allocated? I don't really understand what's going on wrt. disk write-out, and
> I don't even understand the difference between COMMIT BITMAP and WORKING
> BITMAP...


I'll try to find the original zam's design document.
It is horribly written and obsolete, but it contains some hints about 
who is who..


>
>> Once we understand it, I think we'll able to re-use the delete_set for
>> discard needs.
>>
>> Edward.
> We can get any benefits from re-using delete_set only if we replace it with a
> list/rbtree. Current implementation (blocknr_set) seems to be inherently
> unordered and can't be trivially modified (extent merge etc), so if we want to
> use delete_set as-is, we still need to copy the extents into a better data
> structure at commit time.
>


  reply	other threads:[~2014-05-07 21:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-30  7:43 reiser4: discard support Ivan Shapovalov
2014-04-30 14:11 ` Edward Shishkin
     [not found] ` <1B07908E-B768-407D-ADFA-B3C539FABB49@gmail.com>
     [not found]   ` <53613807.7090605@gmail.com>
2014-05-01 23:51     ` Ivan Shapovalov
     [not found]       ` <CAJZSrNK4=o9vocDfSM=4W5ZgtqZ6RVpmU66sGCu6HFsdN47OHw@mail.gmail.com>
2014-05-02 11:06         ` Ivan Shapovalov
2014-05-02 11:48       ` Edward Shishkin
2014-05-02 12:44         ` Edward Shishkin
2014-05-02 13:47           ` Ivan Shapovalov
2014-05-02 13:36         ` Ivan Shapovalov
2014-05-02 14:07           ` Edward Shishkin
2014-05-02 14:32             ` Ivan Shapovalov
2014-05-02 18:10               ` Edward Shishkin
2014-05-03 18:48                 ` Ivan Shapovalov
2014-05-03 20:21                   ` Edward Shishkin
2014-05-03 20:32                     ` Ivan Shapovalov
2014-05-06  8:58                       ` Edward Shishkin
2014-05-07  7:35                         ` Ivan Shapovalov
2014-05-07 21:04                           ` Edward Shishkin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-04-30 17:55 Edward Shishkin
2014-04-30 18:53 ` 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=536A9FCA.9060907@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 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).