Host-independent disk optimization and data operation for USB-based storage devices
By realizing disk optimization and data operation independent of the host in the data storage device, using pinhole buttons and control circuits, the performance reduction problem caused by interleaving of background operations and host operations in the prior art is solved, and higher performance and durability are achieved.
Patent Information
- Application Number
- CN202480004402.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-08-09
- Filing Date
- 2024-01-23
- Publication Date
- 2025-05-27
AI Technical Summary
When performing background operations, existing data storage devices need to interleave with host operations, resulting in system resources being divided and shared, and performance is reduced.
By enabling host-independent disk optimization and data operations in a data storage device, trigger disk optimization operations with pinhole buttons, and manage these operations through control circuitry and firmware, ensuring backend tasks are performed without host connection or low power states.
It realizes disk optimization and data operations without host connection, improves the performance and durability of storage devices, and reduces dependence on hosts.
Smart Images

Figure CN120051755A_ABST
Abstract
Description
[0001] Cross - Reference to Related Applications
[0002] This application claims the benefit of, and incorporates by reference in its entirety, U.S. Non - Temporary Application No. 18 / 232,310, filed on August 9, 2023, entitled "HOST - INDEPENDENT DISK OPTIMIZATION AND DATA OPERATIONS FOR USB - BASED STORAGE DEVICES", which claims the priority of U.S. Provisional Application No. 63 / 522,692, filed on June 22, 2023, for all purposes. Background Art Technical Field
[0003] This disclosure relates to data storage systems. Specifically, this disclosure relates to data operations of data storage devices.
[0004] Description of the Related Art
[0005] Data storage devices can perform various data operations, including processing data requests from a host. In some cases, data storage devices such as Universal Serial Bus (USB) storage devices can perform background operations such as disk optimization and other data operations. Brief Description of the Drawings
[0006] For illustrative purposes, various embodiments are depicted in the drawings and should in no way be construed as limiting the scope of this disclosure. Additionally, various features of different disclosed embodiments can be combined to form additional embodiments that are part of this disclosure.
[0007] Figure 1 An example data storage device related to providing disk optimization and data operations in accordance with one or more embodiments is illustrated.
[0008] Figure 2 is a block diagram illustrating an example data storage device for providing disk optimization and data operations and associated components in accordance with one or more embodiments.
[0009] Figure 3A Shows the connection between a host and a USB storage device in accordance with one or more embodiments. Figure 3B Shows the connection between a power supply and a USB storage device in accordance with one or more embodiments.
[0010] Figure 4is a block diagram illustrating an example data storage device for providing disk optimization and data operations in accordance with one or more embodiments.
[0011] Figure 5 Illustrates a workflow process for providing disk optimization and data operations in a data storage device in accordance with one or more embodiments.
[0012] Figure 6 Illustrates a workflow process for providing host-independent data accessibility and data security operations in a data storage device in accordance with one or more embodiments.
[0013] Figure 7 Illustrates a workflow process for providing disk optimization and data operations in a data storage device in accordance with one or more embodiments.
[0014] Figure 8 is a diagram of a computing device in accordance with one or more embodiments. Detailed Description
[0015] Although certain embodiments have been described, these embodiments are presented by way of example only and are not intended to limit the scope of protection. In fact, the novel methods and systems described herein may be embodied in many other forms. Additionally, various omissions, substitutions, and changes may be made to the forms of the methods and systems described herein without departing from the scope of the invention.
[0016] Host-Independent Disk Optimization and Data Operations for USB-Based Storage Devices
[0017] In many cases, a storage device may perform several background operations to maintain or improve functionality, durability, and performance. Examples of storage devices may include portable storage devices such as USB flash drives or other USB devices. For example, when a drive is connected to a host, background operations may be performed on the USB flash drive. Most of the background operations in the drive may be interleaved with the host operations of the host (e.g., host input / output) because the drive moves to a low-power state to save power drawn from the host when there are no host operations. When the drive enters the low-power state, many components (including the host interface, controller, and NAND die) are placed in an inactive state, and internal background operations may not be performed in such inactive states. Background operations may include but are not limited to garbage collection, data folding, data compaction, memory health checks, and data retention checks (e.g., read-erase), management table updates, and the like. Interleaving background operations with host operations may degrade performance because system resources are divided and shared between host operations and background operations. Examples of system resources may include the controller, cores, central processing unit (CPU) cycles, flash interface manager (FIM), NAND, data bus bandwidth, internal memory available on a system-on-chip (SoC), cache memory, temporary data storage buffers, and the like.
[0018] To address these and other challenges, a storage device according to certain aspects may implement disk optimization and data operations independent of the host. For example, background operations of the storage device may be performed without being connected to a host and without receiving power from the host and / or without instructions from the host (such as previously stored instructions). For example, a USB flash drive may include a pinhole button that may be pressed to initiate a disk optimization operation or another data operation. The drive may determine whether the drive is connected to a power source, and if there is sufficient power, when the pinhole button is detected to be pressed, the drive may initiate a disk optimization operation or another data operation. The USB flash drive may include an indicator such as a light-emitting diode (LED) indicator that may show whether a disk optimization operation or another data operation is in progress or completed. A user may configure what functionality is associated with the pinhole button such that when the pinhole button is pressed and the USB flash drive is connected to a power source, the configured functionality may be initiated. In this way, various disk optimization or data operations may be performed without a host, and the performance of the storage device may be improved during subsequent host operations when the storage device is connected to the host. Details related to a storage device for providing disk optimization and data operations independent of the host are provided below.
[0019] Data Storage Device
[0020] Figure 1FIG. is an illustration showing a data storage device 100 that provides disk optimization and data operations independent of a host according to certain embodiments. In some embodiments, the data storage device 100 includes: a control circuit 120 for controlling the data storage device 100; a data interface 122; and a non-volatile storage medium 124. The control circuit 120 may include hardware and / or software (e.g., firmware), such as an optimization and data operation controller 126, for performing disk optimization and data operations on the storage medium 124. The optimization and data operation controller 126 may be implemented in firmware that runs on a controller chip. In some specific implementations, the optimization and data operation controller 126 may be a dedicated, hardware-based chip for performing disk optimization and data operations. The control circuit 120 may also include additional functionality. For example, the control circuit 120 may support file-based storage. The control circuit 120 may also include functionality for managing data transfer of the data storage device 100.
[0021] The data storage device 100 may employ various storage technologies and / or form factors. For example, the data storage device 100 may be a solid state drive (SSD) using semiconductor memory as the storage medium 124, a secure digital (SD) card, or a universal serial bus (USB) storage stick. In other specific implementations, the data storage device 100 may be a hard disk drive (HDD) using a disk as the storage medium 124 or a solid state hybrid drive (SSHD) using a combination of semiconductor memory and disk technology.
[0022] The storage medium 124 may utilize various types of non-volatile memory (NVM) to permanently store data. NVM is a type of computer memory that can retain the stored information even after power-off. For example, the storage medium 124 may include one or more disks and / or semiconductor memory. The semiconductor memory may include any memory technology among various memory technologies, such as NAND memory and its variations, such as SLC (single-level cell), eMLC (enterprise multi-level cell), MLC (multi-level cell), TLC (triple-level cell), and QLC (quad-level cell). New types of emerging non-volatile memory, such as in-situ program or storage class memory (SCM), such as ReRam, phase change memory (PCM), and magnetoresistive random access memory (MRAM), may also be used.
[0023] The data storage device 100 may include a small amount of volatile memory, such as random access memory (RAM), to act as a cache for data. Such a cache can enable very fast access to the data stored thereon. In some embodiments, in addition to the storage medium 124, the data storage device 100 may also include auxiliary non-volatile memory. For example, the data storage device 100 may also include a read-only memory (ROM) in which firmware can be stored and / or a complementary metal oxide semiconductor (CMOS) memory in which firmware settings can be stored.
[0024] In some embodiments, the control circuit 120 is configured to manage semiconductor memory or magnetic technology. For example, the control circuit 120 may include a memory or storage controller. In some embodiments, the control circuit 120 is configured to manage the data interface 122. For example, the control circuit 120 may include a USB controller. The control circuit 120 may include an embedded processor, an electrically erasable firmware ROM, RAM, an error correction code (ECC) circuit, a head controller, a voice coil motor (VCM) controller, and / or a host electrical interface (such as Serial ATA (SATA), USB, Non-Volatile Memory Express (NVMe), or Serial Attached SCSI (SAS)).
[0025] The data interface 122 may include connectors, cables, and / or protocols for connection, communication, and / or power supply between the host device and the data storage device 100. In some embodiments, the ports of the data interface 122 can enable the transfer of both data and power to the connected device. In some embodiments, the data interface 122 includes USB hardware and / or software. Various versions of USB can be used, such as USB 2.x, USB 3.x, or USB 4.x. The data interface 122 may include a physical port for coupling with connectors and cables. Various types of USB ports may be included on the data storage device, such as male or female Type-A, B, C, mini, and / or micro connectors. Other data interface standards can also be used, such as external SATA (eSATA), ExpressCard, FireWire (IEEE 1394), and Thunderbolt. The data interface 122 may include a port for connection to a cable or a corresponding port on the host device.
[0026] In some embodiments, the data storage device 100 lacks a battery. Instead, the data storage device 100 receives power via the data interface 122 from a connected host or via a wall adapter (e.g., a USB charger, an alternating current (AC) to direct current (DC) converter, etc.) connectable to the mains power in a building. A USB port on the host device can provide power and act as a conduit for data transmission. For example, the data storage device 100 can be connected to a host system via a USB port, which typically provides 5 volts (V) of DC power, but a fast-charging USB port can provide DC power at a higher voltage.
[0027] Various types of host devices can be connected to the data storage device 100. Such host devices can include a phone 135 (such as a smartphone), an electronic appliance (not shown), a smart television (TV) (not shown), a video game device 134, a laptop computer 133, a tablet computer 132, a desktop computer (not shown), a wearable computer (not shown), a wall-powered storage device 137 (e.g., a network-attached storage device or a powered external drive), and / or other consumer electronic devices.
[0028] The data storage device 100 can be communicatively coupled to a host device via the data interface 122. The data storage device 100 can provide additional data storage to the connected device or facilitate the transfer of data to other host devices. The data storage device 100 can be connected directly (e.g., male port to female port) or via a cable to a physical connection port (e.g., USB) on the host device.
[0029] Host-Independent Disk Optimization and Data Operations
[0030] Figure 2 An example data storage device 200 for providing host-independent disk optimization and data operations in accordance with one or more embodiments is illustrated. In some embodiments, Figure 2 the components of can be similar to those of Figure 1 with similar names and / or reference numbers. For example, the data storage device 200 can be similar to Figure 1 the data storage device 100 in. Certain details related to the data storage device 200 are described above in connection with Figure 1
[0031] As in Figure 2In the example, the data storage device 200 can be a USB flash drive or a memory stick. The storage device 200 may include a pinhole button 202. The pinhole button 202 can be pressed to initiate a disk optimization operation (or another data operation). For example, the pinhole button 202 can be pressed using the pin 206 provided by the storage device 200. The pinhole button 202 can be pressed for a specified duration or threshold period to initiate a disk optimization operation (or another data operation). The storage device 200 can determine whether it is connected to a power supply 210 (e.g., a DC power supply / adapter / mobile power supply, etc.), and if the storage device 200 is connected to the power supply 210, a disk optimization operation can be initiated. The initiation of the disk optimization operation and the execution of the disk optimization operation do not require a connection to a host. When the disk optimization operation is being executed, the storage device 200 can remain connected to the power supply 210. The storage device 200 may also include an indicator 204, such as an LED indicator. The indicator 204 can provide status information related to the disk optimization operation. The indicator 204 can show whether the disk optimization operation is in progress or completed. For example, the LED can be turned on when the disk optimization operation starts, remain on while the disk optimization operation is in progress, and turn off when the disk optimization operation is completed. After the disk optimization operation is completed, the storage device 200 can be disconnected from the power supply 210.
[0032] Various types of buttons or switches can be used to implement the pinhole button 202. Examples of buttons or switches can include push buttons, toggle buttons, momentary switches, etc. The push button can be pressed and held in the pressed position (e.g., stuck). The push button can be pressed again and return to the normal position. The toggle button can be pressed and return to the normal position. When the push button or the toggle button is pressed, an interrupt or a command can be sent to the controller, and the associated functionality can be executed. Any suitable button or switch can be used. The pinhole button 202 can be placed inside the storage device 200 and pressed through a pinhole or an orifice so that the button is not accidentally pressed to trigger a disk optimization operation (or another data operation). As an example, the pinhole button 202 can be placed inside the cover set of a USB flash drive. The pinhole button 202 can be connected to a printed circuit board (PCB). In some embodiments, the pinhole button 202 can be placed on the outside of the storage device 200.
[0033] The pressing effect of the pinhole button 202 can vary according to the implementation. For example, when pressed, the pinhole button 202 can be sticky or non-sticky. If the pressing effect of the pinhole button 202 is sticky, the associated action or functionality cannot be revoked or cancelled by pressing the pinhole button 202 again. If the pressing effect of the pinhole button 202 is non-sticky, the associated action or functionality can be revoked or cancelled by pressing the pinhole button 202 again. In some cases, the pinhole button 202 can be stuck in the pressed position to avoid accidentally resetting the associated functionality or preventing misuse of the pinhole button 202.
[0034] The pinhole button 202 can be configured to perform various functions based on the pressing duration or the number of presses. For example, a short press of the pinhole button 202 can be associated with a first function, while a long press of the pinhole button 202 can be associated with a second function. The short press and the long press can be defined as having corresponding durations (e.g., a specified number of seconds, etc.). An appropriate number of durations can be defined and used according to the number of available functions. For example, if three functions are available, a short press, a medium press, and a long press can be defined. In some instances, the number of presses can be associated with different functions or activating / deactivating functions. Multiple presses can be used to activate or deactivate functions. Two presses or three presses can be used appropriately. Many variations are possible.
[0035] The pinhole button 202 can be configured to act in various ways. As an example, if the pinhole button 202 is pressed while the storage device 200 is in the powered-on state, the pinhole button 202 can return to the normal position, but the functionality for subsequent presses can be stopped until the associated functionality is completed. In this way, errors caused by the user pressing the pinhole button 202 further can be prevented. As another example, if the pinhole button 202 is pressed while the storage device 200 is in the powered-off state, the pinhole button 202 can be stuck and held in the pressed position. When the storage device 200 is powered on next time, the storage device 200 can check the button state of the pinhole button 202 and start the associated functionality. After starting the associated functionality, the pinhole button 202 can be released to the normal position, but the function for subsequent presses can be stopped until the associated functionality is completed. In some implementations, further interruptions generated by pressing the pinhole button 202 can be handled by the firmware, for example, by ignoring subsequent instructions after receiving the initial instruction.
[0036] To continue the disk optimization operation by pressing the pinhole button 202, the storage device 200 can determine whether the storage device 200 is connected to a power supply 210 that can supply power to the storage device 200. As an example, the power supply 210 can be a 5V DC power supply (e.g., an adapter). In some embodiments, the power supply 210 is a wall charger 210, such as a USB charger including a USB port for charging a USB device. Any suitable power supply can be used. In some cases, a compatible battery or a rechargeable mobile power supply can be used. In some embodiments, the power supply 210 can be an AC adapter. In certain embodiments, the storage device 200 can include a battery.
[0037] The storage device 200 can be coupled to a host for various data operations. For example, the USB male port / connector of a USB storage device can be connected to the USB female port / connector of a host. The USB storage device can operate on a 5V DC input current supplied via the USB female port of the host. Examples of hosts can include a computer, a laptop, a mobile phone, etc. In some cases, the USB storage device can be coupled to a mobile phone via an On-The-Go (OTG) cable. A standard USB (Type A) port can have four (4) pins. Two (2) pins can be used for power supply, and two (2) pins can be used for data transfer. A description of the four pins is provided in Table 1 below.
[0038]
[0039]
[0040] Table 1 - Example USB Pin Descriptions
[0041] Figure 3A The connection between the host 330 and the USB storage device 300 is shown. The connection between the host 330 and the USB storage device 300 can utilize four pins, including two power pins (e.g., +5V power pin, ground pin) and two data pins (e.g., data - pin and data + pin).
[0042] The storage device 200 can also be coupled to a power supply 210, such as a wall charger. A 5V DC power supply / adapter generally can include power pins but does not include data pins. Figure 3B The connection between the power supply (5V DC) 310 and the USB storage device 300 is shown. The connection between the power supply 310 and the USB storage device 300 can include two power pins (e.g., +5V power pin, ground pin). When no data exchange occurs, the storage device 200 can determine that the storage device 200 is connected to the power supply 210 rather than the host.
[0043] Indicator 204 can provide status information related to disk optimization operations. Indicator 204 can use various methods to provide information related to disk optimization operations. For example, indicator 204 can be an LED indicator. As an example, the LED can be turned on when performing a disk optimization operation and turned off when the disk optimization operation is completed. As another example, the LED can blink or use different colors to provide status information. The LED can use different blink rates or different colors to convey information. Various types of indicators can be used, such as one or more of an LED, a screen, an electrochromic display, an electronic sound, or a speaker module, etc.
[0044] As described above, the user can configure what functionality should be associated with the pinhole button 202. In some embodiments, the pinhole button 202 can be associated with disk optimization operations. In certain embodiments, the pinhole button 202 can be associated with other data operations (such as authentication, accessibility, data security operations, etc.). For example, details related to various disk optimization operations and data operations are provided below in connection with Figures 4 to 6 When the user can configure which functionality is associated with the pinhole button 202 by connecting to a host (e.g., using a host or mobile application). When the pinhole button 202 is pressed at a subsequent time, the user-configured functionality can be executed. In some embodiments, the user can disable the pinhole button 202 by not specifying the functionality associated with the pinhole button 202.
[0045] For illustrative purposes, disk optimization and data operations independent of a host are described in connection with a USB flash drive, but disk optimization and data operations independent of a host can be applicable to any type of data storage device. For example, disk optimization and data operations independent of a host can be applicable to any storage device including at least one USB interface. Examples of storage devices can include external or portable storage devices, such as a portable solid-state drive (SSD) or a portable hard disk drive (HDD). For example, details related to disk optimization and data operations are provided below in connection with Figures 4 to 6 Details related to disk optimization and data operations are provided.
[0046] Figure 4 is a block diagram illustrating an example data storage device 400 for providing disk optimization and data operations independent of a host according to one or more embodiments. In some embodiments, Figure 4 The components of can be similar to those of with similar names and / or reference numbers. Figures 1 to 2 For example, the data storage device 400 can be similar to Figures 1 to 2 The data storage devices 100, 200 in. Certain details related to the data storage device 400 are described above in connection with Figures 1 to 2 are described.
[0047] The data storage device 400 may include a control circuit 420, a data interface 422, and a storage medium 424. The storage device 400 may be connected to and communicate with a host 430 through the data interface 422. The control circuit 420 may include a boot module 450, an interrupt management module 452, an LED indicator module 454, and an optimization and data operation controller 426. The boot module 450 may manage the boot process for the storage device 400. The boot module 450 may determine whether the storage device 400 is connected to the host 430 or to a power source. For example, when there is data transfer or device discovery related message exchange or device capability discovery related handshake, the boot module 450 may determine that the storage device 400 is connected to the host 430. When there is no data transfer or exchange or handshake, the boot module 450 may determine that the storage device 400 is connected to a power source that is not the host. The interrupt management module 452 may manage interrupts associated with the storage device 400. The interrupts may be masked or temporarily disabled. For example, the interrupt management module 452 may mask some or all interrupts during the execution of a disk optimization operation or another data operation. The interrupt management module 452 may unmask some or all interrupts after the disk optimization operation or another data operation is completed. The LED indicator module 454 may manage one or more LEDs. For example, the LED indicator module 454 may turn on or off one or more LEDs, cause one or more LEDs to blink, etc., to provide status information related to the disk optimization operation or another data operation.
[0048] The optimization and data operation controller 426 may include a disk optimization module 456 and a data accessibility and data security module 458. The disk optimization module 456 may perform disk optimization operations on the storage device 400. The disk optimization operations may include performance and space optimization operations, data compression / decompression optimization operations, data retention optimization operations, etc. The disk optimization module 456 may be configured to perform performance and space optimization operations, compression / decompression optimization operations, memory health checks, data retention optimization operations, etc. The data accessibility and data security module 458 may perform data accessibility operations or data security operations on the storage device 400. For example, the data accessibility operations may make a partition or the entire storage device accessible or inaccessible or perform authentication. The data security operations may include data encryption / decryption. The data accessibility and data security module 458 may be configured to perform one or more of data accessibility operations, data security operations, etc. The storage medium 424 may include NAND memory. The NAND memory may be organized into one or more blocks. Depending on the implementation, the storage device 400 and / or the control circuit 420 may include additional or fewer components. Depending on the implementation, one or more components of the storage device 400 and / or the control circuit 420 may be combined or implemented separately.
[0049] Disk Optimization Process and Authentication and Data Security Processes
[0050] Figure 5 Illustrates workflow process 500 for providing disk optimization and data operations in a data storage device according to one or more embodiments. Workflow process 500 can be implemented by a data storage device such as Figures 1 to 4 data storage devices 100, 200, 400 in. For example, workflow process 500 can be executed partially or entirely by a controller of the data storage device. For illustrative purposes, process 500 is explained below in connection with Figure 4 data storage device 400 in. Regarding Figures 1 to 4 Certain details related to process 500 are explained in more detail. Depending on the embodiment, process 500 can include fewer or additional blocks, and these blocks can be executed in a different order than illustrated.
[0051] Process 500 begins at block 505. At block 510, data storage device 400 is connected to a power source. For example, the power source can be a USB 5V DC power supply / adapter. At block 515, firmware (e.g., boot module 450) can identify that storage device 400 is connected to a power source rather than to a host. For example, when storage device 400 is connected to a power source, boot module 450 can be executed. The firmware can check whether storage device 400 is connected to a host or to a power source, for example, based on the USB handshake protocol. If there is no data transfer or message exchange, the firmware can determine that storage device 400 is connected to a power source. At block 520, the user presses a pinhole button available on storage device 400. At block 525, firmware (e.g., interrupt management module 452) can detect the pinhole button interrupt. At block 530, the interrupt service routine masks all interrupts in storage device 400 and calls LED indicator module 454. At block 535, LED indicator module 454 can turn on the LED. At block 540, disk optimization module 456 is called.
[0052] At block 545, storage device 400 determines whether performance and space optimization are enabled. If performance and space optimization are enabled at block 545, process 500 proceeds to block 550. At block 550, storage device 400 can perform at least one of the following operations: garbage collection / MLC-MLC relocation, SLC-SLC compaction, SLC-MLC folding, delete all files older than a specified time, delete files not accessed since a pre-configured time, and update the management table. If performance and space optimization are not enabled at block 545, process 500 proceeds to block 555.
[0053] In some embodiments, one or more performance optimization and space retrieval related operations may be performed. For example, storage device 400 may check any blocks ready for garbage collection and / or MLC-MLC relocations and perform the relocations. Data on storage device 400 may be defragmented. MLC-to-MLC relocation may move data from one or more MLC blocks to another MLC block. Storage device 400 may check any blocks ready for compaction and perform compaction. Compaction may include both SLC block compaction and MLC block compaction. For example, SLC-to-SLC compaction may include moving data from one or more SLC blocks to another SLC block. Storage device 400 may check any SLC blocks ready to be folded into MLC blocks and perform the folding. Data from one or more SLC blocks may be moved to an MLC block. Storage device 400 may delete data files older than a preconfigured time based on an internal timestamp. Storage device 400 may delete data files not accessed since a preconfigured time based on an internal timestamp. Storage device 400 may update the management table.
[0054] At block 555, storage device 400 determines whether data compression optimization is enabled. If data compression optimization is enabled at block 555, then process 500 proceeds to block 560. At block 560, storage device 400 may perform at least one of the following operations: data compression on a preselected partition, data compression on the entire drive, data compression of files written before a preconfigured time, proactive compression of future incoming data, decompression of compressed data, and updating the management table. If data compression optimization is not enabled at block 555, then process 500 proceeds to block 565.
[0055] In some embodiments, one or more data compression operations may be performed. For example, storage device 400 may perform data compression on at least one partition present on the drive or on the entire drive, e.g., using a data compression utility available on the drive. Any suitable compression algorithm may be used. As an example, storage device 400 may perform compression of files in zip format. Storage device 400 may perform file compression on files older than a preconfigured time based on an internal timestamp. If the data is already in compressed form, then storage device 400 may perform data decompression. Storage device 400 may activate compression of data to be subsequently written to the drive.
[0056] At block 565, the storage device 400 determines whether data retention optimization is enabled. If data retention optimization is enabled at block 565, the process 500 proceeds to block 570. At block 570, the storage device 400 may perform at least one of the following operations: perform a read-scan and erase on a previously written block, relocate data from a block showing an error rate (BER) greater than a pre-configured threshold, perform a wear leveling operation, and update the management table. If data retention optimization is not enabled at block 565, the process 500 proceeds to block 575. At block 575, the LED indicator module 454 is called to turn off the LED. All interrupts may be unmasked after the relevant operations are completed. The process 500 ends at block 580.
[0057] In some embodiments, one or more health / data retention related operations are performed. In some cases, voltage may be depleted from the NAND memory over time, and the storage device 400 may perform data retention related operations to improve data retention. For example, the storage device 400 may perform a read-erase on a previously written block. The storage device 400 may move data from a block showing a higher read error or bit error rate (BER) than a pre-configured threshold. The storage device 400 may also perform a wear leveling operation. The wear leveling algorithm may ensure that all blocks have the same amount of program / erase (P / E) cycles. Cold data may be moved to a block with a high P / E count (e.g., a hotter block).
[0058] Figure 6 Illustrated is a workflow process 600 for providing host-independent data accessibility and data security operations in a data storage device according to one or more embodiments. The workflow process 600 may be implemented by a data storage device such as Figures 1 to 5 the data storage devices 100, 200, 400 in. For example, the workflow process 600 may be executed partially or entirely by the controller of the data storage device. For illustrative purposes, the process 600 is explained below in connection with Figure 4 the data storage device 400 in. Certain details related to the process 600 are explained in more detail with respect to Figures 1 to 5 Depending on the embodiment, the process 600 may include fewer or additional blocks, and these blocks may be executed in a different order than illustrated.
[0059] Process 600 begins at block 605. At block 610, the data storage device 400 is connected to a power source. For example, the power source can be a USB 5V DC power supply / adapter. At block 615, the firmware (e.g., the boot module 450) can recognize that the storage device 400 is connected to the power source instead of being connected to a host. For example, when the storage device 400 is connected to the power source, the boot module 450 can be executed. The firmware can check whether the storage device 400 is connected to a host or to the power source, for example, based on the USB handshake protocol. If there is no data transfer or message exchange, the firmware can determine that the storage device 400 is connected to the power source. At block 620, the user presses the pinhole button available on the storage device 400. At block 625, the firmware (e.g., the interrupt management module 452) can detect the pinhole button interrupt. At block 630, the interrupt service routine masks all interrupts in the storage device 400 and calls the LED indicator module 454. At block 635, the LED indicator module 454 can turn on the LED. At block 640, the data accessibility and data security module 458 is called.
[0060] At block 645, the storage device 400 determines whether data accessibility and authentication are enabled. If data accessibility and authentication are enabled at block 645, the process 600 proceeds to block 650. At block 650, the storage device 400 can perform at least one of the following operations: make one or more partitions inaccessible / accessible, make one or more partitions read-only while other partitions can be read / written, activate user authentication with a pinhole press on a partition, and activate user authentication with a pinhole press on the entire drive. If data accessibility and authentication are not enabled at block 645, the process 600 proceeds to block 655.
[0061] In some embodiments, one or more data accessibility and / or authentication-related operations can be performed. Authentication can include password protection. For example, the storage device 400 can make partitions marked as private inaccessible or hidden. One or more partitions can be marked as private partitions by the user using a host application (e.g., an operating system (OS) or a mobile application). The storage device 400 can make one or more partitions read-only while other partitions are read / written. Instead of making private partitions inaccessible, the storage device 400 can make private partitions read-only. The storage device 400 can activate user authentication for a partition. Instead of making private partitions inaccessible, the storage device 400 can make private partitions password-protected. The storage device 400 can activate user authentication for the entire drive. The drive can be password-protected and a secure drive.
[0062] At block 655, storage device 400 determines whether data security is enabled. If data security is enabled at block 655, process 600 proceeds to block 660. At block 660, storage device 400 may perform at least one of the following operations: activate data encryption with a pinhole button and deactivate data encryption with a pinhole button. If data security is not enabled at block 655, process 600 proceeds to block 665. At block 665, LED indicator module 454 is called to turn off the LED. All interrupts may be unmasked after the associated operations are completed. Process 600 ends at block 670.
[0063] In some embodiments, one or more data security-related operations may be performed. For example, storage device 400 may perform data encryption on all content or a preconfigured partition. In this way, storage device 400 may be a secure data drive or a self-encrypting drive. If the data has been encrypted, storage device 400 may perform decryption. In some cases, storage device 400 may perform encryption on newly written data after pressing the pinhole button, and the old data may remain unencrypted.
[0064] As described above, the user may configure the use of the pinhole button for various purposes, including but not limited to accessibility, data encryption, data compression / decompression, space management, performance management, etc. In some embodiments, the pinhole button may be configured to initiate a data backup operation. For example, data may be backed up on a preconfigured cloud storage device, an Internet-enabled device, a Wi-Fi-connected device, etc. In certain embodiments, an OS layer or a file system or a similar feature is available on the storage device to perform some of the above-described functionality or operations. For example, an OS layer, a file system, or a similar feature may be provided to manage file / update timestamps, compression algorithm details, encryption keys, passwords, etc.
[0065] By providing host-independent disk optimization and data operations, a storage device can improve its performance by performing background and other data operations without being connected to a host and / or reducing its dependence on the host. The storage device can be connected to a power source and can initiate a specified operation by pressing a pinhole on the storage device. A user can use a host at a previous time to configure which data operation should be initiated by pressing the pinhole button. Alternatively, a default data operation can be associated with the pressing of the pinhole button. When the storage device is subsequently connected to a host, performing background or other data operations on the storage device while not connected to the host can improve the performance of the storage device. For example, when the storage device is subsequently connected to a host, there may be no or fewer outstanding background or other data operations, such that host operations can be performed without utilizing resources for background or other data operations. Host operations do not need to be interleaved with background or other data operations. Additionally, when the storage device is subsequently connected to a host due to data relocation, compaction, folding, etc., more storage is available. Host-independent disk optimization and data operations can reduce or eliminate the dependence on the host when the storage device performs background operations and / or other data operations. The examples described herein are provided for illustrative purposes, and many variations are possible. Features described in connection with various embodiments and / or examples can be implemented individually or in combination.
[0066] Figure 7 Illustrates a workflow process 700 for providing host-independent disk optimization and data operations in a data storage device according to one or more embodiments. The workflow process 700 can be implemented by a data storage device such as Figures 1 to 6 data storage devices 100, 200, 400 in []. For example, the workflow process 700 can be executed partially or entirely by a controller of the data storage device. For illustrative purposes, the process 700 is explained below in connection with Figure 2 data storage device 200 in []. Certain details related to the process 700 are explained in more detail with respect to Figures 1 to 6 . Depending on the embodiment, the process 700 can include fewer or additional blocks, and these blocks can be executed in a different order than illustrated.
[0067] At block 705, the data storage device 200 may provide a pinhole button 202 in the data storage device 200. For example, the pinhole button 202 may be pressed by a user to initiate a disk optimization operation or another data operation. In some embodiments, the data storage device 200 may include a pin 206 for pressing the pinhole button 202. The data storage device 200 may include a Universal Serial Bus (USB) interface. The data storage device 200 may include a Light Emitting Diode (LED) indicator 204 for providing status information related to the disk optimization operation or another data operation. The data storage device 200 may turn on the LED indicator 204 in response to initiating the disk optimization operation or another data operation. The data storage device 200 may turn off the LED indicator 204 in response to completing the disk optimization operation or another data operation.
[0068] At block 710, the data storage device 200 may detect that the pinhole button 202 has been pressed. In some embodiments, the data storage device 200 may detect that the pinhole button has been pressed by receiving an interrupt, and the data storage device 200 may mask all interrupts to initiate the disk optimization operation or another data operation.
[0069] At block 715, the data storage device 200 may detect that the data storage device 200 is coupled to a Direct Current (DC) power source 210. The DC power source 210 may include one or more of the following: a wall charger, a mobile power source, or a rechargeable battery.
[0070] At block 720, data storage device 200 may initiate a disk optimization operation or another data operation for data storage device 200. According to some aspects, data storage device 200 does not receive a command from a host to initiate the disk optimization operation or another data operation. According to some aspects, data storage device 200 is not connected to a host during the disk optimization operation or another data operation. In some embodiments, the disk optimization operation includes performance and space optimization operations. The performance and space optimization operations may include one or more of the following: garbage collection, multi-level cell (MLC)-MLC relocation, single-level cell (SLC)-SLC compaction, SLC-MLC folding, deleting files older than a specified time, deleting files not accessed since a specified time, or updating a management table. In certain embodiments, the disk optimization operation includes a data compression optimization operation. The data compression optimization operation may include one or more of the following: data compression of a selected partition, data compression of all data, data compression of files written before a specified time, data compression of incoming data, decompression of previously compressed data, or updating a management table. In some embodiments, the disk optimization operation includes a data retention optimization operation. The data retention optimization operation may include one or more of the following: read-scanning and erasing previously written blocks, relocating data from blocks showing a bit error rate (BER) greater than a specified threshold, wear leveling operations, or updating a management table.
[0071] In some embodiments, data storage device 200 may initiate an authentication or data accessibility operation. The authentication or data accessibility operation may include one or more of the following: making one or more partitions inaccessible or accessible, making one or more partitions read-only while other partitions are read / write, activating user authentication for a partition, and activating user authentication for the data storage device. In certain embodiments, data storage device 200 may initiate a data security operation. The data security operation may include one or more of the following: activating data encryption or deactivating data encryption.
[0072] Figure 8FIG. 1000 is a diagram of a computing device 1000 in accordance with one or more embodiments. The computing device 1000 can execute instructions that can cause the computing device 1000 to perform any one or more of the methods (e.g., operations, methods, functions, etc.) discussed herein. The computing device 1000 can be a mobile phone, a smart phone, a netbook computer, a rack server, a router computer, a server computer, a personal computer, a mainframe computer, a laptop computer, a tablet computer, a desktop computer, etc., in which an instruction set can be executed to cause the machine to perform any one or more of the methods discussed herein. In an alternative embodiment, the machine can be connected (e.g., networked) to other machines in a LAN, an intranet, an extranet, or the Internet. The machine can operate in a client-server network environment with the capabilities of a server machine. The machine can be a personal computer (PC), a set-top box (STB), a server, a network router, a switch or bridge, or any machine capable of executing an instruction set (sequential or otherwise) that specifies actions to be taken by the machine. Further, although only a single machine is illustrated, the term "machine" shall also be taken to include any collection of machines that individually or jointly execute one (or more) instruction sets to perform any one or more of the functions, operations, methods, algorithms, etc. discussed herein.
[0073] The example computing device 1000 includes a processing device 1002 (e.g., a processor, a controller, a central processing unit (CPU), etc.), a main memory 1004 (e.g., a read-only memory (ROM), a flash memory, a dynamic random access memory (DRAM) such as synchronous DRAM (SDRAM)), a network access interface 1008, a direct access interface 1009, an output device 1010, an input device 1012, and a data storage device 1018, which communicate with each other via a bus 1030.
[0074] The processing device 1002 represents one or more general-purpose processing devices, such as a microprocessor or a central processing unit, etc. More specifically, the processing device 1002 can be a complex instruction set computing (CISC) microprocessor, a reduced instruction set computing (RISC) microprocessor, a very long instruction word (VLIW) microprocessor, or a processor implementing other instruction sets or a combination of instruction sets. The processing device 1002 can also be one or more dedicated processing devices, such as an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a digital signal processor (DSP), or a network processor, etc. The processing device 1002 is configured to execute the storage module instructions 1035 for performing the operations and steps discussed herein.
[0075] The computing device 1000 may include a network access interface 1008 (e.g., a network interface card, a Wi-Fi interface, etc.) that can communicate with a network. The computing device may also include a direct access interface 1009 (e.g., a USB interface, an external Serial Advanced Technology Attachment (eSATA) interface, a Thunderbolt interface, etc.). The computing device 1000 may further include an output device 1010 (e.g., a liquid crystal display (LCD) or a cathode ray tube (CRT)) and an input device 1012 (e.g., a mouse, a keyboard, etc.). In one embodiment, the output device 1010 and the input device 1012 may be combined into a single component or device (e.g., an LCD touch screen).
[0076] The data storage device 1018 may include a computer-readable storage medium 1028 on which one or more instruction sets (e.g., storage module instructions 1035) embodying any one or more of the methods or functions described herein are stored. The storage module instructions 1035 may also reside, completely or at least partially, within the main memory 1004 and / or within the processing device 1002 during execution by the computing device 1000. The main memory 1004 and the processing device 1002 may also constitute computer-readable media. The instructions may also be sent or received via the network access interface 1008 and / or the direct access interface 1009.
[0077] Although the computer-readable storage medium 1028 is shown as a single medium in the exemplary embodiment, the term "computer-readable storage medium" should be considered to include a single medium or multiple media (e.g., a centralized or distributed database and / or associated caches and servers) storing one or more instruction sets. The term "computer-readable storage medium" should also be considered to include any medium that is capable of storing, encoding, or carrying an instruction set for execution by a machine and that causes the machine to perform any one or more of the methods of the present disclosure. The term "computer-readable storage medium" should accordingly be considered to include, but not be limited to, solid-state memory, optical media, and magnetic media.
[0078] General Comments
[0079] Those skilled in the art will understand that in some embodiments, other types of data storage systems may be implemented while remaining within the scope of the present disclosure. Additionally, the actual steps taken in the processes discussed herein may be different from those described or shown in the figures. Depending on the embodiment, some of the above steps may be removed, and other steps may be added.
[0080] While certain embodiments have been described, these embodiments are presented by way of example only and are not intended to limit the scope of protection. In fact, the novel methods and systems described herein can be embodied in many other forms. Additionally, various omissions, substitutions, and changes can be made to the forms of the methods and systems described herein. The appended claims and their equivalents are intended to cover such forms or modifications that will fall within the scope and spirit of the protection. For example, the various components illustrated in the figures can be implemented as software and / or firmware on a processor, ASIC / FPGA, or dedicated hardware. Further, the features and attributes of the specific embodiments disclosed above can be combined in different ways to form additional embodiments, all of which fall within the scope of this disclosure. Although this disclosure provides certain preferred embodiments and applications, other embodiments that are obvious to those of ordinary skill in the art (including embodiments that do not provide all of the features and advantages described herein) are also within the scope of this disclosure. Accordingly, the scope of this disclosure is intended to be defined only by reference to the appended claims.
[0081] As used herein, the words “example” or “exemplary” are used to mean serving as an example, illustration, or instance. Any aspect or design described herein as “example” or “exemplary” is not necessarily to be construed as preferred or advantageous over other aspects or designs. Instead, the use of the words “example” or “exemplary” is intended to present concepts in a concrete manner. As used in this application, the term “or” is intended to mean an inclusive “or” rather than an exclusive “or”. That is, unless otherwise specified or clear from the context, “X includes A or B” is intended to mean any natural inclusive permutation. That is, “X includes A or B” is satisfied in any of the foregoing instances if X includes A; X includes B; or X includes both A and B. Additionally, as used in this application and the appended claims, the articles “a” and “an” generally should be construed to mean “one or more” unless otherwise specified or clearly indicated as the singular form from the context. Further, the terms “embodiment” or “an embodiment” or “a specific embodiment” or “a particular embodiment” used throughout do not necessarily mean the same embodiment or specific embodiment unless so described. Additionally, as used herein, the terms “first”, “second”, “third”, “fourth”, etc. are intended as labels to distinguish different elements and may not necessarily have an ordinal meaning in accordance with their numerical designations.
[0082] The methods and processes described herein may be embodied in software code modules executed by one or more general and / or special purpose computers / processors and are partially or fully automated via such software code modules. The term "module" may refer to logic embodied in hardware and / or firmware, or to a collection of software instructions written in a programming language (such as, for example, C or C++) that may have entry and exit points. Software modules may be compiled and linked into an executable program, installed in a dynamic link library, or may be written in an interpreted programming language such as, for example, BASIC, Perl, or Python. It should be understood that software modules may be capable of calling from other modules or from themselves and / or may be called in response to detected events or interrupts. Software instructions may be embedded in firmware (such as erasable programmable read-only memory (EPROM)). Software instructions may be stored on any type of computer-readable medium (e.g., non-transitory computer-readable medium) or other computer storage device or collection of storage devices. "Module" may also refer to one or more devices, components, systems, or subsystems that may conceptually implement related functionality. It should also be understood that hardware modules may include connected logic units (such as gates and flip-flops) and / or may include programmable units (such as programmable gate arrays, application specific integrated circuits, and / or processors). The modules described herein are preferably implemented as software modules, but may be represented in hardware and / or firmware. Additionally, although in some embodiments modules may be compiled separately, in other embodiments, modules may represent a subset of the instructions of a separately compiled program and may not have an interface available to other logical program units.
Claims
1. A data storage device, comprising: Non-volatile memory; a pinhole button configured to be pressed; and A controller, the controller being configured to: Detecting that the pinhole button is pressed; detecting that the data storage device is coupled to a direct current (DC) power source; and A disk optimization operation is initiated for the data storage device.
2. The data storage device of claim 1, wherein the data storage device comprises a Universal Serial Bus (USB) interface.
3. The data storage device of claim 1, wherein the disk optimization operation comprises a performance and a space optimization operation.
4. A data storage device according to claim 3, wherein the performance and space optimization operations include one or more of the following: garbage collection, multi-level cell (MLC)-MLC relocation, single-level cell (SLC)-SLC compaction, SLC-MLC folding, deleting files older than a specified time, deleting files that have not been accessed since a specified time, or updating a management table.
5. The data storage device of claim 1, wherein the disk optimization operation comprises a data compression optimization operation.
6. A data storage device according to claim 5, wherein the data compression optimization operation includes one or more of the following: data compression of a selected partition, data compression of all data, data compression of files written before a specified time, data compression of incoming data, decompression of previously compressed data, or updating a management table.
7. The data storage device of claim 1, wherein the disk optimization operation comprises a data retention optimization operation.
8. The data storage device according to claim 7, wherein: The data retention optimization operation includes one or more of: a read scan and erase of previously written blocks, relocation of data from blocks showing a bit error rate (BER) greater than a specified threshold, a wear leveling operation, or updating a management table.
9. The data storage device of claim 1, wherein the DC power source comprises one or more of: a wall charger, a power bank, or a rechargeable battery.
10. The data storage device of claim 1, wherein the data storage device does not receive a command from a host to initiate the disk optimization operation.
11. The data storage device of claim 1, wherein the data storage device is not connected to a host during the disk optimization operation.
12. The data storage device of claim 1, further comprising a light emitting diode (LED) indicator for providing status information related to the disk optimization operation.
13. The data storage device of claim 12, wherein the controller is further configured to: turning on the LED indicator in response to initiating the disk optimization operation; and The LED indicator is turned off in response to completing the disk optimization operation.
14. The data storage device of claim 1, wherein the controller is further configured to: detecting that the pinhole button is pressed by receiving an interrupt; and All interrupts are masked to initiate the described disk optimization operation.
15. The data storage device of claim 1, wherein the controller is further configured to initiate an authentication or data accessibility operation.
16. A data storage device according to claim 15, wherein the authentication or data accessibility operation includes one or more of the following: making one or more partitions inaccessible or accessible, making one or more partitions read-only and other partitions read / write, activating user authentication for partitions, and activating user authentication for the data storage device.
17. The data storage device of claim 1, wherein the controller is further configured to: initiate a data security operation.
18. The data storage device of claim 17, wherein the data security operation comprises one or more of: activating data encryption or deactivating data encryption.
19. A method for performing a disk optimization operation in a data storage device, the method comprising: providing a data storage device comprising a non-volatile memory and a pinhole button configured to be pressed; Detecting that the pinhole button is pressed; detecting that the data storage device is coupled to a direct current (DC) power source; as well as A disk optimization operation is initiated for the data storage device.
20. A data storage device, the data storage device comprising: Non-volatile memory; a pinhole button configured to be pressed; as well as A controller component, the controller component being configured to: Detecting that the pinhole button is pressed; detecting that the data storage device is coupled to a direct current (DC) power source; and A disk optimization operation is initiated for the data storage device.