mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
To: Vivek Trivedi <vtrivedi018@gmail.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Namjae Jeon <linkinjeon@gmail.com>
Subject: Re: [PATCH 1/1] NFS: fix sb->s_id in nfs debug prints
Date: Fri, 16 Mar 2012 00:59:10 +0000	[thread overview]
Message-ID: <1331859549.25523.5.camel@lade.trondhjem.org> (raw)
In-Reply-To: <1331836132-2053-1-git-send-email-vtrivedi018@gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1656 bytes --]

On Thu, 2012-03-15 at 23:58 +0530, Vivek Trivedi wrote:
> NFS bdi flush thread in ps output is printed like "flush-<major number
> in decimal>:<minor number in decimal>"
> For example:
> $ ps aux | grep flush
>  2079 root         0 SW   [flush-0:18]
>                                  ^^^^
> 
> nfs_bdi_register()
> ==> bdi_register_dev()
> ==> bdi_register(bdi, NULL, "%u:%u", MAJOR(dev), MINOR(dev));
>                              ^^^^^
> 
> However, NFS sb->s_id store major:minor number in hex:
> 
> nfs_initialise_sb()
> ==>         snprintf(sb->s_id, sizeof(sb->s_id),
>                  "%x:%x", MAJOR(sb->s_dev), MINOR(sb->s_dev));
>                   ^^^^^
> 
> If we enable nfs debug prints using command:
> $ rpcdebug -m nfs -s all
> 
> write to a file:
> $ dd if=/dev/zero of=<NFS Mount>/testfile.txt bs=32768 count=1
> 
> Without Patch:
> [ 2431.032000] NFS:     0 initiated write call (req 0:12/40, 32768 bytes
> @ offset 0)                                         ^^^^
> 
> With Patch:
> [ 2431.032000] NFS:     0 initiated write call (req 0:18/40, 32768 bytes
> @ offset 0)                                         ^^^^
> 
> We should store NFS "s->s_id" in decimal to avoid confusion between NFS
> flush thread name(in ps output) and NFS debug prints.

Why do we care? The s_id is entirely filesystem-specific so it shouldn't
be compared to the properties of VFS objects anyway.

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

  reply	other threads:[~2012-03-16  0:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-15 18:28 Vivek Trivedi
2012-03-16  0:59 ` Myklebust, Trond [this message]
2012-03-16  7:46   ` Vivek Trivedi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1331859549.25523.5.camel@lade.trondhjem.org \
    --to=trond.myklebust@netapp.com \
    --cc=linkinjeon@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=vtrivedi018@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®