From: jim owens <jowens@hp.com>
To: linux-fsdevel@vger.kernel.org
Cc: Chris Mason <chris.mason@oracle.com>,
Christoph Hellwig <hch@infradead.org>,
Mark Fasheh <mfasheh@suse.com>, Andreas Dilger <adilger@shaw.ca>,
Kalpak Shah <Kalpak.Shah@sun.com>,
Eric Sandeen <sandeen@redhat.com>,
Josef Bacik <jbacik@redhat.com>
Subject: Re: [RFC][PATCH 0/5] Fiemap, an extent mapping ioctl
Date: Tue, 27 May 2008 12:52:31 -0400 [thread overview]
Message-ID: <483C3C4F.1090903@hp.com> (raw)
In-Reply-To: <200805270948.51898.chris.mason@oracle.com>
For what it is worth, a few comments from a newbie who has
experience with a non-linux filesystem that has a similar API
and supports files spread across multiple devices.
Mark Fasheh wrote:
>
> * FIEMAP_FLAG_LUN_ORDER
> If the file system stripes file data, this will return contiguous
> regions of physical allocation, sorted by LUN. Logical offsets may not
> make sense if this flag is passed. If the file system does not support
> multiple LUNs, this flag will be ignored.
This should return an error (ENOTSUPPORTED ?) if the FS does
not support multiple devices OR does not support sort-by-lun-order
so the caller does not count on the info being sorted. Even an FS
that supports multiple devices per file may be unable to sort it
by on-disk-order without consuming an ugly set of resources.
Christoph Hellwig wrote:
>> __u32 fe_lun; /* logical device number for extent (starting at 0)*/
>
>
> Again this lun thing is horribly ill-defined. There is no such thing
> as a logic device number in our filesystem terminology.
I agree that LUN is confusing. In my opinion the words "logical"
and "number" are overused and meaningless. As Brad suggested,
"device" would be preferable, or "unit", but unfortunately every
word I can think of has some other definition too :)
Our term was "volume"... an awful designation.
Chris Mason wrote:
> For btrfs I would return the logical extents via fiemap (just like the file
> were on lvm) and make btrfs specific ioctls for details about where the file
> actually lived.
>
> fiemap alone isn't a great way to describe raid levels or complex storage
> topologies. To include physical information I would also have to encode the
> raid level used and information about all the devices the data is replicated
> on (raid1/10)
fiemap by itself is useful for programs that want to determine
how fragmented a file is or where sparse areas are to skip.
At least one more generic API is needed to enumerate the device number
to device (path name, inode, socket, ... ?). In our case this was only
used for clusters.
For the complex case you describe, it might be possible to have
an "enumerate" api that could be used to traverse each layer for
more detail. I hope this is done generically by someone.
A final thought on this:
> __u32 fe_lun; /* logical device number for extent (starting at 0)*/
While the flags field can be used to tell the validity of this
number, we found that starting at 0 was not a good practice.
We started at 1 so 0 was always a not-valid. One way this can
be useful is if you have delayed allocation, you can indicate
"intended device" with a non-0 number. Of course other values
such as max_int could be termed "invalid" instead.
Another point to document is whether this number is a contiguous
series (1, 2, 3,... N) defining the location based on the current
device list or is possibly a sparse (1, 2, 6) series because the
FS tracks devices that have been removed. In our implementation
both views were present for different consumers. The sparse
series was native and the contiguous series a translation.
jim
next prev parent reply other threads:[~2008-05-27 16:52 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-25 0:01 [RFC][PATCH 0/5] Fiemap, an extent mapping ioctl Mark Fasheh
2008-05-25 19:42 ` Christoph Hellwig
2008-05-25 20:59 ` Brad Boyer
2008-05-26 10:59 ` Andreas Dilger
2008-05-26 18:04 ` Brad Boyer
2008-05-27 16:45 ` Christoph Hellwig
2008-05-27 21:10 ` Mark Fasheh
2008-05-27 13:48 ` Chris Mason
2008-05-27 16:21 ` Eric Sandeen
2008-05-27 16:47 ` Christoph Hellwig
2008-05-27 20:34 ` Joel Becker
2008-05-27 16:52 ` jim owens [this message]
2008-05-27 17:19 ` Chris Mason
2008-05-28 16:09 ` Andreas Dilger
2008-05-28 16:33 ` Chris Mason
2008-05-29 22:01 ` Andreas Dilger
2008-05-30 13:37 ` Chris Mason
2008-05-29 13:01 ` Christoph Hellwig
2008-05-29 20:17 ` Andreas Dilger
2008-05-27 18:56 ` Mark Fasheh
2008-05-27 20:31 ` Joel Becker
2008-05-27 20:49 ` Mark Fasheh
2008-05-28 5:14 ` Christoph Hellwig
2008-05-28 16:02 ` Andreas Dilger
2008-05-28 17:04 ` Joel Becker
2008-05-29 0:51 ` Dave Chinner
2008-05-29 13:02 ` Christoph Hellwig
2008-05-29 15:33 ` jim owens
2008-05-29 15:53 ` Jamie Lokier
2008-05-29 18:56 ` Joel Becker
2008-05-29 21:41 ` Andreas Dilger
2008-05-29 21:47 ` Joel Becker
2008-05-29 23:20 ` Andreas Dilger
2008-05-29 1:17 ` Andreas Dilger
2008-05-29 5:55 ` 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=483C3C4F.1090903@hp.com \
--to=jowens@hp.com \
--cc=Kalpak.Shah@sun.com \
--cc=adilger@shaw.ca \
--cc=chris.mason@oracle.com \
--cc=hch@infradead.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).