linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Fasheh <mfasheh@suse.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, 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 11:56:22 -0700	[thread overview]
Message-ID: <20080527185622.GR8325@wotan.suse.de> (raw)
In-Reply-To: <20080525194203.GB24328@infradead.org>

On Sun, May 25, 2008 at 03:42:03PM -0400, Christoph Hellwig wrote:

[ I'll get back to you regarding luns and the HSM flag ]

> > struct fiemap_extent_info {
> > 	unsigned int	fi_flags;		/* Flags as passed from user */
> > 	unsigned int	fi_extents_mapped;	/* Number of mapped extents */
> > 	unsigned int	fi_extents_max;		/* Size of fiemap_extent array */
> > 	char		*fi_extents_start;	/* Start of fiemap_extent array */
> > };
> 
> Why is this passes a structure instead of individual arguments?

[ The structure vs args seems to been addressed elsewhere in
this thread ]

> Also why isn't fi_extents_start properly typed?

There's no good reason, my brain just wrote it that way. I can type it
properly in my next patch.


> > If the request has the FIEMAP_FLAG_NUM_EXTENTS flag set, then calling
> > this helper is not necessary and fi_extents_mapped can be set
> > directly.
> 
> Sounds like the count number of extents request should be a separate
> ioctl and separate filesystem entry point instead of overloading FIEMAP.
> 
> Just define a simple FIECOUNT ioctl.

Having it as a seperate, simpler ioctl is fine with me. As it is, we're sort
of shoe-horning it into a structure which is more optimized for returning
actual extent data. The flag breaks lots of rules for that structure, such
as no actual fm_extents needing to be allocated, fm_extent_count is
magically ignored for that call, etc. So the simpler API to userspace is a
win, IMHO.

What about the back-end though? This is pretty transparently handled in
fiemap_fill_next_extent() and many file systems (Ocfs2 included) would just
have ->fiecount callbacks that are nearly identical ->fiecount to their
->fiemap...
	--Mark

--
Mark Fasheh

  parent reply	other threads:[~2008-05-27 18:56 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
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 [this message]
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=20080527185622.GR8325@wotan.suse.de \
    --to=mfasheh@suse.com \
    --cc=Kalpak.Shah@sun.com \
    --cc=adilger@shaw.ca \
    --cc=hch@infradead.org \
    --cc=jbacik@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --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).