linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: Andreas Dilger <adilger@sun.com>,
	Jamie Lokier <jamie@shareable.org>,
	Eric Sandeen <sandeen@redhat.com>, Mark Fasheh <mfasheh@suse.com>,
	linux-fsdevel@vger.kernel.org, Andreas Dilger <adilger@shaw.ca>,
	Kalpak Shah <Kalpak.Shah@Sun.COM>,
	Josef Bacik <jbacik@redhat.com>
Subject: Re: [PATCH 0/4] Fiemap, an extent mapping ioctl - round 2
Date: Mon, 30 Jun 2008 07:45:25 +1000	[thread overview]
Message-ID: <20080629214525.GI29319@disturbed> (raw)
In-Reply-To: <1DAFD0EF-FF4A-456C-A7E6-E718031E220D@cam.ac.uk>

On Sun, Jun 29, 2008 at 08:12:32PM +0100, Anton Altaparmakov wrote:
> On 26 Jun 2008, at 17:56, Andreas Dilger wrote:
>> On Jun 26, 2008  15:16 +0100, Jamie Lokier wrote:
>>>>> Because xattrs tend to contain user data, not metadata?
>>>>
>>>> Agreed, I don't see anything particularly strange about returning  
>>>> the
>>>> xattr mapping, and to me it's not particularly fs specific  (well,  
>>>> the
>>>> detailed format of the on-disk data might be, i.e. the layout of  
>>>> names &
>>>> values within that blob of data, but it is still user data... I  
>>>> guess
>>>> it's something of a grey area).
>>>
>>> I'm thinking that some filesystems won't store it as a 'blob' at all,
>>> but as, for example, leaves in a whole-fs tree structure on the same
>>> footing as permissions, size, etc.
>>>
>>> I don't see a problem with the xattr feature - it might be useful on
>>> several filesystems.  (For my own program which tries to call stat()
>>> in disk layout order to reduce seeks, knowing xattr blocks _would_ be
>>> useful, as it could try to get xattrs in disk layout order too).
>>>
>>> I just wanted to bring up that "all the xattrs of one inode" aren't
>>> necessarily a blob of data in the same way as ordinary contents.
>>> (Just in case it's being assumed that it is.)
>>
>> It doesn't need to be a "blob", per se.  The physical addresses should
>> really represent where the xattrs are stored on disk, regardless of
>> whether it is stored in a separate block, or in the inode, or in the
>> leaves of a filesystem-wide tree.  There can be multiple blocks/ 
>> extents
>> returned for an XATTR request (as ext4 and ext3 eventually will  
>> allow).
>>
>> The logical offset of an xattr doesn't make so much sense, but I don't
>> think that is harmful.  I'd suggest that multiple xattrs be returned
>> in the order that a name search would be done, but I don't think it
>> really matters.
>
> But how would you return multiple xattrs if some of them are stored  
> inside the on-disk inode structure, some are stored in a single extent, 
> and some are stored in lots of extents, i.e. some have "proper", 
> block-aligned mappings and some don't.

For xfs_bmap we don't care - we just return the extent map of the tree.
i.e. you can't find out the location of an individual xattr without
doing lots more filesystem specific decoding. If you have large
xattrs and a fragmented tree, then you've got problems. Basically,
the flag is not to indicate getting the mapping of a specific
xattr, but that of the entire set of xattr data. If you know the
offset and length of the xattr, then you can get it specifically,
bu to do that you need to know about the internals of the
filesystem....

FWIW, this is exactly the same case as getting the extent map of a
directory data (I use xfs_bmap all the time for this) - you know
where the blocks are, but without completely decoding the directory
structure you have no idea where inside that map a given entry is.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2008-06-29 21:45 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 [this message]
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
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=20080629214525.GI29319@disturbed \
    --to=david@fromorbit.com \
    --cc=Kalpak.Shah@Sun.COM \
    --cc=adilger@shaw.ca \
    --cc=adilger@sun.com \
    --cc=aia21@cam.ac.uk \
    --cc=jamie@shareable.org \
    --cc=jbacik@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mfasheh@suse.com \
    --cc=sandeen@redhat.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).