All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Wang Shilong <wangshilong1991@gmail.com>
Cc: linux-ext4@vger.kernel.org, adilger@dilger.ca, sihara@ddn.com
Subject: Re: [PATCH] ext4: add lazyinit stats support
Date: Tue, 17 May 2016 00:05:39 -0400	[thread overview]
Message-ID: <20160517040539.GV7799@thunk.org> (raw)
In-Reply-To: <1463456488-93466-1-git-send-email-wangshilong1991@gmail.com>

On Tue, May 17, 2016 at 11:41:28AM +0800, Wang Shilong wrote:
> From: Wang Shilong <wshilong@ddn.com>
> 
> Somtimes, we need figure out progress of Lazyinit
> in the background, this patch try to add stats support
> for it, output is something like:
> 
> $ cat /sys/fs/ext4/vda/lazyinit_stats
> groups_finished: 80
> groups_total: 80

That's more of a procfs style of output.  In general the sysfs idiom
would be to have two sysfs variables:

/sys/fs/ext4/vda/nr_block_groups
/sys/fs/ext4/vda/nr_lazyinit_bg_done

and each would return an integer value.

For example:

% cat /sys/block/sda/queue/discard_granularity
512
% cat /sys/block/sda/queue/discard_max_bytes
2147450880
% cat /sys/block/sda/queue/discard_zeroes_data
0

There are certainly some exceptions to this rule, but it certainly
simplifies the sysfs support code, as well as making it a bit easier
for userspace programs to parse the output from those files.

    	      	       	  	    - Ted

      parent reply	other threads:[~2016-05-17  4:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-17  3:41 [PATCH] ext4: add lazyinit stats support Wang Shilong
2016-05-17  3:59 ` Eric Sandeen
2016-05-17  4:14   ` Wang Shilong
2016-05-17  4:22     ` Eric Sandeen
2016-05-17  4:45       ` Theodore Ts'o
2016-05-17  5:36         ` Shuichi Ihara
2016-05-17  6:13           ` Theodore Ts'o
2016-05-17  4:05 ` Theodore Ts'o [this message]

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=20160517040539.GV7799@thunk.org \
    --to=tytso@mit.edu \
    --cc=adilger@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sihara@ddn.com \
    --cc=wangshilong1991@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.