From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/9] iomap: add IOMAP_REPORT
Date: Mon, 10 Oct 2016 18:45:46 -0700 [thread overview]
Message-ID: <20161011014546.GF22379@birch.djwong.org> (raw)
In-Reply-To: <1476106685-29048-2-git-send-email-hch@lst.de>
On Mon, Oct 10, 2016 at 03:37:57PM +0200, Christoph Hellwig wrote:
> This allows the file system to tell a FIEMAP from a read operation, and thus
> avoids the need to report flags that aren't actually used in the read path.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> fs/iomap.c | 2 +-
> include/linux/iomap.h | 17 +++++++++++------
> 2 files changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/fs/iomap.c b/fs/iomap.c
> index 013d1d3..a922040 100644
> --- a/fs/iomap.c
> +++ b/fs/iomap.c
> @@ -561,7 +561,7 @@ int iomap_fiemap(struct inode *inode, struct fiemap_extent_info *fi,
> }
>
> while (len > 0) {
> - ret = iomap_apply(inode, start, len, 0, ops, &ctx,
> + ret = iomap_apply(inode, start, len, IOMAP_REPORT, ops, &ctx,
Hmm. /me notices that generic/352, generic/353, and generic/372 fail after
this patchset is applied. Will have a look at this tomorrow, unless this rings
a bell?
--D
> iomap_fiemap_actor);
> /* inode with no (attribute) mapping will give ENOENT */
> if (ret == -ENOENT)
> diff --git a/include/linux/iomap.h b/include/linux/iomap.h
> index e63e288..7892f55 100644
> --- a/include/linux/iomap.h
> +++ b/include/linux/iomap.h
> @@ -19,11 +19,15 @@ struct vm_fault;
> #define IOMAP_UNWRITTEN 0x04 /* blocks allocated @blkno in unwritten state */
>
> /*
> - * Flags for iomap mappings:
> + * Flags for all iomap mappings:
> */
> -#define IOMAP_F_MERGED 0x01 /* contains multiple blocks/extents */
> -#define IOMAP_F_SHARED 0x02 /* block shared with another file */
> -#define IOMAP_F_NEW 0x04 /* blocks have been newly allocated */
> +#define IOMAP_F_NEW 0x01 /* blocks have been newly allocated */
> +
> +/*
> + * Flags that only need to be reported for IOMAP_REPORT requests:
> + */
> +#define IOMAP_F_MERGED 0x10 /* contains multiple blocks/extents */
> +#define IOMAP_F_SHARED 0x20 /* block shared with another file */
>
> /*
> * Magic value for blkno:
> @@ -42,8 +46,9 @@ struct iomap {
> /*
> * Flags for iomap_begin / iomap_end. No flag implies a read.
> */
> -#define IOMAP_WRITE (1 << 0)
> -#define IOMAP_ZERO (1 << 1)
> +#define IOMAP_WRITE (1 << 0) /* writing, must allocate blocks */
> +#define IOMAP_ZERO (1 << 1) /* zeroing operation, may skip holes */
> +#define IOMAP_REPORT (1 << 2) /* report extent status, e.g. FIEMAP */
>
> struct iomap_ops {
> /*
> --
> 2.10.1.382.ga23ca1b
>
next prev parent reply other threads:[~2016-10-11 1:47 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-10 13:37 optimize the COW I/O path Christoph Hellwig
2016-10-10 13:37 ` [PATCH 1/9] iomap: add IOMAP_REPORT Christoph Hellwig
2016-10-11 1:45 ` Darrick J. Wong [this message]
2016-10-11 4:58 ` Christoph Hellwig
[not found] ` <20161011144557.GA16368@lst.de>
2016-10-11 16:22 ` Darrick J. Wong
2016-10-10 13:37 ` [PATCH 2/9] xfs: add xfs_trim_extent Christoph Hellwig
2016-10-10 13:37 ` [PATCH 3/9] xfs: handle "raw" delayed extents xfs_reflink_trim_around_shared Christoph Hellwig
2016-10-10 13:38 ` [PATCH 4/9] xfs: don't bother looking at the refcount tree for reads Christoph Hellwig
2016-10-10 13:38 ` [PATCH 5/9] xfs: optimize writes to reflink files Christoph Hellwig
2016-10-12 14:12 ` Brian Foster
2016-10-13 6:49 ` Christoph Hellwig
2016-10-13 13:26 ` Brian Foster
2016-10-13 18:28 ` Darrick J. Wong
2016-10-10 13:38 ` [PATCH 6/9] xfs: refactor xfs_bunmapi_cow Christoph Hellwig
2016-10-12 14:13 ` Brian Foster
2016-10-13 6:54 ` Christoph Hellwig
2016-10-13 13:26 ` Brian Foster
2016-10-10 13:38 ` [PATCH 7/9] xfs: optimize xfs_reflink_cancel_cow_blocks Christoph Hellwig
2016-10-12 14:13 ` Brian Foster
2016-10-13 7:01 ` Christoph Hellwig
2016-10-10 13:38 ` [PATCH 8/9] xfs: optimize xfs_reflink_end_cow Christoph Hellwig
2016-10-12 14:15 ` Brian Foster
2016-10-13 7:06 ` Christoph Hellwig
2016-10-13 13:27 ` Brian Foster
2016-10-10 13:38 ` [PATCH 9/9] xfs: remove xfs_bunmapi_cow Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2016-10-15 8:52 optimize the COW I/O path V2 Christoph Hellwig
2016-10-15 8:52 ` [PATCH 1/9] iomap: add IOMAP_REPORT Christoph Hellwig
2016-10-17 15:35 ` Brian Foster
2016-10-17 16:18 ` Darrick J. Wong
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=20161011014546.GF22379@birch.djwong.org \
--to=darrick.wong@oracle.com \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
/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).