>>>>> "Seunguk" == Seunguk Shin <seunguk.shin@xxxxxxxxxxx> writes: Seunguk, Seunguk> The function bio_split says "The newly allocated bio will point Seunguk> to @bio's bi_io_vec; it is the caller's responsibility to Seunguk> ensure that @bio is not freed before the split." in its Seunguk> comments. I already put an explanatory comment above the cloning code. But I'll elaborate in the function description as well. Seunguk> I'm not sure whether some caller uses this limitation or not, Seunguk> so I modifid the raid function. We generally make sure our generic functions handle non-read/write commands correctly so that callers do not have to keep track of internal block layer implementation details/idiosyncrasies. bio_split() exists mainly to provide linear/raid0/raid10 with a fast path for reads and writes. But the function needs to be able to fall back to a full clone in the discard case. The mutable bio_vec requirement is purely an artifact of how things are implemented further down the stack. MD should not have to deal with that. Seunguk> The patch you shared has no problem, I think. I'll test it and Seunguk> share the result. That would be much appreciated! Thanks, Martin -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html