* + fs-block_dev-always-invalidate-cleancache-in-invalidate_bdev.patch added to -mm tree
@ 2017-04-25 20:56 ` akpm
0 siblings, 0 replies; 2+ messages in thread
From: akpm @ 2017-04-25 20:56 UTC (permalink / raw)
To: aryabinin, axboe, hannes, hch, jack, konrad.wilk, kuznet,
n.borisov.lkml, ross.zwisler, stable, viro, mm-commits
The patch titled
Subject: fs/block_dev: always invalidate cleancache in invalidate_bdev()
has been added to the -mm tree. Its filename is
fs-block_dev-always-invalidate-cleancache-in-invalidate_bdev.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/fs-block_dev-always-invalidate-cleancache-in-invalidate_bdev.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/fs-block_dev-always-invalidate-cleancache-in-invalidate_bdev.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Andrey Ryabinin <aryabinin@virtuozzo.com>
Subject: fs/block_dev: always invalidate cleancache in invalidate_bdev()
invalidate_bdev() calls cleancache_invalidate_inode() iff ->nrpages != 0
which doen't make any sense.
Make sure that invalidate_bdev() always calls cleancache_invalidate_inode()
regardless of mapping->nrpages value.
Fixes: c515e1fd361c ("mm/fs: add hooks to support cleancache")
Link: http://lkml.kernel.org/r/20170424164135.22350-3-aryabinin@virtuozzo.com
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Alexey Kuznetsov <kuznet@virtuozzo.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Nikolay Borisov <n.borisov.lkml@gmail.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/block_dev.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff -puN fs/block_dev.c~fs-block_dev-always-invalidate-cleancache-in-invalidate_bdev fs/block_dev.c
--- a/fs/block_dev.c~fs-block_dev-always-invalidate-cleancache-in-invalidate_bdev
+++ a/fs/block_dev.c
@@ -103,12 +103,11 @@ void invalidate_bdev(struct block_device
{
struct address_space *mapping = bdev->bd_inode->i_mapping;
- if (mapping->nrpages == 0)
- return;
^ permalink raw reply [flat|nested] 2+ messages in thread
* + fs-block_dev-always-invalidate-cleancache-in-invalidate_bdev.patch added to -mm tree
@ 2017-04-25 20:56 ` akpm
0 siblings, 0 replies; 2+ messages in thread
From: akpm @ 2017-04-25 20:56 UTC (permalink / raw)
To: aryabinin, axboe, hannes, hch, jack, konrad.wilk, kuznet,
n.borisov.lkml, ross.zwisler, stable, viro, mm-commits
The patch titled
Subject: fs/block_dev: always invalidate cleancache in invalidate_bdev()
has been added to the -mm tree. Its filename is
fs-block_dev-always-invalidate-cleancache-in-invalidate_bdev.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/fs-block_dev-always-invalidate-cleancache-in-invalidate_bdev.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/fs-block_dev-always-invalidate-cleancache-in-invalidate_bdev.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Andrey Ryabinin <aryabinin@virtuozzo.com>
Subject: fs/block_dev: always invalidate cleancache in invalidate_bdev()
invalidate_bdev() calls cleancache_invalidate_inode() iff ->nrpages != 0
which doen't make any sense.
Make sure that invalidate_bdev() always calls cleancache_invalidate_inode()
regardless of mapping->nrpages value.
Fixes: c515e1fd361c ("mm/fs: add hooks to support cleancache")
Link: http://lkml.kernel.org/r/20170424164135.22350-3-aryabinin@virtuozzo.com
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Alexey Kuznetsov <kuznet@virtuozzo.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Nikolay Borisov <n.borisov.lkml@gmail.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/block_dev.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff -puN fs/block_dev.c~fs-block_dev-always-invalidate-cleancache-in-invalidate_bdev fs/block_dev.c
--- a/fs/block_dev.c~fs-block_dev-always-invalidate-cleancache-in-invalidate_bdev
+++ a/fs/block_dev.c
@@ -103,12 +103,11 @@ void invalidate_bdev(struct block_device
{
struct address_space *mapping = bdev->bd_inode->i_mapping;
- if (mapping->nrpages == 0)
- return;
-
- invalidate_bh_lrus();
- lru_add_drain_all(); /* make sure all lru add caches are flushed */
- invalidate_mapping_pages(mapping, 0, -1);
+ if (mapping->nrpages) {
+ invalidate_bh_lrus();
+ lru_add_drain_all(); /* make sure all lru add caches are flushed */
+ invalidate_mapping_pages(mapping, 0, -1);
+ }
/* 99% of the time, we don't need to flush the cleancache on the bdev.
* But, for the strange corners, lets be cautious
*/
_
Patches currently in -mm which might be from aryabinin@virtuozzo.com are
fs-fix-data-invalidation-in-the-cleancache-during-direct-io.patch
fs-block_dev-always-invalidate-cleancache-in-invalidate_bdev.patch
mm-truncate-bail-out-early-from-invalidate_inode_pages2_range-if-mapping-is-empty.patch
mm-truncate-avoid-pointless-cleancache_invalidate_inode-calls.patch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-25 20:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-25 20:56 + fs-block_dev-always-invalidate-cleancache-in-invalidate_bdev.patch added to -mm tree akpm
2017-04-25 20:56 ` akpm
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.