From: Dave Chinner <david@fromorbit.com>
To: Theodore Ts'o <tytso@mit.edu>, Eric Sandeen <esandeen@redhat.com>,
Andreas Dilger <adilger@dilger.ca>,
Namjae Jeon <linkinjeon@gmail.com>,
"adilger.kernel@dilger.ca" <adilger.kernel@dilger.ca>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
"a.sangwan@samsung.com" <a.sangwan@samsung.com>,
Namjae Jeon <namjae.jeon@samsung.com>
Subject: Re: [PATCH 0/3] ext4: introduce two new ioctls
Date: Mon, 24 Jun 2013 18:08:44 +1000 [thread overview]
Message-ID: <20130624080844.GR29338@dastard> (raw)
In-Reply-To: <20130624031235.GA6991@thunk.org>
On Sun, Jun 23, 2013 at 11:12:35PM -0400, Theodore Ts'o wrote:
> On Mon, Jun 24, 2013 at 12:44:59PM +1000, Dave Chinner wrote:
> >
> > Hence, at minimum, this should be a fallocate() operation, not a ext4
> > specific ioctl as it is relatively trivial to implement on most
> > extent based filesystems.
>
> The fallocate() uses a units of bytes for the offset and length; would
> a FALLOC_FL_COLLAPSE_RANGE be guaranteed to work on any arbitrary
> offset and length? Or would it only work if the offset and length are
> multiples of the file system blocksize?
There's nothing stopping us from restricting the offset/len to
specific alignments if the operation cannot be done on arbitrary
byte ranges. We do that for direct IO, and the sky hasn't fallen
yet.
> The the EXT4_IOC_TRUNCATE_BLOCK_RANGE interface solves this problem by
> using units of file system blocks (i.e., __u32 start_block), but that
> raises another issue, which is it forces the user space program to
> somehow figure out the file system block size, which seems a bit nasty.
Yeah, exactly. We can do that internally very easily, and EINVAL can
be returned when the alignment is bad just like we do for direct
IO...
But, well, I pine for a generic XFS_IOC_DIOINFO interface so the
filesystem can tell users about alignment restrictions....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2013-06-24 8:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-23 6:07 [PATCH 0/3] ext4: introduce two new ioctls Namjae Jeon
2013-06-23 6:22 ` Namjae Jeon
2013-06-23 17:00 ` Andreas Dilger
2013-06-24 0:32 ` Eric Sandeen
2013-06-24 2:44 ` Dave Chinner
2013-06-24 3:12 ` Theodore Ts'o
2013-06-24 8:08 ` Dave Chinner [this message]
2013-06-24 7:06 ` Christoph Hellwig
2013-06-24 9:35 ` Namjae Jeon
2013-06-24 10:37 ` Sidorov, Andrei
2013-06-24 14:14 ` Zheng Liu
2013-06-24 21:29 ` Dave Chinner
2013-06-24 6:48 ` Namjae Jeon
-- strict thread matches above, loose matches on Subject: below --
2013-06-23 6:05 Namjae Jeon
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=20130624080844.GR29338@dastard \
--to=david@fromorbit.com \
--cc=a.sangwan@samsung.com \
--cc=adilger.kernel@dilger.ca \
--cc=adilger@dilger.ca \
--cc=esandeen@redhat.com \
--cc=linkinjeon@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namjae.jeon@samsung.com \
--cc=tytso@mit.edu \
/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).