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] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 23 Oct 2012 11:14:19 -0200
From:	Carlos Maiolino <cmaiolino@...hat.com>
To:	linux-ext4@...r.kernel.org
Subject: Re: [PATCH 1/2] ext4: Notify when discard is not supported

On Fri, Oct 19, 2012 at 02:12:37PM +0200, Lukas Czerner wrote:
> Notify user when mounting the file system with -o discard option, but
> the device does not support discard. Obviously we do not want to fail
> the mount or disable the options, because the underlying device might
> change in future even without file system remount.
> 
> Signed-off-by: Lukas Czerner <lczerner@...hat.com>
> ---
>  fs/ext4/super.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 7265a03..fd3ff41 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -4017,6 +4017,14 @@ no_journal:
>  	}
>  #endif  /* CONFIG_QUOTA */
>  
> +	if (test_opt(sb, DISCARD)) {
> +		struct request_queue *q = bdev_get_queue(sb->s_bdev);
> +		if (!blk_queue_discard(q))
> +			ext4_msg(sb, KERN_WARNING,
> +				 "mounting with \"discard\" option, but "
> +				 "the device does not support discard");
> +	}
> +
>  	ext4_msg(sb, KERN_INFO, "mounted filesystem with%s. "
>  		 "Opts: %s%s%s", descr, sbi->s_es->s_mount_opts,
>  		 *sbi->s_es->s_mount_opts ? "; " : "", orig_data);
> -- 
> 1.7.7.6
> 
> --
> 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

Looks good to me

Reviewed-by: Carlos Maiolino <cmaiolino@...hat.com>
-- 
--Carlos
--
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