From: Ivan Shapovalov <intelfx100@gmail.com>
To: reiserfs-devel@vger.kernel.org
Cc: Ivan Shapovalov <intelfx100@gmail.com>
Subject: [PATCH 3/3] reiser4: discard: handle incomplete erase units at the end of a partition.
Date: Fri, 13 Feb 2015 08:02:58 +0300 [thread overview]
Message-ID: <1423803778-19698-4-git-send-email-intelfx100@gmail.com> (raw)
In-Reply-To: <1423803778-19698-1-git-send-email-intelfx100@gmail.com>
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
--
2.3.0
next prev parent reply other threads:[~2015-02-13 5:02 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 ` Ivan Shapovalov [this message]
2015-02-13 9:05 ` [PATCH 3/3] reiser4: discard: handle incomplete erase units at the end of a partition 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=1423803778-19698-4-git-send-email-intelfx100@gmail.com \
--to=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).