Re: [PATCH v2 4/5] md/raid1: Atomic write support
From: John Garry
Date: Thu Oct 31 2024 - 07:18:39 EST
On 31/10/2024 01:57, Yu Kuai wrote:
+ if (is_bad && bio->bi_opf & REQ_ATOMIC) {
+ /* We just cannot atomically write this ... */
+ error = -EFAULT;
+ goto err_handle;
+ }
One nit here. If the write range are all badblocks, then this rdev is
skipped, and bio won't be splited, so I think atomic write is still fine
in this case. Perhaps move this conditon below?
Same for raid10.
ok, I can relocate that.
Thanks,
John