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:	Mon, 22 Jul 2013 10:17:42 +0800
From:	Zheng Liu <gnehzuil.liu@...il.com>
To:	Dave Chinner <david@...morbit.com>
Cc:	Theodore Ts'o <tytso@....edu>, Eric Sandeen <sandeen@...hat.com>,
	Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH 0/5 v2] add extent status tree caching

On Mon, Jul 22, 2013 at 11:38:31AM +1000, Dave Chinner wrote:
> On Fri, Jul 19, 2013 at 12:19:30PM -0400, Theodore Ts'o wrote:
> > On Fri, Jul 19, 2013 at 01:33:09PM +1000, Dave Chinner wrote:
> > > An ioctl is kinda silly for this. Just use O_NONBLOCK when calling
> > > open() and do the prefetch right in the open call. The open() can
> > > block, anyway, and what you are trying to do is non-blocking IO with
> > > AIO, so it seems like we've already got a sensible, generic
> > > interface for triggering this sort of prefetch operation.
> > 
> > O_NONBLOCK (either set via open or fcntl) is a possibility, since it's
> > carefully defined to be unspecified for regular files by SUSv3.  It is
> > quite different from the existing semantics for O_NONBLOCK, though.
> > Currently, for all file types where O_NONBLOCK is not ignored, open(2)
> > is guaranteed itself not to block.  If we use O_NONBLOCK for regular
> > files to mean that any necessary metadata blocks required for AIO to
> > be "A" will be cached, then it will make open(2) much more likely to
> > block.  Also, for all file types where O_NONBLOCK is not ignored,
> > read(2) will not block but instead return -1 and set errno to EAGAIN.
> > This would also be a change.
> > 
> > If we tried to get this new semantics for O_NONBLOCK to be accepted by
> > the Austin Group for standardization in the future, would they accept
> > it, or would they say, "this makes me vommit"?  I have a suspicion
> > there reaction might be closer to the latter....
> > 
> > If we want a VFS-level API, in my opinion an fadvise() flag would be a
> > better choice.
> 
> Sure. Make it an fadvise() flag - just don't add ioctls for things
> that are generically useful.
> 
> On second thoughts - you're trying to get the extent map read in. We
> already have an interface for querying extent maps - fiemap.
> FIEMAP_FLAG_PREFETCH along with the range of the file you want the
> extent map prefetched for?

I don't think fiemap is a good interface.  The application uses
fiemap(2) to retrieve extent mapping.  That means that the app could use
these mappings in userspace.  But now we want to cache these mappings in
kernel space.  So it seems that an fadvise(2) flag is better.

Regards,
                                                - Zheng
--
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