Patent attributes
According to an embodiment, a track includes first sectors and a second sector. When write of a second data segment to a third sector that is one of the first sectors is requested from a host, a controller acquires the second data segment from the host and stores the second data segment in the memory, and reads a data set including all first data segments and all first information pieces from the track and stores the data set in the memory. The controller acquires a second information piece of the third sector, and updates a first data segment and a first information piece read from the third sector in the data set in the memory with the second data segment and the second information piece. The controller calculates a second parity while the updated data set to the track, and writes the second parity to the second sector.