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]
Date:	Mon, 28 May 2007 12:10:59 -0400
From:	Theodore Tso <tytso@....edu>
To:	Jan Kara <jack@...e.cz>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: ext2_discard_prealloc() called on each iput?

On Mon, May 28, 2007 at 06:04:20PM +0200, Jan Kara wrote:
>   OK, but then you could move the code to drop_inode() which is called at
> exactly that moment... I've been thinking more about it when fixing UDF.
> Discarding prealloc at drop_inode() has the disadvantage that
> symlinks/directories will keep their preallocated blocks until inodes are
> evicted from memory. Which is probably why ext2 discards prealloc on
> iput().

We should never be preallocating for symlinks (it just doesn't make
any sense), and for directories, it usually doesn't make sense,
either.  I don't recall that ext2 did preallocation for
symlinks/directories; I seem to recall it was only for normal files.
If it isn't, I'd argue that's a bug that should be fixed.

In either case, discarding on iput() doesn't help since we don't hold
a reference count on the inode, but rather the dentry .

>   OK, but still we could use e.g. i_writecount to check that we drop the
> last descriptor for writing...

That would be better, yes.

						- Ted
-
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