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] [day] [month] [year] [list]
Date:	Tue, 3 Nov 2009 21:09:15 -0500
From:	Theodore Tso <tytso@....edu>
To:	Mingming <cmm@...ibm.com>
Cc:	ext4 development <linux-ext4@...r.kernel.org>,
	Curt Wohlgemuth <curtw@...gle.com>
Subject: Re: [PATCH 1/4 v2] Direct IO return value fix for holes/fallocate

On Thu, Oct 08, 2009 at 06:13:16PM -0700, Mingming wrote:
> ext4: Direct IO return value fix for holes/fallocate
> 
> When direct IO complete, ext4 will convert unwritten extents to written,
> for
> writes over preallocated space, or holes.
> 
> ext4_direct_IO should returns the number of bytes read/write on success.
> However there is a bug that cause ext4_direct_IO returns the number of
> bytes converted to written extents, which is 0 on success. This bug
> causes
> direct IO falls back to buffered IO even on sucessful rewrites or
> preallocated space. 
> 
> Signed-off-by: Mingming Cao <cmm@...ibm.com>

I fixed up some white space issues, and rewrote the patch descriptions
as follows:

ext4: fix ext4_ext_direct_IO()'s return value after converting uninit extents

After a direct I/O request covering an uninitalized extent (i.e.,
created using the fallocate system call) or a hole in a file, ext4
will convert the uninitialized extent so it is marked as initialized
by calling ext4_convert_unwritten_extents().  This function returns
zero on success.

This return value was getting returned by ext4_direct_IO(); however
the file system's direct_IO function is supposed to return the number
of bytes read or written on a success.  By returning zero, it confused
the direct I/O code into falling back to buffered I/O unnecessarily.

Signed-off-by: Mingming Cao <cmm@...ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@....edu>

Added to the patch queue.

						- 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