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:	Wed, 26 Feb 2014 23:41:15 -0500
From:	jon ernst <jonernst07@...il.com>
To:	Lukas Czerner <lczerner@...hat.com>
Cc:	"linux-ext4@...r.kernel.org List" <linux-ext4@...r.kernel.org>,
	"Theodore Ts'o" <tytso@....edu>, linux-fsdevel@...r.kernel.org,
	xfs@....sgi.com
Subject: Re: [PATCH 5/6 v2] ext4: Introduce FALLOC_FL_ZERO_RANGE flag for fallocate

On Wed, Feb 26, 2014 at 1:00 AM, jon ernst <jonernst07@...il.com> wrote:
> On Tue, Feb 25, 2014 at 2:14 PM, Lukas Czerner <lczerner@...hat.com> wrote:
>> Introduce new FALLOC_FL_ZERO_RANGE flag for fallocate. This has the same
>> functionality as xfs ioctl XFS_IOC_ZERO_RANGE.
>>
>> It can be used to convert a range of file to zeros preferably without
>> issuing data IO. Blocks should be preallocated for the regions that span
>> holes in the file, and the entire range is preferable converted to
>> unwritten extents
>>
>> This can be also used to preallocate blocks past EOF in the same way as
>> with fallocate. Flag FALLOC_FL_KEEP_SIZE which should cause the inode
>> size to remain the same.
>>
>> Also add appropriate tracepoints.
>>
>> Signed-off-by: Lukas Czerner <lczerner@...hat.com>
>> ---
>>  fs/ext4/ext4.h              |   2 +
>>  fs/ext4/extents.c           | 270 +++++++++++++++++++++++++++++++++++++++++---
>>  fs/ext4/inode.c             |  17 ++-
>>  include/trace/events/ext4.h |  64 +++++------

>>  static int
>> +ext4_ext_convert_initialized_extent(handle_t *handle, struct inode *inode,
>> +                       struct ext4_map_blocks *map,
>> +                       struct ext4_ext_path *path, int flags,
>> +                       unsigned int allocated, ext4_fsblk_t newblock)
>> +{
>> +       int ret = 0;
>> +       int err = 0;
>> +
>> +       /*
>> +        * Make sure that the extent is no bigger than we support with
>> +        * uninitialized extent
>> +        */
>> +       if (map->m_len > EXT_UNINIT_MAX_LEN)
>> +               map->m_len = EXT_UNINIT_MAX_LEN / 2;
>
 Pardon my possible dumb question. Why do you use
"EXT_UNINIT_MAX_LEN/ 2;" here instead of "EXT_UNINIT_MAX_LEN"
 I don't see the reason why we can't use EXT_UNINIT_MAX_LEN here.


(resend, Ping on this question, thank you!)

Thanks!
 Jon
--
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