Skip to content

Conversation

@wuguanghao3
Copy link
Contributor

@wuguanghao3 wuguanghao3 commented Nov 11, 2025

The kernel block branch has started supporting the
configuration of logical block size after mergeing commit
62ed1b582246 (md:allow configuring logical block size),
therefore a new parameter should be added to allow specifying
the logical block size when creating a RAID device.

Links: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git/commit/?h=for-6.19/block&id=62ed1b582246

@wuguanghao3 wuguanghao3 force-pushed the add_logical_block_size branch 2 times, most recently from b0c8ca4 to 4b2d71b Compare November 11, 2025 08:23
Copy link
Member

@mtkaczyk mtkaczyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, bunch of questions :)

The kernel already supports configuring logical block size, therefore a new
parameter should be added to allow specifying the logical block size when
creating a RAID device.

Please mention when it was added. Should we check kernel version to determine if it is supported?
If it is fresh change, what will happen if kernel is not supporting it?

Please also update README.

What about recovery path? if change for one disk fail, should we restore previous the logical block size for all?
What will happen if we will try to set same block size twice?

LGTM,. but we need README do be updated!

ClusterConfirm,
WriteJournal,
ConsistencyPolicy,
LogicalBlockSize,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the special_options at all concept so please care to explain why it is added here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that these options are not general options but specific to certain modes. LogicalBlocksize only takes effect when used with --create to create something. Then, we need to define one value through O(Create, xxx) to reach the corresponding branch.

@wuguanghao3
Copy link
Contributor Author

Hi, bunch of questions :)

The kernel already supports configuring logical block size, therefore a new
parameter should be added to allow specifying the logical block size when
creating a RAID device.

Please mention when it was added. Should we check kernel version to determine if it is supported? If it is fresh change, what will happen if kernel is not supporting it?

Please also update README.

What about recovery path? if change for one disk fail, should we restore previous the logical block size for all? What will happen if we will try to set same block size twice?

LGTM,. but we need README do be updated!

  1. I don't think it's necessary to check the kernel version. Because if it's an old kernel version, the logical_block_size file does not exist under the /sys path, so it would directly result in an error.
  2. OK, I will update the README later.
  3. The user space only writes values to the /sys path of the md device and does not directly modify the metadata information of the member disks. If the setting fails, the md device will also fail to be created, and there is no need for recovery.

@wuguanghao3 wuguanghao3 force-pushed the add_logical_block_size branch 2 times, most recently from 4414325 to e65c9f1 Compare November 13, 2025 04:02
The kernel block branch has started supporting the
configuration of logical block size after mergeing commit
62ed1b582246 (md:allow configuring logical block size),
therefore a new parameter should be added to allow specifying
the logical block size when creating a RAID device.

Links: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git/commit/?h=for-6.19/block&id=62ed1b58224

Signed-off-by: Wu Guanghao <[email protected]>
@wuguanghao3 wuguanghao3 force-pushed the add_logical_block_size branch from e65c9f1 to 0f38140 Compare November 13, 2025 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants