xfs
[Top] [All Lists]

Re: [PATCH 09/15] fs: iomap based fiemap implementation

To: Bob Peterson <rpeterso@xxxxxxxxxx>
Subject: Re: [PATCH 09/15] fs: iomap based fiemap implementation
From: Christoph Hellwig <hch@xxxxxx>
Date: Tue, 24 May 2016 15:10:58 +0200
Cc: Christoph Hellwig <hch@xxxxxx>, xfs@xxxxxxxxxxx, vishal l verma <vishal.l.verma@xxxxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1651455378.10041082.1464034166002.JavaMail.zimbra@xxxxxxxxxx>
References: <1462783638-4968-1-git-send-email-hch@xxxxxx> <1462783638-4968-10-git-send-email-hch@xxxxxx> <1651455378.10041082.1464034166002.JavaMail.zimbra@xxxxxxxxxx>
User-agent: Mutt/1.5.17 (2007-11-01)
On Mon, May 23, 2016 at 04:09:26PM -0400, Bob Peterson wrote:
> I've been looking at this again. Where are the calls to the fs-specific bits
> for fiemap?

In the iomap_ops structure passed to iomap_fiemap.

> It looks like iomap_fiemap calls iomap_apply, which calls
> iomap_fiemap_actor, but that doesn't call any ops->iomap_get_iomap or similar.
> It calls the iomap_begin (which BTW has a comment that says "Execute a iomap
> write" which is probably wrong and should be more generic, as for cases like
> fiemap) and it calls iomap_end. But it never calls an fs-specific actor
> anywhere. Am I missing something? My earlier version passed in the actor
> function, as per Dave Chinner's request, but yours doesn't.

The iomap_begin callback is where you do the mapping.  the iomap_end
callback does any required cleanup, which in case of GFS2 probably
would be dropping the cluster lock protecting the mapping.

<Prev in Thread] Current Thread [Next in Thread>