Re: [PATCH 1/1] md: skip discard on unsupported member devices
wale zhang <[email protected]>
| Newsgroups | gmane.linux.kernel,gmane.linux.raid |
|---|---|
| Message-ID | <CAHrEdet=CHHFZuY-AUg0Fu1vJ4msL1BXR+C=fVicm9y+Maj2JA@mail.gmail.com> |
OK. Thanks! On Fri, Aug 7, 2026 at 4:35 PM yu kuai <[email protected]> wrote: > > 在 2026/7/31 15:47, Wale Zhang 写道: > > > blk_stack_limits() uses min_not_zero() when stacking discard limits. > > Thus an array containing devices with different discard capabilities can > > expose discard support as long as at least one member has a non-zero > > discard limit. > > > > raid0 and raid10 use md_submit_discard_bio() to submit a discard bio to > > each member covered by the request. The helper currently also submits > > bios to members whose max_discard_sectors is zero. The block layer > > completes these bios with BLK_STS_NOTSUPP, and bio chaining propagates > > that status to the original discard request. > > > > Discard is optional, so skip members which do not support it. Members that > > do support discard continue to receive their portion of the request. > > > > Signed-off-by: Wale Zhang<[email protected]> > > --- > > drivers/md/md.c | 4 ++++ > > 1 file changed, 4 insertions(+) > Applied to md-7.3 > > -- > Thanks, > Kuai