Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1425429AbWLHLzN (ORCPT ); Fri, 8 Dec 2006 06:55:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1425430AbWLHLxP (ORCPT ); Fri, 8 Dec 2006 06:53:15 -0500 Received: from smtp.osdl.org ([65.172.181.25]:52385 "EHLO smtp.osdl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425429AbWLHLwz (ORCPT ); Fri, 8 Dec 2006 06:52:55 -0500 Message-Id: <200612081152.kB8BqUNp019771@shell0.pdx.osdl.net> Subject: [patch 08/13] io-accounting: direct-io To: linux-kernel@vger.kernel.org Cc: akpm@osdl.org, balbir@in.ibm.com, csturtiv@sgi.com, daw@sgi.com, guillaume.thouvenin@bull.net, jlan@sgi.com, nagar@watson.ibm.com, tee@sgi.com From: akpm@osdl.org Date: Fri, 08 Dec 2006 03:52:30 -0800 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org From: Andrew Morton Account for direct-io. Cc: Jay Lan Cc: Shailabh Nagar Cc: Balbir Singh Cc: Chris Sturtivant Cc: Tony Ernst Cc: Guillaume Thouvenin Cc: David Wright Signed-off-by: Andrew Morton --- fs/direct-io.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff -puN fs/direct-io.c~io-accounting-direct-io fs/direct-io.c --- a/fs/direct-io.c~io-accounting-direct-io +++ a/fs/direct-io.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -675,6 +676,13 @@ submit_page_section(struct dio *dio, str { int ret = 0; + if (dio->rw & WRITE) { + /* + * Read accounting is performed in submit_bio() + */ + task_io_account_write(len); + } + /* * Can we just grow the current page's presence in the dio? */ _