One embodiment of the present invention provides a system that updates an
error-correcting code for a line when only a portion of the line is
updated during a store operation. The system operates by receiving the
store operation, wherein the store operation includes new data to be
stored to the portion of the line, as well as an address of the portion of
the line. Next, the system reads old data for the portion of the line from
the address, and then stores the new data to the portion of the line at
the address. The system also updates the existing error-correcting code
for the line to reflect the new data. This involves calculating a new
error-correcting code for the line from the existing error-correcting
code, the old data and the new data. The system then replaces the existing
error-correcting code with the new error-correcting code.
Uma incorporação da invenção atual fornece um sistema que atualize um código error-correcting para uma linha quando somente uma parcela da linha é updated durante uma operação da loja. O sistema opera-se recebendo a operação da loja, wherein a operação da loja inclui os dados novos a ser armazenados à parcela da linha, as.well.as um endereço da parcela da linha. Em seguida, o sistema lê dados velhos para a parcela da linha do endereço, e armazena então os dados novos à parcela da linha no endereço. O sistema atualiza também o código error-correcting existente para que a linha refleta os dados novos. Isto envolve calcular um código error-correcting novo para a linha do código error-correcting existente, dos dados velhos e dos dados novos. O sistema substitui então o código error-correcting existente com o código error-correcting novo.