* Patch "Revert "nfs: replace nfs_add_stats with nfs_inc_stats when add one"" has been added to the 4.0-stable tree
@ 2015-05-02 17:59 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-05-02 17:59 UTC (permalink / raw)
To: nicolas.iooss_linux, gregkh, trond.myklebust; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
Revert "nfs: replace nfs_add_stats with nfs_inc_stats when add one"
to the 4.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
revert-nfs-replace-nfs_add_stats-with-nfs_inc_stats-when-add-one.patch
and it can be found in the queue-4.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 3708f842e107b9b79d54a75d152e666b693649e8 Mon Sep 17 00:00:00 2001
From: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Date: Thu, 16 Apr 2015 18:48:39 +0800
Subject: Revert "nfs: replace nfs_add_stats with nfs_inc_stats when add one"
From: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
commit 3708f842e107b9b79d54a75d152e666b693649e8 upstream.
This reverts commit 5a254d08b086d80cbead2ebcee6d2a4b3a15587a.
Since commit 5a254d08b086 ("nfs: replace nfs_add_stats with
nfs_inc_stats when add one"), nfs_readpage and nfs_do_writepage use
nfs_inc_stats to increment NFSIOS_READPAGES and NFSIOS_WRITEPAGES
instead of nfs_add_stats.
However nfs_inc_stats does not do the same thing as nfs_add_stats with
value 1 because these functions work on distinct stats:
nfs_inc_stats increments stats from "enum nfs_stat_eventcounters" (in
server->io_stats->events) and nfs_add_stats those from "enum
nfs_stat_bytecounters" (in server->io_stats->bytes).
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Fixes: 5a254d08b086 ("nfs: replace nfs_add_stats with nfs_inc_stats...")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/nfs/read.c | 2 +-
fs/nfs/write.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -284,7 +284,7 @@ int nfs_readpage(struct file *file, stru
dprintk("NFS: nfs_readpage (%p %ld@%lu)\n",
page, PAGE_CACHE_SIZE, page_file_index(page));
nfs_inc_stats(inode, NFSIOS_VFSREADPAGE);
- nfs_inc_stats(inode, NFSIOS_READPAGES);
+ nfs_add_stats(inode, NFSIOS_READPAGES, 1);
/*
* Try to flush any pending writes to the file..
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -580,7 +580,7 @@ static int nfs_do_writepage(struct page
int ret;
nfs_inc_stats(inode, NFSIOS_VFSWRITEPAGE);
- nfs_inc_stats(inode, NFSIOS_WRITEPAGES);
+ nfs_add_stats(inode, NFSIOS_WRITEPAGES, 1);
nfs_pageio_cond_complete(pgio, page_file_index(page));
ret = nfs_page_async_flush(pgio, page, wbc->sync_mode == WB_SYNC_NONE);
Patches currently in stable-queue which might be from nicolas.iooss_linux@m4x.org are
queue-4.0/revert-nfs-replace-nfs_add_stats-with-nfs_inc_stats-when-add-one.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-05-02 18:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-02 17:59 Patch "Revert "nfs: replace nfs_add_stats with nfs_inc_stats when add one"" has been added to the 4.0-stable tree gregkh
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).