Count per BDI unstable pages. Signed-off-by: Peter Zijlstra --- fs/nfs/write.c | 4 ++++ include/linux/backing-dev.h | 1 + 2 files changed, 5 insertions(+) Index: linux-2.6-mm/fs/nfs/write.c =================================================================== --- linux-2.6-mm.orig/fs/nfs/write.c +++ linux-2.6-mm/fs/nfs/write.c @@ -449,6 +449,7 @@ nfs_mark_request_commit(struct nfs_page nfsi->ncommit++; spin_unlock(&nfsi->req_lock); inc_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); + inc_bdi_stat(req->wb_page->mapping->backing_dev_info, BDI_UNSTABLE); __mark_inode_dirty(inode, I_DIRTY_DATASYNC); } #endif @@ -509,6 +510,7 @@ static void nfs_cancel_commit_list(struc while(!list_empty(head)) { req = nfs_list_entry(head->next); dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); + dec_bdi_stat(req->wb_page->mapping->backing_dev_info, BDI_UNSTABLE); nfs_list_remove_request(req); nfs_inode_remove_request(req); nfs_unlock_request(req); @@ -1234,6 +1236,7 @@ nfs_commit_list(struct inode *inode, str nfs_list_remove_request(req); nfs_mark_request_commit(req); dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); + dec_bdi_stat(req->wb_page->mapping->backing_dev_info, BDI_UNSTABLE); nfs_clear_page_writeback(req); } return -ENOMEM; @@ -1258,6 +1261,7 @@ static void nfs_commit_done(struct rpc_t req = nfs_list_entry(data->pages.next); nfs_list_remove_request(req); dec_zone_page_state(req->wb_page, NR_UNSTABLE_NFS); + dec_bdi_stat(req->wb_page->mapping->backing_dev_info, BDI_UNSTABLE); dprintk("NFS: commit (%s/%Ld %d@%Ld)", req->wb_context->dentry->d_inode->i_sb->s_id, Index: linux-2.6-mm/include/linux/backing-dev.h =================================================================== --- linux-2.6-mm.orig/include/linux/backing-dev.h +++ linux-2.6-mm/include/linux/backing-dev.h @@ -28,6 +28,7 @@ typedef int (congested_fn)(void *, int); enum bdi_stat_item { BDI_DIRTY, BDI_WRITEBACK, + BDI_UNSTABLE, NR_BDI_STAT_ITEMS }; -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/