| To: | Lukas Czerner <lczerner@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 5/6 v2] ext4: Introduce FALLOC_FL_ZERO_RANGE flag for fallocate |
| From: | jon ernst <jonernst07@xxxxxxxxx> |
| Date: | Wed, 26 Feb 2014 23:41:15 -0500 |
| Cc: | "linux-ext4@xxxxxxxxxxxxxxx List" <linux-ext4@xxxxxxxxxxxxxxx>, "Theodore Ts'o" <tytso@xxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=HLG32qcibAbq+QEuke94KplFKKvB9M72k8/pz5gqC5w=; b=GKfz9DgeeKHBqSWOXcXFjXYyRPoFRMfc2xnvPmZBIvzvAypjjkNnqZUEVEa5KtH/Dw /FD9C7Vj+m7lfWMftwp3NrsWMN9Fk1uiuEZs2A6YoNr+iQrHN0By+Bfw8+y3H/NUxKJ7 HD6ChEu/4KUz638vgAN/KXzAVpo1xWtbHl1r5vdXceMimmg+3/t3Lgz9ymP94xaX61Nb FIZnIJ1f9uoDbwQr5nDRyOD1lPI53tQB/lAB6k+DpVqrJ3m82NZ5WO58bPt/CGjhilDZ 2BuYGcmDntuz4a7SdlSjD4vaLv1RsweAqh6vth9UpP6+4oZ+JvfZxOwYK4HqJtX5PAac GumA== |
| In-reply-to: | <CAGW2f1G_HjhVXc9jyNEAaX8VUaZov7qaRVuj+KvnbbqvtL0k3g@xxxxxxxxxxxxxx> |
| References: | <1393355679-11160-1-git-send-email-lczerner@xxxxxxxxxx> <1393355679-11160-6-git-send-email-lczerner@xxxxxxxxxx> <CAGW2f1G_HjhVXc9jyNEAaX8VUaZov7qaRVuj+KvnbbqvtL0k3g@xxxxxxxxxxxxxx> |
On Wed, Feb 26, 2014 at 1:00 AM, jon ernst <jonernst07@xxxxxxxxx> wrote:
> On Tue, Feb 25, 2014 at 2:14 PM, Lukas Czerner <lczerner@xxxxxxxxxx> 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@xxxxxxxxxx>
>> ---
>> 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
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 7/9 V2] xfs: add xfs_verifier_error(), Dave Chinner |
|---|---|
| Next by Date: | Re: [PATCH] xfs_io: add fzero command for zeroing range via fallocate, Dave Chinner |
| Previous by Thread: | Re: [PATCH 5/6 v2] ext4: Introduce FALLOC_FL_ZERO_RANGE flag for fallocate, jon ernst |
| Next by Thread: | Re: [PATCH 5/6 v2] ext4: Introduce FALLOC_FL_ZERO_RANGE flag for fallocate, Lukáš Czerner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |