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:	Thu, 12 Mar 2009 15:05:22 -0500
From:	Eric Sandeen <sandeen@...hat.com>
To:	Theodore Tso <tytso@....edu>
CC:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	linux-ext4@...r.kernel.org
Subject: Re: [PATCH, RFC] ext4: add EXT4_IOC_ALLOC_DA_BLKS ioctl

Theodore Tso wrote:
> On Thu, Mar 12, 2009 at 11:32:18AM -0500, Eric Sandeen wrote:
>> Aneesh Kumar K.V wrote:
>>> On Wed, Mar 11, 2009 at 05:41:05PM -0500, Eric Sandeen wrote:
>>>> Theodore Ts'o wrote:
>>>>> Add an ioctl which forces all of the delay allocated blocks to be
>>>>> allocated.  This also provides a function ext4_alloc_da_blocks() which
>>>>> will be used by the following commits to force files to be fully
>>>>> allocated to preserve application-expected ext3 behaviour.
>>>>>
>>>> Is it worth checking whether a) the file has delalloc blocks, and/or b)
>>>> whether the mapping is dirty before we spin off a filemap_flush?
>>>>
>>> +int ext4_alloc_da_blocks(struct inode *inode)
>>> +{
>>> +       if (!EXT4_I(inode)->i_reserved_data_blocks &&
>>> +           !EXT4_I(inode)->i_reserved_meta_blocks)
>>> +               return 0;
>>>
>>> This check test does (a). Since the ioctl is to force allocation of
>>> delayed allocated blocks i guess (a) is enough because we don't want to
>>> cause a filemap_flush when we don't have any delayed allocated blocks
>>> but have dirty pages around.
>> and b) is as simple as
>>
>> if (!mapping_tagged(inode->i_mapping, PAGECACHE_TAG_DIRTY))
>> 	return 0;
> 
> Yeah, but (b) isn't necessary; if there are some delayed allocation
> blocks, by definition there must be some dirty pages, right?
> 
> 	   	      	    	    	 - Ted

oh, heh.  Right you are :)

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