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: [PATCH 4/6] reiser4: discard: don't be overly smart when gluing extents in discard_sorted_merged_extents().
Date: Fri, 19 Dec 2014 21:24:04 +0100	[thread overview]
Message-ID: <54948964.8040202@gmail.com> (raw)
In-Reply-To: <1418418632-18396-5-git-send-email-intelfx100@gmail.com>

Agreed.
This is absolutely not needed "if".

Thanks!
Edward.


On 12/12/2014 10:10 PM, Ivan Shapovalov wrote:
> @tailp, @alen and @end must be updated simultaneously because there are expressions
> involving combinations of these variables.
>
> Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
> ---
>   fs/reiser4/discard.c | 12 ++----------
>   1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/fs/reiser4/discard.c b/fs/reiser4/discard.c
> index a8c5336..86ff6e4 100644
> --- a/fs/reiser4/discard.c
> +++ b/fs/reiser4/discard.c
> @@ -366,18 +366,10 @@ static int discard_sorted_merged_extents(struct list_head *head)
>   					/*
>   					 * jump to the glued extent
>   					 */
> -					if (end + tailp < next_start + next_len) {
> -						/*
> -						 * the glued extent doesn't
> -						 * fit into the tail padding,
> -						 * so update the last one
> -						 */
> -						tailp = extent_get_tailp(next_start + next_len,
> -									 d_off, d_uni);
> -						alen += (next_start + next_len - end);
> -					}
>   					pos = next;
> +					alen += (next_start + next_len - end);
>   					end = next_start + next_len;
> +					tailp = extent_get_tailp(end, d_off, d_uni);
>   					/*
>   					 * try to glue more extents
>   					 */


  reply	other threads:[~2014-12-19 20:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-12 21:10 [PATCH 0/6] reiser4: discard support: "precise discard" aka padding of extents to erase unit boundaries Ivan Shapovalov
2014-12-12 21:10 ` [PATCH 1/6] reiser4: block_alloc: split block allocation accounting logic into separate functions for re-use Ivan Shapovalov
2014-12-12 21:10 ` [PATCH 2/6] reiser4: block_alloc, plugin/space/bitmap: add a method for "exact" block allocation Ivan Shapovalov
2014-12-19 15:43   ` Edward Shishkin
2014-12-12 21:10 ` [PATCH 3/6] reiser4: iterate over extents in discard_atom Ivan Shapovalov
2014-12-12 21:10 ` [PATCH 4/6] reiser4: discard: don't be overly smart when gluing extents in discard_sorted_merged_extents() Ivan Shapovalov
2014-12-19 20:24   ` Edward Shishkin [this message]
2014-12-12 21:10 ` [PATCH 5/6] reiser4: blocknrlist: add operations blocknr_list_del() and blocknr_list_update_extent() Ivan Shapovalov
2014-12-12 21:10 ` [PATCH 6/6] reiser4: discard: allocate extent paddings Ivan Shapovalov
2014-12-13 22:38 ` [PATCH 0/6] reiser4: discard support: "precise discard" aka padding of extents to erase unit boundaries Edward Shishkin
2014-12-14  8:03   ` Ivan Shapovalov
2014-12-15 19:30     ` Edward Shishkin
2014-12-19 15:46       ` 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=54948964.8040202@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).