1. A method performed by a storage subsystem that comprises a non-volatile memory, the method comprising: monitoring at least one condition related to a likelihood of an error occurring in the operation of the storage subsystem; based on said at least one condition, selecting, from a plurality of error correction code (ECC) levels, a particular ECC level to be used to protect data written to the non-volatile memory, each of said ECC levels corresponding to a different respective quantity of ECC data; receiving a block of write data from a host system, and generating ECC data for said block of write data according to the selected ECC level; and storing the block of write data, the generated ECC data, and ECC metadata in the non-volatile memory array, said ECC metadata specifying the ECC level used to generate the ECC data.