All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
	ocfs2-devel@oss.oracle.com, Evgeniy Dushistov <dushistov@mail.ru>,
	linux-ntfs-dev@lists.sourceforge.net, Jan Kara <jack@suse.cz>
Subject: [PATCH 4/6] ext2: Use clean_bdev_aliases() instead of iteration
Date: Fri,  4 Nov 2016 18:08:14 +0100	[thread overview]
Message-ID: <1478279296-6575-5-git-send-email-jack@suse.cz> (raw)
In-Reply-To: <1478279296-6575-1-git-send-email-jack@suse.cz>

Use clean_bdev_aliases() instead of iterating through blocks one by one.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/ext2/inode.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index d831e24dc885..eb11f7e2b8aa 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -732,16 +732,13 @@ static int ext2_get_blocks(struct inode *inode,
 	}
 
 	if (IS_DAX(inode)) {
-		int i;
-
 		/*
 		 * We must unmap blocks before zeroing so that writeback cannot
 		 * overwrite zeros with stale data from block device page cache.
 		 */
-		for (i = 0; i < count; i++) {
-			unmap_underlying_metadata(inode->i_sb->s_bdev,
-					le32_to_cpu(chain[depth-1].key) + i);
-		}
+		clean_bdev_aliases(inode->i_sb->s_bdev,
+				   le32_to_cpu(chain[depth-1].key),
+				   count);
 		/*
 		 * block must be initialised before we put it in the tree
 		 * so that it's not found by another thread before it's
-- 
2.6.6


WARNING: multiple messages have this Message-ID (diff)
From: Jan Kara <jack@suse.cz>
To: Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
	ocfs2-devel@oss.oracle.com, Evgeniy Dushistov <dushistov@mail.ru>,
	linux-ntfs-dev@lists.sourceforge.net, Jan Kara <jack@suse.cz>
Subject: [PATCH 4/6] ext2: Use clean_bdev_aliases() instead of iteration
Date: Fri,  4 Nov 2016 18:08:14 +0100	[thread overview]
Message-ID: <1478279296-6575-5-git-send-email-jack@suse.cz> (raw)
In-Reply-To: <1478279296-6575-1-git-send-email-jack@suse.cz>

Use clean_bdev_aliases() instead of iterating through blocks one by one.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/ext2/inode.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index d831e24dc885..eb11f7e2b8aa 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -732,16 +732,13 @@ static int ext2_get_blocks(struct inode *inode,
 	}
 
 	if (IS_DAX(inode)) {
-		int i;

WARNING: multiple messages have this Message-ID (diff)
From: Jan Kara <jack@suse.cz>
To: Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
	ocfs2-devel@oss.oracle.com, Evgeniy Dushistov <dushistov@mail.ru>,
	linux-ntfs-dev@lists.sourceforge.net, Jan Kara <jack@suse.cz>
Subject: [Ocfs2-devel] [PATCH 4/6] ext2: Use clean_bdev_aliases() instead of iteration
Date: Fri,  4 Nov 2016 18:08:14 +0100	[thread overview]
Message-ID: <1478279296-6575-5-git-send-email-jack@suse.cz> (raw)
In-Reply-To: <1478279296-6575-1-git-send-email-jack@suse.cz>

Use clean_bdev_aliases() instead of iterating through blocks one by one.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/ext2/inode.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index d831e24dc885..eb11f7e2b8aa 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -732,16 +732,13 @@ static int ext2_get_blocks(struct inode *inode,
 	}
 
 	if (IS_DAX(inode)) {
-		int i;
-
 		/*
 		 * We must unmap blocks before zeroing so that writeback cannot
 		 * overwrite zeros with stale data from block device page cache.
 		 */
-		for (i = 0; i < count; i++) {
-			unmap_underlying_metadata(inode->i_sb->s_bdev,
-					le32_to_cpu(chain[depth-1].key) + i);
-		}
+		clean_bdev_aliases(inode->i_sb->s_bdev,
+				   le32_to_cpu(chain[depth-1].key),
+				   count);
 		/*
 		 * block must be initialised before we put it in the tree
 		 * so that it's not found by another thread before it's
-- 
2.6.6

  parent reply	other threads:[~2016-11-04 17:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04 17:08 [PATCH 0/6 v2] fs: Provide function to unmap metadata for a range of blocks Jan Kara
2016-11-04 17:08 ` [Ocfs2-devel] " Jan Kara
2016-11-04 17:08 ` [PATCH 1/6] " Jan Kara
2016-11-04 17:08   ` [Ocfs2-devel] " Jan Kara
2016-11-04 17:08 ` [PATCH 2/6] direct-io: Use clean_bdev_aliases() instead of handmade iteration Jan Kara
2016-11-04 17:08   ` [Ocfs2-devel] " Jan Kara
2016-11-04 17:08 ` [PATCH 3/6] ext4: Use clean_bdev_aliases() instead of iteration Jan Kara
2016-11-04 17:08   ` [Ocfs2-devel] " Jan Kara
2016-11-04 17:08   ` Jan Kara
2016-11-07  2:40   ` [lkp] [ext4] adad5aa544: fio.write_bw_MBps +4074.4% improvement kernel test robot
2016-11-07  2:40     ` kernel test robot
2016-11-04 17:08 ` Jan Kara [this message]
2016-11-04 17:08   ` [Ocfs2-devel] [PATCH 4/6] ext2: Use clean_bdev_aliases() instead of iteration Jan Kara
2016-11-04 17:08   ` Jan Kara
2016-11-04 17:08 ` [PATCH 5/6] fs: Add helper to clean bdev aliases under a bh and use it Jan Kara
2016-11-04 17:08   ` [Ocfs2-devel] " Jan Kara
2016-11-11  1:17   ` [fs] 85b4a9366d: [No primary change] fio.latency_10us% 124.5% increase kernel test robot
2016-11-04 17:08 ` [PATCH 6/6] fs: Remove unmap_underlying_metadata Jan Kara
2016-11-04 17:08   ` [Ocfs2-devel] " Jan Kara
2016-11-04 17:08   ` Jan Kara
2016-11-04 20:32 ` [PATCH 0/6 v2] fs: Provide function to unmap metadata for a range of blocks Jens Axboe

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=1478279296-6575-5-git-send-email-jack@suse.cz \
    --to=jack@suse.cz \
    --cc=axboe@kernel.dk \
    --cc=dushistov@mail.ru \
    --cc=hch@infradead.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-ntfs-dev@lists.sourceforge.net \
    --cc=ocfs2-devel@oss.oracle.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 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.