linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jim owens <jowens@hp.com>
To: linux-fsdevel@vger.kernel.org, mfasheh@suse.com
Subject: Re: [PATCH 0/4] Fiemap, an extent mapping ioctl - round 2
Date: Thu, 03 Jul 2008 10:37:36 -0400	[thread overview]
Message-ID: <486CE430.9010902@hp.com> (raw)
In-Reply-To: <20080625221835.GQ28100@wotan.suse.de>

As Jamie pointed out, this:

> * FIEMAP_EXTENT_NO_DIRECT
> Direct access to the data in this extent is illegal or will have
> undefined results.

will confuse and mislead many people.  And as Andreas said,
the fe_physical and fe_device can be valid without the ability
to directly access the data.  I suggest we call this:

   FIEMAP_EXTENT_NO_BYPASS

As in "you can't bypass the filesystem" to directly access it.

Based on what Andreas said the NO_DIRECT (NO_BYPASS) means,
I disagree with these:

> * FIEMAP_EXTENT_SECONDARY
> The data for this extent is in secondary storage (e.g. HSM).  If the
> data is not also in the filesystem, then FIEMAP_EXTENT_NO_DIRECT
> should also be set.

First, "If the data is not also in the filesystem" has no
relevance.  You are either providing the fe_physical and
fe_device for the HSM which may or may not allow direct
access, or you are providing the location in the filesystem
of the primary copy in which case you are not setting
FIEMAP_EXTENT_SECONDARY.  I don't think you want to return
BOTH the fiemap_extent primary and secondary as this will
confuse the hell out of everyone.

Or, as was said before, maybe HSM should wait until we
know what it really needs.

> * FIEMAP_EXTENT_NET
>   - This will also set FIEMAP_EXTENT_NO_DIRECT
> The data for this extent is not stored in a locally-accessible device.
> 
> * FIEMAP_EXTENT_DATA_COMPRESSED
>   - This will also set FIEMAP_EXTENT_NO_DIRECT
> The data in this extent has been compressed by the file system.
> 
> * FIEMAP_EXTENT_DATA_ENCRYPTED
>   - This will also set FIEMAP_EXTENT_NO_DIRECT
> The data in this extent has been encrypted by the file system.

None of the above are always NO_DIRECT.  Certainly you can
read the raw compressed/encrypted data (a backup program might)
and even a netdev might be accessed if you know how.

I think you need a different top-level flag that covers
"things which are not raw block data" so I would change this:

> * FIEMAP_EXTENT_NOT_ALIGNED
> Extent offsets and length are not guaranteed to be block aligned.

To be something like:

    FIEMAP_EXTENT_ENCODED

> * FIEMAP_EXTENT_DATA_INLINE
>   This will also set FIEMAP_EXTENT_NOT_ALIGNED
> Data is located within a meta data block.
> 
> * FIEMAP_EXTENT_DATA_TAIL
>   This will also set FIEMAP_EXTENT_NOT_ALIGNED
> Data is packed into a block with data from other files.

With FIEMAP_EXTENT_ENCODED being the top flag set for
FIEMAP_EXTENT_NET, FIEMAP_EXTENT_DATA_COMPRESSED,
FIEMAP_EXTENT_DATA_ENCRYPTED, FIEMAP_EXTENT_DATA_INLINE,
and FIEMAP_EXTENT_DATA_TAIL.  Then FIEMAP_EXTENT_NO_BYPASS
may or may not also be set and would say "can I get to
the physical data", and separately "do I need to do
special processing on it" would be FIEMAP_EXTENT_ENCODED.

> * FIEMAP_EXTENT_UNWRITTEN
> Unwritten extent - the extent is allocated but it's data has not been
> initialized.  This indicates the extent's data will be all zero.

This should say "will be all zero if read through the filesystem
but the contents are undefined if read directly."

jim

  parent reply	other threads:[~2008-07-03 14:38 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-25 22:18 [PATCH 0/4] Fiemap, an extent mapping ioctl - round 2 Mark Fasheh
2008-06-26  3:03 ` Andreas Dilger
2008-06-26  9:36 ` Jamie Lokier
2008-06-26 10:24   ` Andreas Dilger
2008-06-26 11:37     ` Anton Altaparmakov
2008-06-26 12:19     ` Jamie Lokier
2008-06-26 13:16       ` Dave Chinner
2008-06-26 13:27         ` Jamie Lokier
2008-06-26 13:48         ` Eric Sandeen
2008-06-26 14:16           ` Jamie Lokier
2008-06-26 16:56             ` Andreas Dilger
2008-06-29 19:12               ` Anton Altaparmakov
2008-06-29 21:45                 ` Dave Chinner
2008-06-30 22:57                   ` Jamie Lokier
2008-06-30 23:07                     ` Mark Fasheh
2008-07-01  2:01                       ` Brad Boyer
2008-07-02  6:38                         ` Andreas Dilger
2008-07-02  6:33                 ` Andreas Dilger
2008-07-02 14:26                   ` Jamie Lokier
2008-06-26 17:17       ` Andreas Dilger
2008-06-26 14:03 ` Eric Sandeen
2008-06-27  1:41   ` Dave Chinner
2008-06-27  9:41     ` Jamie Lokier
2008-06-27 10:01       ` Dave Chinner
2008-06-27 10:32         ` Jamie Lokier
2008-06-27 22:48       ` Andreas Dilger
2008-06-28  4:21         ` Eric Sandeen
2008-07-02  6:26           ` Andreas Dilger
2008-07-02 14:28             ` Jamie Lokier
2008-07-02 21:20               ` Mark Fasheh
2008-07-03 14:45                 ` Jamie Lokier
2008-06-26 14:04 ` Dave Kleikamp
2008-06-26 14:15   ` Eric Sandeen
2008-06-26 14:27     ` Dave Kleikamp
2008-07-02 23:48       ` jim owens
2008-07-03 11:17         ` Dave Chinner
2008-07-03 12:11           ` jim owens
2008-07-03 22:51             ` Dave Chinner
2008-07-04  8:31               ` Andreas Dilger
2008-07-04 12:13               ` Jamie Lokier
2008-07-07  7:40                 ` Dave Chinner
2008-07-07 16:53                   ` Jamie Lokier
2008-07-07 22:51                     ` Dave Chinner
2008-07-07 21:16               ` jim owens
2008-07-08  3:01                 ` Dave Chinner
2008-07-07 22:02               ` jim owens
2008-07-09  2:03                 ` Jamie Lokier
2008-07-03 12:21           ` jim owens
2008-07-03 12:42             ` Andi Kleen
2008-07-04 20:32             ` Anton Altaparmakov
2008-07-05 10:49               ` Jamie Lokier
2008-07-05 21:44                 ` Anton Altaparmakov
2008-07-07 23:01               ` jim owens
2008-07-08  1:51                 ` Dave Chinner
2008-07-08 13:02                   ` jim owens
2008-07-08 14:03                     ` jim owens
2008-07-08 14:39                       ` jim owens
2008-07-08 14:30                     ` Theodore Tso
2008-07-09  1:50                       ` Jamie Lokier
2008-06-26 17:01   ` Andreas Dilger
2008-07-03 14:37 ` jim owens [this message]
2008-07-03 15:17   ` Jamie Lokier
2008-07-04  8:49     ` Andreas Dilger
2008-07-04 11:28       ` Jamie Lokier
2008-07-03 23:00   ` Dave Chinner
2008-07-04  9:00   ` Andreas Dilger
2008-07-07 23:28     ` jim owens
2008-07-09  1:53       ` Jamie Lokier
2008-07-09 15:01         ` jim owens
2008-07-08  0:06     ` jim owens

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=486CE430.9010902@hp.com \
    --to=jowens@hp.com \
    --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;
as well as URLs for NNTP newsgroup(s).