diff options
| author | Yufen Yu <[email protected]> | 2020-08-20 13:22:05 +0000 |
|---|---|---|
| committer | Song Liu <[email protected]> | 2020-08-28 05:41:03 +0000 |
| commit | 6af10a33c501b0b5878476501143c2cfbbfd63a2 (patch) | |
| tree | a89dd520a4a67f44838f946d7419228da345a44d /net/switchdev/switchdev.c | |
| parent | loop: Set correct device size when using LOOP_CONFIGURE (diff) | |
| download | kernel-6af10a33c501b0b5878476501143c2cfbbfd63a2.tar.gz kernel-6af10a33c501b0b5878476501143c2cfbbfd63a2.zip | |
md/raid5: make sure stripe_size as power of two
Commit 3b5408b98e4d ("md/raid5: support config stripe_size by sysfs
entry") make stripe_size as a configurable value. It just requires
stripe_size as multiple of 4KB.
In fact, we should make sure stripe_size as power of two. Otherwise,
stripe_shift which is the result of ilog2 can not represent the real
stripe_size. Then, stripe_hash() and stripe_hash_locks_hash() may
get unexpected value.
Fixes: 3b5408b98e4d ("md/raid5: support config stripe_size by sysfs entry")
Signed-off-by: Yufen Yu <[email protected]>
Signed-off-by: Song Liu <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions
