From patchwork Mon Feb 21 21:28:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konstantin Khlebnikov X-Patchwork-Id: 578501 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p1LLYa8x022729 for ; Mon, 21 Feb 2011 21:34:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751036Ab1BUVef (ORCPT ); Mon, 21 Feb 2011 16:34:35 -0500 Received: from mail-ew0-f42.google.com ([209.85.215.42]:59743 "EHLO mail-ew0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750965Ab1BUVee (ORCPT ); Mon, 21 Feb 2011 16:34:34 -0500 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 21 Feb 2011 21:34:36 +0000 (UTC) X-Greylist: delayed 349 seconds by postgrey-1.27 at vger.kernel.org; Mon, 21 Feb 2011 16:34:34 EST Received: by ewy1 with SMTP id 1so367909ewy.1 for ; Mon, 21 Feb 2011 13:34:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:subject:to:from:cc:date:message-id :in-reply-to:references:user-agent:mime-version:content-type :content-transfer-encoding; bh=rt2Q8Uc+lhYU2x/TRoKcbRKb8PfinwDl9ApVkqQKS8M=; b=Mwzkj6inZDBraToozP6hpLGLUsc9odSYqvT6FbV2k9xVDthfePS5zfRV6MDaBi5Tki d7CFI0g00+PZdWq1bkUIJZIe1q840sY0Wn6yauoK/oQ6L5h7hrxXqFyDiEiErFMrmpgq YxkTRz3v9h3bOrbqw+CpkJ6iL01ihM2NMI1sY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; b=jUBPGvpb5jL8fE2ZoaaQ5Mt8x06MlOgfL6hmFCke8odFMEJ9jznZAJEftAa/kPBMFz JyCXQMZqwcs5MJH7Q11TTzh8f2bvh6/dCYEMzsy18El1vwX8D6gLB+KvW4JE4KdX7+7A IWPf5i4buOaTRTP7Crn8sddK2xCsMFdX+LprQ= Received: by 10.14.37.7 with SMTP id x7mr2052234eea.48.1298323723426; Mon, 21 Feb 2011 13:28:43 -0800 (PST) Received: from localhost (koct9i.static.corbina.ru [95.31.9.146]) by mx.google.com with ESMTPS id b52sm5289495eei.7.2011.02.21.13.28.40 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 21 Feb 2011 13:28:42 -0800 (PST) Subject: [PATCH v2] NFS: account direct-io into task io accounting To: linux-nfs@vger.kernel.org From: Konstantin Khlebnikov Cc: Chuck Lever , Trond Myklebust , linux-kernel@vger.kernel.org Date: Tue, 22 Feb 2011 00:28:34 +0300 Message-ID: <20110221212834.2442.65228.stgit@localhost6> In-Reply-To: <20110221191546.5920.96947.stgit@localhost6> References: <20110221191546.5920.96947.stgit@localhost6> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 9943a75..bd2cb5d 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -938,6 +939,8 @@ ssize_t nfs_file_direct_read(struct kiocb *iocb, const struct iovec *iov, if (retval) goto out; + task_io_account_read(count); + retval = nfs_direct_read(iocb, iov, nr_segs, pos); if (retval > 0) iocb->ki_pos = pos + retval; @@ -999,6 +1002,8 @@ ssize_t nfs_file_direct_write(struct kiocb *iocb, const struct iovec *iov, if (retval) goto out; + task_io_account_write(count); + retval = nfs_direct_write(iocb, iov, nr_segs, pos, count); if (retval > 0)