# US 12,254,221 B2 · Magnetic disk apparatus and method

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,254,221 B2
- Document ID: US12254221B2
- Status: Granted
- Kind: B2
- Application number: 17/903,905
- Filed: 2022-09-06
- Published: 2023-09-28
- Granted: 2025-03-18
- Earliest claimed: 2022-03-22
- Assignees: Kabushiki Kaisha Toshiba; Toshiba Electronic Devices & Storage Corporation
- Applicants: Kabushiki Kaisha Toshiba; Toshiba Electronic Devices & Storage Corporation
- Inventors: Keigo Sogabe
- Web page: https://patentgrep.com/patent/US12254221B2

## CPC

- G06F 3/0676: {Magnetic disk device}
- G11B 19/00: Driving, starting, stopping record carriers not specifically of filamentary or web form, or of supports therefor; Control thereof; Control of operating function {; Driving both disc and head}
- G06F 11/1441: {Resetting or repowering}
- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 12/0868: Data transfer between cache memory and other subsystems, e.g. storage devices or host systems
- G11C 11/401: forming cells needing refreshing or charge regeneration, i.e. dynamic cells
- G11C 11/5642: {Sensing or reading circuits; Data output circuits}
- G11C 16/06: Auxiliary circuits, e.g. for writing into memory
- G06F 2212/1024: Latency reduction
- G06F 2212/1032: Reliability improvement, data loss prevention, degraded operation etc
- G06F 2212/2022: Flash memory
- G06F 2212/225: Hybrid cache memory, e.g. having both volatile and non-volatile portions
- G06F 2212/283: Plural cache memories
- G06F 2212/286: Mirrored cache memory
- G06F 2212/313: In storage device
- G06F 2212/7202: Allocation control and policies
- G11C 5/144: {Detection of predetermined disconnection or reduction of power supply, e.g. power down or power standby}
- G11C 2211/5647: Multilevel memory with bit inversion arrangement
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G11B: INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER (recording measured values in a way that does not require playback through a transducer G01D9/00; recording or playback apparatus using mechanically marked tape, e.g. punched paper tape, or using unit records, e.g. punched or magnetically marked cards G06K; transferring data from one type of record carrier to another G06K1/18; circuits for coupling output of reproducer to radio receiver H04B1/20; gramophone pick-ups or like acoustic electromechanical transducers or circuits therefor H04R)
- G11C: STATIC STORES (semiconductor memory devices H10B)

## Abstract

According to a magnetic disk apparatus of one embodiment, threshold voltages of memory cell transistors of a flash memory are set to a first section for a first value or to a second section for a second value. The second section is on a lower voltage side than the first section. The controller performs bit inversion of second data held in a volatile memory and writes the second data onto the flash memory when a power loss occurs while the second data corresponds to third data in which a number of the first values is larger than that of the second values. The controller writes the second data onto the flash memory without bit inversion when a power loss occurs while the second data corresponds to fourth data. The fourth data is data in which a number of the first values is smaller than that of the second values.

## Claims

### Claim 1

A magnetic disk apparatus connectable to a host device, the magnetic disk apparatus comprising:
a magnetic disk;
a flash memory including memory cell transistors, each of the memory cell transistors storing one of first and second values;
a volatile memory configured to temporarily hold first data received from the host device until data corresponding to the first data is written onto the magnetic disk; and
a controller configured to
when a power loss occurs,
perform bit inversion of the first data held in the volatile memory and write bit-inverted data of the first data as second data onto the flash memory in a case where a number of the first values in the first data is larger than a number of the second values in the first data, but not all values of the first data are the first values,
write the first data as third data onto the flash memory without performing bit inversion in a case where the number of the first values in the first data is smaller than the number of the second values in the first data, but not all values of the first data are the second values,
write, onto the flash memory, first information indicating whether the number of the first values in the first data is larger or smaller than the number of the second values in the first data, and
in a case where the first data exclusively includes the first values or exclusively includes the second values, write onto the flash memory second information indicating that the first data exclusively includes the first values or exclusively includes the second values without writing the second data or the third data onto the flash memory, and
when power supply is resumed after the power loss,
perform the bit inversion of the second data written onto the flash memory and write bit-inverted data of the second data onto the magnetic disk in a case where the second information is not written onto the flash memory and the first information indicates that the number of the first values in the first data is larger than the number of the second values in the first data,
write the third data onto the magnetic disk without performing bit inversion in a case where the second information is not written onto the flash memory and the first information indicates that the number of the first values in the first data is smaller than the number of the second values in the first data,
generate data exclusively including the first values as fourth data and write the fourth data onto the magnetic disk, in a case where the second information is written onto the flash memory and the first information indicates that the number of the first values in the first data is larger than the number of the second values in the first data, and
generate data exclusively including the second values as fifth data and write the fifth data onto the magnetic disk, in a case where the second information is written onto the flash memory and the first information indicates that the number of the first values in the first data is smaller than the number of the second values in0 the first data.

### Claim 2 (depends on 1)

The magnetic disk apparatus according to claim 1, wherein the controller is configured to,
count the number of the first values and the number of the second values included in the first data,
specify whether the number of the first values in the first data is larger or smaller than the number of the second values in the first data on the basis of a result of the count, and
generate the first information on the basis of a result of the specification.

### Claim 3 (depends on 1)

The magnetic disk apparatus according to claim 1, wherein the first data is data in units of sectors.
