public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roesch <shr@fb.com>
To: Nikolay Borisov <nborisov@suse.com>,
	<linux-btrfs@vger.kernel.org>, <kernel-team@fb.com>
Subject: Re: [PATCH v4 3/4] btrfs: add force_chunk_alloc sysfs entry to force allocation
Date: Mon, 8 Nov 2021 17:09:03 -0800	[thread overview]
Message-ID: <e7e91cd0-cb37-3aed-9134-0c82d3521ef1@fb.com> (raw)
In-Reply-To: <3b746e80-9799-3631-96d3-b95081d68fc3@suse.com>



On 11/5/21 3:04 AM, Nikolay Borisov wrote:
> 
> 
> On 29.10.21 г. 21:39, Stefan Roesch wrote:
>> This adds the force_chunk_alloc sysfs entry to be able to force a
>> storage allocation. This is a debugging and test feature and is
>> enabled with the CONFIG_BTRFS_DEBUG configuration option.
>>
>> It is stored at
>> /sys/fs/btrfs/<uuid>/allocation/<block_type>/force_chunk_alloc.
>> ---
>>  fs/btrfs/sysfs.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 65 insertions(+)
>>
>> diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
>> index 3b0bcbc2ed2e..983c53b76aa6 100644
>> --- a/fs/btrfs/sysfs.c
>> +++ b/fs/btrfs/sysfs.c
>> @@ -771,6 +771,64 @@ static ssize_t btrfs_chunk_size_store(struct kobject *kobj,
>>  	return val;
>>  }
>>  
>> +#ifdef CONFIG_BTRFS_DEBUG
>> +/*
>> + * Return if space info force allocation chunk flag is set.
> 
> nit: Well this is a dummy function which simply returns 0. I guess what
> makes sense is to simply make the show op a NULL, i wonder if sysfs can
> handle this gracefully though.
> 
> <snip>
>

This is possible however I need to also change the file mask, so the user can
only write to the file. I'll make the change.
 

  reply	other threads:[~2021-11-09  1:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 18:39 [PATCH v4 0/4] btrfs: sysfs: set / query btrfs chunk size Stefan Roesch
2021-10-29 18:39 ` [PATCH v4 1/4] btrfs: store chunk size in space-info struct Stefan Roesch
2021-11-05  8:52   ` Nikolay Borisov
2021-11-09 19:44     ` Stefan Roesch
2021-10-29 18:39 ` [PATCH v4 2/4] btrfs: expose chunk size in sysfs Stefan Roesch
2021-11-05  9:27   ` Nikolay Borisov
2021-11-09  1:57     ` Stefan Roesch
2021-11-09  6:36       ` Nikolay Borisov
2021-10-29 18:39 ` [PATCH v4 3/4] btrfs: add force_chunk_alloc sysfs entry to force allocation Stefan Roesch
2021-11-05 10:04   ` Nikolay Borisov
2021-11-09  1:09     ` Stefan Roesch [this message]
2021-10-29 18:39 ` [PATCH v4 4/4] btrfs: increase metadata alloc size to 5GB for volumes > 50GB Stefan Roesch
2021-11-05 10:11   ` Nikolay Borisov
2021-11-09 21:19     ` Stefan Roesch
2021-11-02 16:15 ` [PATCH v4 0/4] btrfs: sysfs: set / query btrfs chunk size Josef Bacik

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=e7e91cd0-cb37-3aed-9134-0c82d3521ef1@fb.com \
    --to=shr@fb.com \
    --cc=kernel-team@fb.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@suse.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