Re: [PATCH] ext4: add lazyinit stats support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 17, 2016 at 11:41:28AM +0800, Wang Shilong wrote:
> From: Wang Shilong <wshilong@xxxxxxx>
> 
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux