Re: [PATCH] raid0: data corruption when using trim

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "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



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux