From: "Lukáš Czerner" <lczerner@redhat.com>
To: jon ernst <jonernst07@gmail.com>
Cc: linux-fsdevel@vger.kernel.org,
"linux-ext4@vger.kernel.org List" <linux-ext4@vger.kernel.org>,
Theodore Ts'o <tytso@mit.edu>,
xfs@oss.sgi.com
Subject: Re: [PATCH 5/6 v2] ext4: Introduce FALLOC_FL_ZERO_RANGE flag for fallocate
Date: Thu, 27 Feb 2014 12:56:54 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.2.00.1402271249570.2247@localhost.localdomain> (raw)
In-Reply-To: <CAGW2f1FcoMJpFv=7xqPB4+R3-yOqmn89CnAZAJKif_3a3ETcPg@mail.gmail.com>
On Wed, 26 Feb 2014, jon ernst wrote:
> Date: Wed, 26 Feb 2014 23:41:15 -0500
> From: jon ernst <jonernst07@gmail.com>
> To: Lukas Czerner <lczerner@redhat.com>
> Cc: "linux-ext4@vger.kernel.org List" <linux-ext4@vger.kernel.org>,
> Theodore Ts'o <tytso@mit.edu>, linux-fsdevel@vger.kernel.org,
> xfs@oss.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@gmail.com> wrote:
> > On Tue, Feb 25, 2014 at 2:14 PM, Lukas Czerner <lczerner@redhat.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@redhat.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!)
Wow, that's an early ping :) I am sorry to disappoint you, my answer
is not going to be that exciting :)
Yes, we can just use EXT_UNINIT_MAX_LEN here. But
EXT_UNINIT_MAX_LEN/2 would make it much more evenly spread out.
I do not think there is any real world advantage to this and the
behaviour should be the same in both cases.
Thanks!
-Lukas
>
> Thanks!
> Jon
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-02-27 11:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-25 19:14 [PATCH 0/6 v2] Introduce FALLOC_FL_ZERO_RANGE flag for fallocate Lukas Czerner
2014-02-25 19:14 ` [PATCH 1/6 v2] ext4: Update inode i_size after the preallocation Lukas Czerner
2014-03-16 3:27 ` tytso
2014-03-17 3:02 ` tytso
2014-03-17 10:48 ` Lukáš Czerner
2014-02-25 19:14 ` [PATCH 2/6 v2] ext4: refactor ext4_fallocate code Lukas Czerner
2014-03-16 3:28 ` tytso
2014-02-25 19:14 ` [PATCH 3/6 v2] ext4: translate fallocate mode bits to strings Lukas Czerner
2014-02-25 19:14 ` [PATCH 4/6 v2] fs: Introduce FALLOC_FL_ZERO_RANGE flag for fallocate Lukas Czerner
2014-02-25 19:14 ` [PATCH 5/6 v2] ext4: " Lukas Czerner
2014-02-26 6:00 ` jon ernst
2014-02-27 4:41 ` jon ernst
2014-02-27 11:56 ` Lukáš Czerner [this message]
2014-03-16 4:13 ` tytso
2014-02-25 19:14 ` [PATCH 6/6 v2] xfs: Add support for FALLOC_FL_ZERO_RANGE Lukas Czerner
2014-03-13 8:49 ` [PATCH 0/6 v2] Introduce FALLOC_FL_ZERO_RANGE flag for fallocate Dave Chinner
2014-03-13 10:14 ` Lukáš Czerner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.00.1402271249570.2247@localhost.localdomain \
--to=lczerner@redhat.com \
--cc=jonernst07@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).