All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Andreas Gruenbacher <agruenba@redhat.com>, linux-xfs@vger.kernel.org
Cc: Dan Williams <dan.j.williams@intel.com>,
	linux-fsdevel@vger.kernel.org, cluster-devel@redhat.com,
	linux-ext4@vger.kernel.org
Subject: [PATCH 6/6] iomap: add a page_done callback
Date: Thu, 14 Jun 2018 14:04:57 +0200	[thread overview]
Message-ID: <20180614120457.28285-7-hch@lst.de> (raw)
In-Reply-To: <20180614120457.28285-1-hch@lst.de>

This will be used by gfs2 to attach data to transactions for the journaled
data mode.  But the concept is generic enough that we might be able to
use it for other purposes like encryption/integrity post-processing in the
future.

Based on a patch from Andreas Gruenbacher.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/iomap.c            | 3 +++
 include/linux/iomap.h | 9 +++++++++
 2 files changed, 12 insertions(+)

diff --git a/fs/iomap.c b/fs/iomap.c
index 6d5a2ebe5dd8..9e265118e8b0 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -201,6 +201,9 @@ iomap_write_end(struct inode *inode, loff_t pos, unsigned len,
 				copied, page, NULL);
 	}
 
+	if (iomap->page_done)
+		iomap->page_done(inode, pos, copied, page, iomap);
+
 	if (ret < len)
 		iomap_write_failed(inode, pos, len);
 	return ret;
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 69ef622f650e..43cc9208599f 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -9,6 +9,7 @@ struct fiemap_extent_info;
 struct inode;
 struct iov_iter;
 struct kiocb;
+struct page;
 struct vm_area_struct;
 struct vm_fault;
 
@@ -58,6 +59,14 @@ struct iomap {
 		struct dax_device   *dax_dev;
 		void		    *inline_data;
 	};
+
+	/*
+	 * Called when finished processing a page in the mapping returned in
+	 * this iomap.  At least for now this is only supported in the buffered
+	 * write path.
+	 */
+	void (*page_done)(struct inode *inode, loff_t pos, unsigned copied,
+			struct page *page, struct iomap *iomap);
 };
 
 /*
-- 
2.17.1

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Andreas Gruenbacher <agruenba@redhat.com>, linux-xfs@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org, cluster-devel@redhat.com,
	Dan Williams <dan.j.williams@intel.com>,
	linux-ext4@vger.kernel.org
Subject: [PATCH 6/6] iomap: add a page_done callback
Date: Thu, 14 Jun 2018 14:04:57 +0200	[thread overview]
Message-ID: <20180614120457.28285-7-hch@lst.de> (raw)
In-Reply-To: <20180614120457.28285-1-hch@lst.de>

This will be used by gfs2 to attach data to transactions for the journaled
data mode.  But the concept is generic enough that we might be able to
use it for other purposes like encryption/integrity post-processing in the
future.

Based on a patch from Andreas Gruenbacher.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/iomap.c            | 3 +++
 include/linux/iomap.h | 9 +++++++++
 2 files changed, 12 insertions(+)

diff --git a/fs/iomap.c b/fs/iomap.c
index 6d5a2ebe5dd8..9e265118e8b0 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -201,6 +201,9 @@ iomap_write_end(struct inode *inode, loff_t pos, unsigned len,
 				copied, page, NULL);
 	}
 
+	if (iomap->page_done)
+		iomap->page_done(inode, pos, copied, page, iomap);
+
 	if (ret < len)
 		iomap_write_failed(inode, pos, len);
 	return ret;
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 69ef622f650e..43cc9208599f 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -9,6 +9,7 @@ struct fiemap_extent_info;
 struct inode;
 struct iov_iter;
 struct kiocb;
+struct page;
 struct vm_area_struct;
 struct vm_fault;
 
@@ -58,6 +59,14 @@ struct iomap {
 		struct dax_device   *dax_dev;
 		void		    *inline_data;
 	};
+
+	/*
+	 * Called when finished processing a page in the mapping returned in
+	 * this iomap.  At least for now this is only supported in the buffered
+	 * write path.
+	 */
+	void (*page_done)(struct inode *inode, loff_t pos, unsigned copied,
+			struct page *page, struct iomap *iomap);
 };
 
 /*
-- 
2.17.1

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 6/6] iomap: add a page_done callback
Date: Thu, 14 Jun 2018 14:04:57 +0200	[thread overview]
Message-ID: <20180614120457.28285-7-hch@lst.de> (raw)
In-Reply-To: <20180614120457.28285-1-hch@lst.de>

This will be used by gfs2 to attach data to transactions for the journaled
data mode.  But the concept is generic enough that we might be able to
use it for other purposes like encryption/integrity post-processing in the
future.

Based on a patch from Andreas Gruenbacher.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/iomap.c            | 3 +++
 include/linux/iomap.h | 9 +++++++++
 2 files changed, 12 insertions(+)

diff --git a/fs/iomap.c b/fs/iomap.c
index 6d5a2ebe5dd8..9e265118e8b0 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -201,6 +201,9 @@ iomap_write_end(struct inode *inode, loff_t pos, unsigned len,
 				copied, page, NULL);
 	}
 
+	if (iomap->page_done)
+		iomap->page_done(inode, pos, copied, page, iomap);
+
 	if (ret < len)
 		iomap_write_failed(inode, pos, len);
 	return ret;
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 69ef622f650e..43cc9208599f 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -9,6 +9,7 @@ struct fiemap_extent_info;
 struct inode;
 struct iov_iter;
 struct kiocb;
+struct page;
 struct vm_area_struct;
 struct vm_fault;
 
@@ -58,6 +59,14 @@ struct iomap {
 		struct dax_device   *dax_dev;
 		void		    *inline_data;
 	};
+
+	/*
+	 * Called when finished processing a page in the mapping returned in
+	 * this iomap.  At least for now this is only supported in the buffered
+	 * write path.
+	 */
+	void (*page_done)(struct inode *inode, loff_t pos, unsigned copied,
+			struct page *page, struct iomap *iomap);
 };
 
 /*
-- 
2.17.1



  parent reply	other threads:[~2018-06-14 12:05 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-14 12:04 iomap preparations for GFS2 v2 Christoph Hellwig
2018-06-14 12:04 ` [Cluster-devel] " Christoph Hellwig
2018-06-14 12:04 ` Christoph Hellwig
2018-06-14 12:04 ` [PATCH 1/6] fs: factor out a __generic_write_end helper Christoph Hellwig
2018-06-14 12:04   ` [Cluster-devel] " Christoph Hellwig
2018-06-14 12:04   ` Christoph Hellwig
2018-06-14 12:04 ` [PATCH 2/6] iomap: move bdev and dax_dev in a union Christoph Hellwig
2018-06-14 12:04   ` [Cluster-devel] " Christoph Hellwig
2018-06-14 12:04   ` Christoph Hellwig
2018-06-19  6:25   ` Darrick J. Wong
2018-06-19  6:25     ` [Cluster-devel] " Darrick J. Wong
2018-06-19  6:25     ` Darrick J. Wong
2018-06-19  6:44     ` Christoph Hellwig
2018-06-19  6:44       ` [Cluster-devel] " Christoph Hellwig
2018-06-19  6:44       ` Christoph Hellwig
2018-06-19  6:50       ` Darrick J. Wong
2018-06-19  6:50         ` [Cluster-devel] " Darrick J. Wong
2018-06-19  6:50         ` Darrick J. Wong
2018-06-14 12:04 ` [PATCH 3/6] iomap: mark newly allocated buffer heads as new Christoph Hellwig
2018-06-14 12:04   ` [Cluster-devel] " Christoph Hellwig
2018-06-14 12:04   ` Christoph Hellwig
2018-06-14 12:04 ` [PATCH 4/6] iomap: complete partial direct I/O writes synchronously Christoph Hellwig
2018-06-14 12:04   ` [Cluster-devel] " Christoph Hellwig
2018-06-14 12:04   ` Christoph Hellwig
2018-06-14 12:04 ` [PATCH 5/6] iomap: generic inline data handling Christoph Hellwig
2018-06-14 12:04   ` [Cluster-devel] " Christoph Hellwig
2018-06-14 12:04   ` Christoph Hellwig
2018-06-14 12:04 ` Christoph Hellwig [this message]
2018-06-14 12:04   ` [Cluster-devel] [PATCH 6/6] iomap: add a page_done callback Christoph Hellwig
2018-06-14 12:04   ` Christoph Hellwig
2018-06-14 13:04 ` iomap preparations for GFS2 v2 Andreas Gruenbacher
2018-06-14 13:04   ` [Cluster-devel] " Andreas Gruenbacher
2018-06-14 13:04   ` Andreas Gruenbacher
2018-06-15  8:03   ` Christoph Hellwig
2018-06-15  8:03     ` [Cluster-devel] " Christoph Hellwig
2018-06-15  8:03     ` Christoph Hellwig
2018-06-15  8:31     ` [Cluster-devel] " Steven Whitehouse
2018-06-15  8:31       ` Steven Whitehouse
2018-06-15  8:31       ` Steven Whitehouse
2018-06-19 11:08       ` [Cluster-devel] " Andreas Gruenbacher
2018-06-19 11:08         ` Andreas Gruenbacher
2018-06-19 11:08         ` Andreas Gruenbacher
2018-06-19 14:35         ` [Cluster-devel] " Christoph Hellwig
2018-06-19 14:35           ` Christoph Hellwig
2018-06-19 14:35           ` Christoph Hellwig
2018-06-19 15:14           ` [Cluster-devel] " Andreas Gruenbacher
2018-06-19 15:14             ` Andreas Gruenbacher
2018-06-19 15:14             ` Andreas Gruenbacher
  -- strict thread matches above, loose matches on Subject: below --
2018-06-06 10:40 iomap preparations for GFS2 Christoph Hellwig
2018-06-06 10:40 ` [PATCH 6/6] iomap: add a page_done callback Christoph Hellwig
2018-06-06 10:40   ` Christoph Hellwig
2018-06-06 11:37   ` Andreas Gruenbacher
2018-06-06 11:37     ` Andreas Gruenbacher

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=20180614120457.28285-7-hch@lst.de \
    --to=hch@lst.de \
    --cc=agruenba@redhat.com \
    --cc=cluster-devel@redhat.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.