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>, reiserfs-devel@vger.kernel.org
Subject: Re: [PATCH 3/3] reiser4: discard: handle incomplete erase units at the end of a partition.
Date: Fri, 13 Feb 2015 10:05:16 +0100	[thread overview]
Message-ID: <54DDBE4C.3080202@gmail.com> (raw)
In-Reply-To: <1423803778-19698-4-git-send-email-intelfx100@gmail.com>

Ok.

On 02/13/2015 06:02 AM, Ivan Shapovalov wrote:
> Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
> ---
>   fs/reiser4/discard.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/reiser4/discard.c b/fs/reiser4/discard.c
> index 10c1707..6163ea2 100644
> --- a/fs/reiser4/discard.c
> +++ b/fs/reiser4/discard.c
> @@ -542,7 +542,8 @@ static int discard_precise_extents(struct list_head *head)
>   					last_padding_end = end;
>   					last_padding_clean = 1;
>   
> -				} else if (try_allocate_blocks(end, tailp)) {
> +				} else if (end + tailp <= reiser4_block_count(sb) &&
> +					   try_allocate_blocks(end, tailp)) {
>   					/*
>   					 * tail padding is clean,
>   					 * pad the tail


      reply	other threads:[~2015-02-13  9:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-13  5:02 [PATCH 0/3] reiser4: precise discard: fixes on top of everything Ivan Shapovalov
2015-02-13  5:02 ` [PATCH 1/3] reiser4: discard: signify non-idempotence of check_free_blocks() by changing its name Ivan Shapovalov
2015-02-13  5:02 ` [PATCH 2/3] reiser4: discard: avoid checking same blocks multiple times Ivan Shapovalov
2015-02-13  9:04   ` Edward Shishkin
2015-02-13  5:02 ` [PATCH 3/3] reiser4: discard: handle incomplete erase units at the end of a partition Ivan Shapovalov
2015-02-13  9:05   ` Edward Shishkin [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=54DDBE4C.3080202@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).