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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F47BF60.2080303@ubuntu.com>
Date:	Fri, 24 Feb 2012 11:48:32 -0500
From:	Phillip Susi <psusi@...ntu.com>
To:	Lukas Czerner <lczerner@...hat.com>
CC:	linux-ext4@...r.kernel.org, tytso@....edu, sandeen@...hat.com
Subject: Re: [RESEND] [PATCH 2/2 v2] e2fsck: Do not forget to discard last
 block group

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2/24/2012 11:13 AM, Lukas Czerner wrote:
> It does not work that way, uinit is never set back. If it has been 
> formated without discard it is user choice, moving the image to
> the thinly provisioned device, or ssd with dd is really bad idea
> anyway. That said, UNINIT means that it has not been used and hence
> there should be nothing to reclaim.

I could have sworn that e2fsck set it back when the block group became
free again, since there is once again no need to parse the bitmap and
you can just assume it's empty without having to read it.  I certainly
have e2defrag doing this.  If fsck and the kernel currently don't do
this, they should.

Whether it is a bad idea or not, people do move filesystems around and
have existing systems formatted before mke2fs would issue discards, so
it is a good idea to discard unused areas regardless of whether or not
they are uninitialized.

My understanding of uninitialized is that it was added as an
optimization meaning "there's nothing here, so you can skip/ignore
this" rather than "this has _never_ been used, so you can rely on it
containing all zeros and being discarded".

Indeed, a quick test filling a block device with random data and
running mke2fs on it leaves the random data in the uninitialized block
bitmaps rather than writing all zeros.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJPR79fAAoJEJrBOlT6nu75K8QH/RJoNQPm+rGtmv1cmWPusuNb
pb/6hRmOhsIUClaMn2diinGgH7HQbZ9FqsSx0mZmWq52T/21korGk3fyVe/nfL9m
h4xFYJLNEdsSCJE7mcpUu5BMxCwlYEcybHu7xobVtqHlF671zjszj/xCGBgQIEwD
3tRu8JXc/grnrya0CxDXd5kenM6oQviEmkproYUjG21XW+2DKjgHD1w6lbcHZHw5
5fvWVwFOMy9OgagcBzAxo43E7oZoPCD6o54HT8As7FoBfUSt9Z4GLMe3ULH4SbpP
KKuRiumOnBW9fz7I3jRDkVpJ+9MxWqpUL4SA79sDreYfOBAa6m7cOaR+PHr8sTM=
=8u4o
-----END PGP SIGNATURE-----
--
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