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]
Message-id: <20090930081044.GG3384@webber.adilger.int>
Date:	Wed, 30 Sep 2009 02:10:44 -0600
From:	Andreas Dilger <adilger@....com>
To:	Eric Sandeen <sandeen@...hat.com>
Cc:	Jiaying Zhang <jiayingz@...gle.com>, Theodore Tso <tytso@....edu>,
	Frank Mayhar <fmayhar@...gle.com>,
	Curt Wohlgemuth <curtw@...gle.com>,
	ext4 development <linux-ext4@...r.kernel.org>
Subject: Re: Question on fallocate/ftruncate sequence

On Sep 29, 2009  14:55 -0500, Eric Sandeen wrote:
> Jiaying Zhang wrote:
> > As Andreas suggested, I think the main purpose is to allow users
> > to scan for any files with EOF flag with the getflag ioctl. We may
> > not allow users to clear it with the setflag ioctl but just rely on
> > the truncate interface, but supporting the setflag ioctl interface
> > doesn't seem to do any harm.
> 
> I like the idea of being able to find them, but adding the clearing
> interface seems redundant to me.  All filesystems would need to
> implement this, and I don't see that we gain anything.

I hadn't originally thought about being able to clear the flag, but
now that it is implemented, I don't have a big objection to it.
The one useful feature is that this could be done without changing
the timestamps on the files, and it can be done easily from a script.

We don't even have an fallocate() or other truncate() interface that
can do this without changing the timestamps today.  Even if we did
use truncate(), that is racy with an application writing to the file,
so it is not as safe as a call which is guaranteed to only discard
the unused preallocated blocks.

I don't think all other filesystems need to support it, that is up
to them.

As to whether applications use this or not remains to be seen.  I
doubt most applications will be written to be ext4-specific, but
I like the ability to scan/clear preallocated space without writing
a binary to do that, if I need it in the future.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

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