lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4C696DF9.4000209@redhat.com>
Date:	Mon, 16 Aug 2010 11:57:29 -0500
From:	Eric Sandeen <sandeen@...hat.com>
To:	Lukas Czerner <lczerner@...hat.com>
CC:	linux-ext4@...r.kernel.org, jmoyer@...hat.com, rwheeler@...hat.com,
	eshishki@...hat.com, jack@...e.cz, tytso@....edu
Subject: Re: [PATCH 4/4] Ext4 check for negative err from sb_issue_discard

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@...hat.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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ