lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 16 Mar 2012 00:59:10 +0000
From:	"Myklebust, Trond" <Trond.Myklebust@...app.com>
To:	Vivek Trivedi <vtrivedi018@...il.com>
CC:	"linux-nfs@...r.kernel.org" <linux-nfs@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Namjae Jeon <linkinjeon@...il.com>
Subject: Re: [PATCH 1/1] NFS: fix sb->s_id in nfs debug prints

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@...app.com
www.netapp.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ