linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: steve@chygwyn.com
To: Theodore Ts'o <tytso@mit.edu>
Cc: linux-fsdevel@vger.kernel.org, Mark Fasheh <mfasheh@suse.com>,
	Michael Kerrisk <mtk.manpages@googlemail.com>,
	linux-abi@vger.kernel.org
Subject: Re: [PATCH 1/4] vfs: vfs-level fiemap interface
Date: Mon, 6 Oct 2008 14:07:35 +0100	[thread overview]
Message-ID: <20081006130735.GA31144@fogou.chygwyn.com> (raw)
In-Reply-To: <1223071147-27180-2-git-send-email-tytso@mit.edu>

Hi,

On Fri, Oct 03, 2008 at 05:59:04PM -0400, Theodore Ts'o wrote:
> From: Mark Fasheh <mfasheh@suse.com>
> 
> Basic vfs-level fiemap infrastructure, which sets up a new ->fiemap
> inode operation.
>
[snip]

> +/**
> + * fiemap_fill_next_extent - Fiemap helper function
> + * @fieinfo:	Fiemap context passed into ->fiemap
> + * @logical:	Extent logical start offset, in bytes
> + * @phys:	Extent physical start offset, in bytes
> + * @len:	Extent length, in bytes
> + * @flags:	FIEMAP_EXTENT flags that describe this extent
> + *
> + * Called from file system ->fiemap callback. Will populate extent
> + * info as passed in via arguments and copy to user memory. On
> + * success, extent count on fieinfo is incremented.
> + *
> + * Returns 0 on success, -errno on error, 1 if this was the last
> + * extent that will fit in user array.
> + */
> +#define SET_UNKNOWN_FLAGS	(FIEMAP_EXTENT_DELALLOC)
> +#define SET_NO_MOUNTED_IO_FLAGS	(FIEMAP_EXTENT_DATA_ENCRYPTED)
> +#define SET_NOT_ALIGNED_FLAGS	(FIEMAP_EXTENT_DATA_TAIL|FIEMAP_EXTENT_DATA_INLINE)
> +int fiemap_fill_next_extent(struct fiemap_extent_info *fieinfo, u64 logical,
> +			    u64 phys, u64 len, u32 flags)
> +{
> +	struct fiemap_extent extent;
> +	struct fiemap_extent *dest = fieinfo->fi_extents_start;
> +
> +	/* only count the extents */
> +	if (fieinfo->fi_extents_max == 0) {
> +		fieinfo->fi_extents_mapped++;
> +		return (flags & FIEMAP_EXTENT_LAST) ? 1 : 0;
> +	}
> +
> +	if (fieinfo->fi_extents_mapped >= fieinfo->fi_extents_max)
> +		return 1;
> +
> +	if (flags & SET_UNKNOWN_FLAGS)
> +		flags |= FIEMAP_EXTENT_UNKNOWN;
> +	if (flags & SET_NO_MOUNTED_IO_FLAGS)
> +		flags |= FIEMAP_EXTENT_NO_MOUNTED_IO;
> +	if (flags & SET_NOT_ALIGNED_FLAGS)
> +		flags |= FIEMAP_EXTENT_NOT_ALIGNED;
> +
> +	memset(extent, 0, sizeof(extent));
The above      ^^^^^^ fails to compile due to a missing &

Steve.

  parent reply	other threads:[~2008-10-06 13:09 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-03 21:59 [PATCH 0/4] Updated fiemap patches Theodore Ts'o
2008-10-03 21:59 ` [PATCH 1/4] vfs: vfs-level fiemap interface Theodore Ts'o
2008-10-03 21:59   ` [PATCH 2/4] ocfs2: fiemap support Theodore Ts'o
2008-10-03 21:59     ` [PATCH 3/4] generic block based fiemap implementation Theodore Ts'o
2008-10-03 21:59       ` [PATCH 4/4] Hook ext4 to the vfs fiemap interface Theodore Ts'o
2008-10-06 11:35       ` [PATCH 3/4] generic block based fiemap implementation steve
2008-10-06 21:14         ` Theodore Tso
2008-10-07  8:14           ` steve
2008-10-04  2:12   ` [PATCH 1/4] vfs: vfs-level fiemap interface Theodore Tso
2008-10-06 18:15     ` jim owens
2008-10-06 21:07       ` Theodore Tso
2008-10-07 10:12         ` Christoph Hellwig
2008-10-07 10:56           ` Andreas Dilger
2008-10-07 12:52             ` Theodore Tso
2008-10-07 13:00           ` Jamie Lokier
2008-10-07 13:02             ` Christoph Hellwig
2008-10-07 13:24               ` Jamie Lokier
2008-10-07 13:28                 ` Christoph Hellwig
2008-10-07 15:45                   ` Theodore Tso
2008-10-07 16:01                     ` jim owens
     [not found]                       ` <48EB87DE.4090607-VXdhtT5mjnY@public.gmane.org>
2008-10-07 18:52                         ` Theodore Tso
     [not found]                           ` <20081007185219.GD15929-3s7WtUTddSA@public.gmane.org>
2008-10-07 20:31                             ` Christoph Hellwig
2008-10-07 13:48             ` Theodore Tso
2008-10-07 23:43               ` Jamie Lokier
2008-10-09 20:40                 ` Andreas Dilger
2008-10-06 13:07   ` steve [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-10-09  1:48 PATCH [0/4] Updated**3 fiemap patches Theodore Ts'o
     [not found] ` <1223516913-17612-1-git-send-email-tytso-3s7WtUTddSA@public.gmane.org>
2008-10-09  1:48   ` [PATCH 1/4] vfs: vfs-level fiemap interface Theodore Ts'o
2008-10-07  1:06 PATCH [0/4] Updated**2 fiemap patches Theodore Ts'o
2008-10-07  1:06 ` [PATCH 1/4] vfs: vfs-level fiemap interface Theodore Ts'o
     [not found]   ` <1223341581-13802-2-git-send-email-tytso-3s7WtUTddSA@public.gmane.org>
2008-10-07  1:09     ` Theodore Tso
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 21:17   ` Anton Altaparmakov
2008-09-13 21:29     ` Theodore Tso
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
     [not found]                           ` <20080920135048.GA15698@think.oraclecorp.com>
2008-09-20 15:36                             ` Jamie Lokier
2008-09-20 15:44                               ` Christoph Hellwig
2008-06-25 22:18 Mark Fasheh

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=20081006130735.GA31144@fogou.chygwyn.com \
    --to=steve@chygwyn.com \
    --cc=linux-abi@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mfasheh@suse.com \
    --cc=mtk.manpages@googlemail.com \
    --cc=tytso@mit.edu \
    /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).