linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: David Sterba <dsterba@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: create example debugfs file only in debugging build
Date: Thu, 1 Sep 2016 09:33:18 -0500	[thread overview]
Message-ID: <7384afe4-fc2c-d11b-e625-e80a12f7cf52@redhat.com> (raw)
In-Reply-To: <1472733872-32549-1-git-send-email-dsterba@suse.com>

On 9/1/16 7:44 AM, David Sterba wrote:
> Signed-off-by: David Sterba <dsterba@suse.com>

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  fs/btrfs/sysfs.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
> index 804bd1c42e47..31f09564e170 100644
> --- a/fs/btrfs/sysfs.c
> +++ b/fs/btrfs/sysfs.c
> @@ -836,9 +836,18 @@ static int btrfs_init_debugfs(void)
>  	if (!btrfs_debugfs_root_dentry)
>  		return -ENOMEM;
>  
> +	/*
> +	 * Example code, how export data through debugfs.
> +	 *
> +	 * file:        /sys/kernel/debug/btrfs/test
> +	 * contents of: btrfs_debugfs_test
> +	 */
> +#ifdef CONFIG_BTRFS_DEBUG
>  	debugfs_create_u64("test", S_IRUGO | S_IWUSR, btrfs_debugfs_root_dentry,
>  			&btrfs_debugfs_test);
>  #endif
> +
> +#endif
>  	return 0;
>  }
>  
> 


      reply	other threads:[~2016-09-01 14:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01 12:44 [PATCH] btrfs: create example debugfs file only in debugging build David Sterba
2016-09-01 14:33 ` Eric Sandeen [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=7384afe4-fc2c-d11b-e625-e80a12f7cf52@redhat.com \
    --to=sandeen@redhat.com \
    --cc=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).