Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@libero.it>
To: Josef Bacik <josef@toxicpanda.com>, linux-btrfs@vger.kernel.org
Cc: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>,
	Goffredo Baroncelli <kreijack@inwind.it>
Subject: Re: [PATCH 1/5] btrfs: add ioctl BTRFS_IOC_DEV_PROPERTIES.
Date: Thu, 11 Feb 2021 19:47:00 +0100	[thread overview]
Message-ID: <b39dcabb-43fd-2709-de07-2ed53525c972@libero.it> (raw)
In-Reply-To: <29e32334-8c76-35d0-f756-723688f6e927@toxicpanda.com>

On 2/10/21 5:08 PM, Josef Bacik wrote:
> On 2/1/21 4:28 PM, Goffredo Baroncelli wrote:
>> From: Goffredo Baroncelli <kreijack@inwind.it>
>>
>> This ioctl is a base for returning / setting information from / to  the
>> fields of the btrfs_dev_item object.
>>
>> For now only the "type" field is returned / set.
>>
>> Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
[...]
>> +    /* it is possible to set only BTRFS_DEV_PROPERTY_TYPE for now */
>> +    if (dev_props.properties & ~(BTRFS_DEV_PROPERTY_TYPE))
>> +        return -EPERM;
>> +
>> +    trans = btrfs_start_transaction(root, 0);
> 
> This needs to be 1, we're updating an item.

Ok

[...]
>> + * Up to 2020/05/11 the only properties that can be read/write is the 'type'
>> + * one.
>> + */
>> +struct btrfs_ioctl_dev_properties {
>> +    __u64    devid;
>> +    __u64    properties;
>> +    __u64    type;
>> +    __u32    dev_group;
>> +    __u8    seek_speed;
>> +    __u8    bandwidth;
>> +
>> +    /*
>> +     * for future expansion
>> +     */
>> +    __u8    unused1[2];
>> +    __u64    unused2[4];
>> +};
>> +
> 
> I think we're padding out to 1k for new stuff like this?  We can never have too much room for expansion.  Thanks,
Ok, in the next iteration this will be expanded up to 1kB

> 
> Josef

Ciao
Goffredo

-- 
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5

  reply	other threads:[~2021-02-11 18:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 21:28 [RFC][PATCH V6] btrfs: allocation_hint mode Goffredo Baroncelli
2021-02-01 21:28 ` [PATCH 1/5] btrfs: add ioctl BTRFS_IOC_DEV_PROPERTIES Goffredo Baroncelli
2021-02-10 16:08   ` Josef Bacik
2021-02-11 18:47     ` Goffredo Baroncelli [this message]
2021-02-01 21:28 ` [PATCH 2/5] btrfs: add flags to give an hint to the chunk allocator Goffredo Baroncelli
2021-02-10 16:09   ` Josef Bacik
2021-02-11 18:47     ` Goffredo Baroncelli
2021-02-01 21:28 ` [PATCH 3/5] btrfs: export dev_item.type in /sys/fs/btrfs/<uuid>/devinfo/<devid>/type Goffredo Baroncelli
2021-02-01 21:28 ` [PATCH 4/5] btrfs: add allocation_hint option Goffredo Baroncelli
2021-02-10 16:14   ` Josef Bacik
2021-02-11 18:46     ` Goffredo Baroncelli
2021-02-01 21:28 ` [PATCH 5/5] btrfs: add allocator_hint mode Goffredo Baroncelli
2021-02-04 23:24   ` Zygo Blaxell
2021-02-05 18:01     ` Goffredo Baroncelli
2021-02-10 16:12   ` Josef Bacik
2021-02-11 18:46     ` Goffredo Baroncelli
2021-02-19 18:51   ` Goffredo Baroncelli
2021-02-10 16:04 ` [RFC][PATCH V6] btrfs: allocation_hint mode Josef Bacik
2021-02-11 18:47   ` Goffredo Baroncelli
2021-02-11 18:58     ` Josef Bacik
2021-02-16 22:27     ` 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=b39dcabb-43fd-2709-de07-2ed53525c972@libero.it \
    --to=kreijack@libero.it \
    --cc=ce3g8jdj@umail.furryterror.org \
    --cc=josef@toxicpanda.com \
    --cc=kreijack@inwind.it \
    --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