From: Theodore Tso <tytso@MIT.EDU>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
akpm@linuxfoundation.org, Mark Fasheh <mfasheh@suse.com>
Subject: Re: [PATCH 1/4] vfs: vfs-level fiemap interface
Date: Sat, 13 Sep 2008 17:29:03 -0400 [thread overview]
Message-ID: <20080913212903.GF26128@mit.edu> (raw)
In-Reply-To: <2EC8176B-0AFA-4B36-A2F5-E51753A576A5@cam.ac.uk>
On Sat, Sep 13, 2008 at 10:17:07PM +0100, Anton Altaparmakov wrote:
> Hi,
>
> Just a quick question (not a criticism of the patches in any way):
>
> Is there a specific reason that the flag FIEMAP_EXTENT_DATA_ENCRYPTED
> exists? I am only asking because there isn't a
> FIEMAP_EXTENT_DATA_COMPRESSED flag yet the effect on the data is the
> same. I suppose one could argue that compression is a form of
> encryption (as one cannot read the data on disk without decompressing
> it) and thus for compressed files I can just set
> FIEMAP_EXTENT_DATA_ENCRYPTED, too?
You could, but actually, the interface isn't really set up well to
deal with compressed files. In order to deal with compressed data you
really would need two fields in struct fiemap_extent:
fe_length_physical, fe_length_logical, like this:
struct fiemap_extent {
__u64 fe_logical; /* logical offset in bytes for the start of
* the extent from the beginning of the file */
__u64 fe_physical; /* physical offset in bytes for the start
* of the extent from the beginning of the disk */
__u64 fe_length; /* length in bytes for this extent */
__u64 fe_length_physical; /* length in bytes for this extent as
* encoded/compressed on disk */
__u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */
__u32 fe_reserved;
};
Part of the problem/frustration as we go around and round fs-devel is
that some people would request new features to support new
filesystems, and other people have been rejecting new features because
it makes the interface more complicated.
In fact, the previous version of the patch had a flag for compression,
but Cristoph Hellwig objected because he claimed there were no users
for it.
I don't care how this interface ends up, at least as far as this point
is concerned, but it's really annoying when some people want to add
features, and other people are objecting and trying to remove
features, and months and months and months go by while the patch
languishes while people play tug of war on the d*mned thing.
Probably the best thing to do is to add a much larger number of
reserved fields, of size __u32 and __u64, appropriately aligned, and
then when someone adds a compressed filesystem, we can add the
structure definition without changing the size of the structure.
Otherwise, the thou-shalt-not-anticipate-the-needs-of-any-future-
users-of-the-interface nazi's will strike again, and more months will
go by with absolutely no progress....
- Ted
next prev parent reply other threads:[~2008-09-13 21:29 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-13 18:47 YET ANOTHER resend of the fiemap patches Theodore Ts'o
2008-09-13 18:49 ` [PATCH 1/4] vfs: vfs-level fiemap interface Theodore Ts'o
2008-09-13 18:49 ` [PATCH 2/4] ocfs2: fiemap support Theodore Ts'o
2008-09-13 18:49 ` [PATCH 3/4] generic block based fiemap implementation Theodore Ts'o
2008-09-13 18:49 ` [PATCH 4/4] Hook ext4 to the vfs fiemap interface Theodore Ts'o
2008-09-13 21:17 ` [PATCH 1/4] vfs: vfs-level " Anton Altaparmakov
2008-09-13 21:29 ` Theodore Tso [this message]
2008-09-13 21:45 ` Matthew Wilcox
2008-09-13 22:41 ` Theodore Tso
2008-09-13 21:59 ` Anton Altaparmakov
2008-09-14 13:51 ` Christoph Hellwig
2008-09-14 13:48 ` Christoph Hellwig
2008-09-14 17:58 ` Theodore Tso
2008-09-15 14:49 ` Christoph Hellwig
2008-09-15 17:53 ` Mark Fasheh
2008-09-16 6:51 ` Andreas Dilger
2008-09-16 21:31 ` Theodore Tso
2008-09-20 16:47 ` Josef 'Jeff' Sipek
2008-09-29 1:07 ` Theodore Tso
2008-09-29 21:13 ` Mark Fasheh
2008-09-29 22:10 ` Theodore Tso
2008-09-14 13:47 ` Christoph Hellwig
2008-09-14 18:01 ` Theodore Tso
2008-09-14 18:08 ` Christoph Hellwig
2008-09-14 19:58 ` Theodore Tso
2008-09-15 14:47 ` Christoph Hellwig
2008-09-16 6:49 ` Andreas Dilger
2008-09-16 22:03 ` Theodore Tso
2008-09-17 14:18 ` Jörn Engel
2008-09-17 15:02 ` Jamie Lokier
2008-09-17 15:25 ` Theodore Tso
2008-09-19 14:05 ` Chris Mason
2008-09-19 17:38 ` Jamie Lokier
2008-09-20 7:43 ` Dave Chinner
2008-09-20 13:50 ` Chris Mason
2008-09-20 15:36 ` Jamie Lokier
2008-09-20 15:44 ` Christoph Hellwig
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=20080913212903.GF26128@mit.edu \
--to=tytso@mit.edu \
--cc=aia21@cam.ac.uk \
--cc=akpm@linuxfoundation.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mfasheh@suse.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