From patchwork Fri Jul 10 02:22:10 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve French X-Patchwork-Id: 29661 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.samba.org (mail.samba.org [66.70.73.150]) by bilbo.ozlabs.org (Postfix) with ESMTP id 19995B6F1F for ; Fri, 10 Jul 2009 12:22:44 +1000 (EST) Received: from dp.samba.org (localhost [127.0.0.1]) by lists.samba.org (Postfix) with ESMTP id 084CC163C58 for ; Fri, 10 Jul 2009 02:22:05 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on dp.samba.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=3.8 tests=AWL,BAYES_00, DNS_FROM_RFC_POST,SPF_PASS autolearn=no version=3.1.7 X-Original-To: linux-cifs-client@lists.samba.org Delivered-To: linux-cifs-client@lists.samba.org Received: from mail-gx0-f222.google.com (mail-gx0-f222.google.com [209.85.217.222]) by lists.samba.org (Postfix) with ESMTP id 2421A163AE1 for ; Fri, 10 Jul 2009 02:21:32 +0000 (GMT) Received: by gxk22 with SMTP id 22so1012046gxk.20 for ; Thu, 09 Jul 2009 19:22:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=4XRBTIxPH6ZuOFcPJxVoAtd62ZDmk1HNtwdoJBEs9zk=; b=CyXsioVzVpqOPhyZ4F/6lc3/kQw1RBhmshInbxUbmtlGOuinjktbDUc7RISl630USc i6iwuf1vp8Brfd6iadHwyb3zD4BF91lDsJ5b9Pj97B7h+UB0VADOb9Avli2r1OHe1QBk 2SaAbG6b4U56QrJ0xxZ7NawzdtcvK2nlaMb94= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=m+eTPkyrXj4wBWXrCDYMm8sBW8MSh9aeyzAZsS3+V2PTIZ0QE1elsIA92ll08ly9DR ftzqdo0FBuumLQcLVYA6mZBAm029OHcKP1q5SLV1E5k5kAoejUdIy34x4Hyarj7YAIpv oT9g0rPH1uxddrzA7y4tVHZyecsL8+nuR+2sA= MIME-Version: 1.0 Received: by 10.151.110.17 with SMTP id n17mr2236975ybm.212.1247192530710; Thu, 09 Jul 2009 19:22:10 -0700 (PDT) Date: Thu, 9 Jul 2009 21:22:10 -0500 Message-ID: <524f69650907091922jbefd100x80adf57bdf6f178f@mail.gmail.com> From: Steve French To: Jeff Layton , linux-cifs-client@lists.samba.org Subject: [linux-cifs-client] [PATCH] break out stats for posix open/mkdir X-BeenThere: linux-cifs-client@lists.samba.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: The Linux CIFS VFS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-cifs-client-bounces+incoming=patchwork.ozlabs.org@lists.samba.org Errors-To: linux-cifs-client-bounces+incoming=patchwork.ozlabs.org@lists.samba.org Trivial fix to break out the stats for posix open and mkdir from the other (mkdir) Acked-by: Jeff Layton diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index 7f19fef..3cf0609 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c @@ -261,6 +261,8 @@ static ssize_t cifs_stats_proc_write(struct file *file, atomic_set(&tcon->num_reads, 0); atomic_set(&tcon->num_oplock_brks, 0); atomic_set(&tcon->num_opens, 0); + atomic_set(&tcon->num_posixopens, 0); + atomic_set(&tcon->num_posixmkdirs, 0); atomic_set(&tcon->num_closes, 0); atomic_set(&tcon->num_deletes, 0); atomic_set(&tcon->num_mkdirs, 0); @@ -347,11 +349,15 @@ static int cifs_stats_proc_show(struct seq_file *m, void *v) atomic_read(&tcon->num_locks), atomic_read(&tcon->num_hardlinks), atomic_read(&tcon->num_symlinks)); - seq_printf(m, "\nOpens: %d Closes: %d" + seq_printf(m, "\nOpens: %d Closes: %d " "Deletes: %d", atomic_read(&tcon->num_opens), atomic_read(&tcon->num_closes), atomic_read(&tcon->num_deletes)); + seq_printf(m, "\nPosix Opens %d " + "Posix Mkdirs: %d", + atomic_read(&tcon->num_posixopens), + atomic_read(&tcon->num_posixmkdirs)); seq_printf(m, "\nMkdirs: %d Rmdirs: %d", atomic_read(&tcon->num_mkdirs), atomic_read(&tcon->num_rmdirs)); diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 63f6cdf..6084d63 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -260,6 +260,8 @@ struct cifsTconInfo { atomic_t num_closes; atomic_t num_deletes; atomic_t num_mkdirs; + atomic_t num_posixopens; + atomic_t num_posixmkdirs; atomic_t num_rmdirs; atomic_t num_renames; atomic_t num_t2renames; diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 922f5fe..1866bc2 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -1113,7 +1113,10 @@ PsxCreat: psx_create_err: cifs_buf_release(pSMB); - cifs_stats_inc(&tcon->num_mkdirs); + if (posix_flags & SMB_O_DIRECTORY) + cifs_stats_inc(&tcon->num_posixmkdirs); + else + cifs_stats_inc(&tcon->num_posixopens); if (rc == -EAGAIN) goto PsxCreat;