From: Eric Sandeen <sandeen@redhat.com>
To: Lukas Czerner <lczerner@redhat.com>
Cc: linux-ext4@vger.kernel.org, jmoyer@redhat.com,
rwheeler@redhat.com, eshishki@redhat.com, jack@suse.cz,
tytso@mit.edu
Subject: Re: [PATCH 4/4] Ext4 check for negative err from sb_issue_discard
Date: Mon, 16 Aug 2010 11:57:29 -0500 [thread overview]
Message-ID: <4C696DF9.4000209@redhat.com> (raw)
In-Reply-To: <1280935813-4478-4-git-send-email-lczerner@redhat.com>
Lukas Czerner wrote:
> sb_issue_discard is returning negative error code, so check for
> negative value instead of positive.
>
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
> ---
> fs/ext4/mballoc.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index a16a813..a8fe7f1 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -2589,7 +2589,7 @@ static void release_blocks_on_commit(journal_t *journal, transaction_t *txn)
> (unsigned long long)discard_block,
> entry->count);
> ret = sb_issue_discard(sb, discard_block, entry->count);
> - if (ret == EOPNOTSUPP) {
> + if (ret == -EOPNOTSUPP) {
> ext4_warning(sb,
> "discard not supported, disabling");
> clear_opt(EXT4_SB(sb)->s_mount_opt, DISCARD);
Thanks for fixing that, Lukas. Dumb thinko on my part, too much
XFS (and weird positive-error usage) on the brain ;)
Ted, this can/should go in at any time, regardless of other discard
changes.
Thanks,
-Eric
prev parent reply other threads:[~2010-08-16 16:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-04 15:30 [PATCH 1/4] Add ioctl FITRIM Lukas Czerner
2010-08-04 15:30 ` [PATCH 2/4] Add batched discard support for ext3 Lukas Czerner
2010-08-04 15:30 ` [PATCH 3/4] Add batched discard support for ext4 Lukas Czerner
2010-08-04 15:59 ` Jan Kara
2010-08-04 15:30 ` [PATCH 4/4] Ext4 check for negative err from sb_issue_discard Lukas Czerner
2010-08-16 16:57 ` Eric Sandeen [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=4C696DF9.4000209@redhat.com \
--to=sandeen@redhat.com \
--cc=eshishki@redhat.com \
--cc=jack@suse.cz \
--cc=jmoyer@redhat.com \
--cc=lczerner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=rwheeler@redhat.com \
--cc=tytso@mit.edu \
/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.