Re: [PATCH 09/19] btrfs: limit super block locations in HMZONED mode
From: Naohiro Aota
Date: Tue Jun 18 2019 - 04:56:19 EST
On 2019/06/13 23:13, Josef Bacik wrote:
> On Fri, Jun 07, 2019 at 10:10:15PM +0900, Naohiro Aota wrote:
>> When in HMZONED mode, make sure that device super blocks are located in
>> randomly writable zones of zoned block devices. That is, do not write super
>> blocks in sequential write required zones of host-managed zoned block
>> devices as update would not be possible.
>>
>> Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx>
>> Signed-off-by: Naohiro Aota <naohiro.aota@xxxxxxx>
>> ---
>> fs/btrfs/disk-io.c | 11 +++++++++++
>> fs/btrfs/disk-io.h | 1 +
>> fs/btrfs/extent-tree.c | 4 ++++
>> fs/btrfs/scrub.c | 2 ++
>> 4 files changed, 18 insertions(+)
>>
>> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
>> index 7c1404c76768..ddbb02906042 100644
>> --- a/fs/btrfs/disk-io.c
>> +++ b/fs/btrfs/disk-io.c
>> @@ -3466,6 +3466,13 @@ struct buffer_head *btrfs_read_dev_super(struct block_device *bdev)
>> return latest;
>> }
>>
>> +int btrfs_check_super_location(struct btrfs_device *device, u64 pos)
>> +{
>> + /* any address is good on a regular (zone_size == 0) device */
>> + /* non-SEQUENTIAL WRITE REQUIRED zones are capable on a zoned device */
>
> This is not how you do multi-line comments in the kernel. Thanks,
>
> Josef
>
Thanks. I'll fix the style.
# I thought the checkpatch was catching this ...