On 05/06/2017 12:25 PM, Wols Lists wrote: > On 03/05/17 15:13, Peter Rajnoha wrote: >> There's a difference though - when you're *creating* a completely new >> device that is an abstraction over existing devices, you (most of the >> time) expect that new device to be initialized. For those corner cases >> where people do need to keep the old data, there can be an option to do >> that. > > That's not a corner case. If there's old data that's the NORM. I get > what you're after, I'm inclined to agree with you, but the default > should be to DO NOTHING. There's some miscommunication here, it seems. mdadm does NOT wipe the primary device in a mirror during create, nor data blocks in a parity-based array's stripes, but it DOES wipe the 2nd and following copy of all mirrored blocks, and DOES wipe all parity and Q blocks. This behaviour is really important for later consistency when degraded, and for parallelizing reads of mirrors. I think a case can be made for wiping it all during create, for consistency with other kernel behaviour. If you allocate memory for userspace, or or create a new file on a filesystem with a specific size, linux goes to some length to deliver zeros in both cases. Arguably, it should do so in MD, too. However, changing the default behaviour would fit Linus' definition of a regression, I would think. Phil -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel